
--- Christian Holmquist wrote:
--- Cromwell Enage wrote:
In my automata library, I defined a data_type metafunction that removes const, pointer, reference, volatile, and [] qualifiers from the input type.
Could you post the function here? Or would it be possible to eventually have it added to the type_traits library?
The automata library is available from the Boost Vault in the Data Structures directory, but for convenience, here are the contents of the header file in question: // Copyright (C) 2007 Cromwell D. Enage // Distributed under the Boost Software License, // Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_DETAIL_METAFUNCTION_DATA_TYPE_HPP_INCLUDED #define BOOST_DETAIL_METAFUNCTION_DATA_TYPE_HPP_INCLUDED #include <boost/type_traits/remove_const.hpp> #include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/remove_pointer.hpp> #include <boost/type_traits/remove_volatile.hpp> #include <boost/type_traits/remove_all_extents.hpp> #include <boost/mpl/aux_/lambda_support.hpp> namespace boost { namespace detail { template <typename T> struct data_type : remove_const< typename remove_reference< typename remove_pointer< typename remove_volatile< typename remove_all_extents<T>::type >::type >::type >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,data_type,(T)) }; }} // namespace boost::detail #endif // BOOST_DETAIL_METAFUNCTION_DATA_TYPE_HPP_INCLUDED HTH, Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com