Pedro Alves wrote: > How about breaking this line like the rpl method was breaking it, in order > to avoid overly-long lines? > > inline operator type () const > { return reinterpret_cast<type>((rettype2 (*) > parameters2)(::func)); } > > Likewise the other similar cases.
If line breaking it needed, I prefer the GNU style for functions, and do it systematically. It takes more vertical space, but it make is easier to compare the different variants of _gl_ ## func ## _wrapper. --- a/build-aux/snippet/c++defs.h +++ b/build-aux/snippet/c++defs.h @@ -133,7 +133,11 @@ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ - inline operator type () const { return ::rpl_func; } \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy @@ -154,7 +158,11 @@ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ - inline operator type () const { return reinterpret_cast<type>(::rpl_func); } \ + \ + inline operator type () const \ + { \ + return reinterpret_cast<type>(::rpl_func); \ + } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy @@ -180,7 +188,11 @@ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ - inline operator type () const { return ::func; } \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy @@ -201,7 +213,11 @@ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ - inline operator type () const { return reinterpret_cast<type>(::func); } \ + \ + inline operator type () const \ + { \ + return reinterpret_cast<type>(::func); \ + } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy @@ -228,7 +244,11 @@ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ - inline operator type () const { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); } \ + \ + inline operator type () const \ + { \ + return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ + } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy Pushed with this style change. Bruno