
Arkadiy Vertleyb wrote:
"Tobias Schwinger" <tschwinger@neoscientists.org> wrote
That's not exactly what I meant. It's possible to
#define REG_SPEC(a,b) \ ... struct my_traits< a_private_return_type b > { ... }
Do you mean: ... struct my_traits< a_private_return_type(b) > { ... } ?
No, the original should be OK because input for 'b' must be parenthesized to allow any number of commas. For the expansion it means ... struct my_traits< a_private_return_type (b-without-parentheses) > ... , though.
And then use "my_traits< a_private_return_type(T) >". However, we can't apply this technique globally because not all types are valid function parameter types
Which types are not valid? void?
Well, is this code legal? #include <boost/mpl/assert.hpp> #include <boost/type_traits/is_same.hpp> template<typename R,typename T> struct func1 { typedef R type(T); }; BOOST_MPL_ASSERT(( boost::is_same< func1<void,void>::type, void() > )); MSVC thinks it is but GCC and Comeau disagree -- I'm not sure which one is right (according to 8.3.5-9). Fact is, it means trouble in practice. Completely illegal would be cv-void.
[... experiments with line breaking options of news clients]
I don't have such option. Trying maximum (132).
Me not either - just entered 0 ;-) (Thunderbird). Regards, Tobias