
--- John Maddock wrote:
Stjepan Rajko wrote:
So far, I've been using:
template<typename T> struct storable : public boost::remove_const<typename boost::remove_reference<T>::type > {};
[snip]
Your code will only work for class types right? If that's an acceptable limitation then it will do what you want, or did you mean:
template<typename T> struct storable { typedef typename boost::remove_const<typename boost::remove_reference<T>::type > type; };
I thought both class definitions would be equivalent from a user's perspective, e.g.: BOOST_STATIC_ASSERT(( boost::is_same< storable<int const&>::type , int >::value )); I've been using the first style (the one Stjepan presented) on primitive types without problems. Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com