From b51965dddbed68f23c5e8c169c23c794313ce5f6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 28 Jun 2011 17:17:23 +0200 Subject: Add boost subset as an implementation detail --- cutl/details/boost/type_traits/msvc/typeof.hpp | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 cutl/details/boost/type_traits/msvc/typeof.hpp (limited to 'cutl/details/boost/type_traits/msvc/typeof.hpp') diff --git a/cutl/details/boost/type_traits/msvc/typeof.hpp b/cutl/details/boost/type_traits/msvc/typeof.hpp new file mode 100644 index 0000000..6e7e270 --- /dev/null +++ b/cutl/details/boost/type_traits/msvc/typeof.hpp @@ -0,0 +1,50 @@ +// Copyright (C) 2004 Peder Holt +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_TYPETRAITS_MSVC_TYPEOF_HPP +#define BOOST_TYPETRAITS_MSVC_TYPEOF_HPP + +#include +#include + +namespace cutl_details_boost { namespace detail { +# if BOOST_WORKAROUND(BOOST_MSVC,==1300) + template + struct msvc_extract_type + { + template + struct id2type_impl; + + typedef id2type_impl id2type; + }; + + template + struct msvc_register_type : msvc_extract_type + { + template<> + struct id2type_impl //VC7.0 specific bugfeature + { + typedef T type; + }; + }; +# else + template + struct msvc_extract_type + { + struct id2type; + }; + + template + struct msvc_register_type : msvc_extract_type + { + typedef msvc_extract_type base_type; + struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature + { + typedef T type; + }; + }; +# endif +}} + +#endif //BOOST_TYPETRAITS_MSVC_TYPEOF_IMPL_HPP -- cgit v1.1