
19 Jan
2009
19 Jan
'09
5:27 p.m.
AMDG jean-louis.a.leroy@fortis.com wrote:
I'm quite sure that I follow. Do you mean that you have a template like this: template<bool B> void f(mpl::bool_<B>);
Nearly. It's more like this:
template<class WritePointers, ...> struct WriteAttributes { template<class Attribute> void operator ()(Attribute a) const { typedef ... attribute_type; write(is_convertible<is_pointer<attribute_type>, WritePointers>(), ...); } template<...> void write(mpl::false_, ...); // non-pointer pass template<...> void write(mpl::true_, ...); // pointer pass // ... };
I see. How about boost::mpl::equal_to<is_pointer<attribute_type>, WritePointers> In Christ, Steven Watanabe