summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-01 08:48:42 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-01 09:24:28 (GMT)
commit2812bddd81f8a1b804c7460f4e14cd0aa393d129 (patch)
treed46294f35150c4f0f43deaf2d31fceaf945ae715 /3rdParty/Boost/boost/concept/detail/msvc.hpp
downloadswift-2812bddd81f8a1b804c7460f4e14cd0aa393d129.zip
swift-2812bddd81f8a1b804c7460f4e14cd0aa393d129.tar.bz2
Import.
Diffstat (limited to '3rdParty/Boost/boost/concept/detail/msvc.hpp')
-rw-r--r--3rdParty/Boost/boost/concept/detail/msvc.hpp92
1 files changed, 92 insertions, 0 deletions
diff --git a/3rdParty/Boost/boost/concept/detail/msvc.hpp b/3rdParty/Boost/boost/concept/detail/msvc.hpp
new file mode 100644
index 0000000..3aadb79
--- /dev/null
+++ b/3rdParty/Boost/boost/concept/detail/msvc.hpp
@@ -0,0 +1,92 @@
+// Copyright David Abrahams 2006. 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_CONCEPT_CHECK_MSVC_DWA2006429_HPP
+# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
+
+# include <boost/preprocessor/cat.hpp>
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+# include <boost/concept/detail/has_constraints.hpp>
+# include <boost/mpl/if.hpp>
+# endif
+
+
+namespace boost { namespace concept {
+
+template <class Model>
+struct check
+{
+ virtual void failed(Model* x)
+ {
+ x->~Model();
+ }
+};
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+
+namespace detail
+{
+ // No need for a virtual function here, since evaluating
+ // not_satisfied below will have already instantiated the
+ // constraints() member.
+ struct constraint {};
+}
+
+template <class Model>
+struct require
+ : mpl::if_c<
+ not_satisfied<Model>::value
+ , detail::constraint
+ , check<Model>
+ >::type
+{};
+
+# else
+
+template <class Model>
+struct require
+ : check<Model>
+{};
+
+# endif
+
+# if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+//
+// The iterator library sees some really strange errors unless we
+// do things this way.
+//
+template <class Model>
+struct require<void(*)(Model)>
+{
+ virtual void failed(Model*)
+ {
+ require<Model>();
+ }
+};
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
+enum \
+{ \
+ BOOST_PP_CAT(boost_concept_check,__LINE__) = \
+ sizeof(::boost::concept::require<ModelFnPtr>) \
+}
+
+# else // Not vc-7.1
+
+template <class Model>
+require<Model>
+require_(void(*)(Model));
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
+enum \
+{ \
+ BOOST_PP_CAT(boost_concept_check,__LINE__) = \
+ sizeof(::boost::concept::require_((ModelFnPtr)0)) \
+}
+
+# endif
+}}
+
+#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP