id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6577,"Add meta-function to extract the raw type, meta-function to compare raw types",Daryle Walker,John Maddock,"Based on the work I did on change-set [77046], can we add my two type-traits to the general library? The first one extracts the raw type, that removes the top-level reference, const, and/or volatile qualifiers from a type expression. You need the raw type if you want to make a new object and/or apply your own transformations. {{{ template < typename T > struct remove_cv_ref { typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_cv::type>::type>::type type; }; }}} Unlike my patch code, the version here can handle ""T const & volatile"". (I don't think automatic code can add a cv-qualifier after a reference, that's why I didn't have it. We have to be more general here.) The second trait would work like is_same, but compare the raw types. {{{ template < typename T, typename U > struct is_related : public ::boost::is_same< typename ::boost::detail::remove_cv_ref::type, typename ::boost::detail::remove_cv_ref::type > {}; }}} Like the guy I got the idea from, you could use a template alias to implement this in C++2011. ",Feature Requests,closed,Boost 1.50.0,type_traits,Boost Development Trunk,Not Applicable,obsolete,,