John (Eljay) Love-Jensen wrote:
------------------------------ struct Foo { template <bool x> struct MyTemplate { enum { test = false }; }; }; template <> struct Foo::MyTemplate<true> { enum { test = true }; }; ------------------------------ Hope that helps,
Yes, thank you, it came out like this: template<typename T,bool> struct acr_impl; template<typename T> struct acr_impl<T,true> { typedef T type; }; template<typename T> struct acr_impl<T,false> { typedef T& type; }; template<typename T> struct add_const_ref { typedef typename acr_impl<T,boost::is_reference<T>::value>::type type; }; and works fine:) Patrick