summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-03-28 15:46:49 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-03-28 15:46:49 (GMT)
commitf53a1ef582494458301b97bf6e546be52d7ff7e8 (patch)
tree7571b5cbcbd8a8f1dd1c966c9045b6cb69f0e295 /3rdParty/Boost/src/boost/concept/detail/general.hpp
parent638345680d72ca6acaf123f2c8c1c391f696e371 (diff)
downloadswift-contrib-f53a1ef582494458301b97bf6e546be52d7ff7e8.zip
swift-contrib-f53a1ef582494458301b97bf6e546be52d7ff7e8.tar.bz2
Moving submodule contents back.
Diffstat (limited to '3rdParty/Boost/src/boost/concept/detail/general.hpp')
-rw-r--r--3rdParty/Boost/src/boost/concept/detail/general.hpp66
1 files changed, 66 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/concept/detail/general.hpp b/3rdParty/Boost/src/boost/concept/detail/general.hpp
new file mode 100644
index 0000000..f36f9c4
--- /dev/null
+++ b/3rdParty/Boost/src/boost/concept/detail/general.hpp
@@ -0,0 +1,66 @@
+// 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_DETAIL_GENERAL_DWA2006429_HPP
+# define BOOST_CONCEPT_DETAIL_GENERAL_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
+
+// This implementation works on Comeau and GCC, all the way back to
+// 2.95
+namespace boost { namespace concept {
+
+template <class ModelFn>
+struct requirement_;
+
+namespace detail
+{
+ template <void(*)()> struct instantiate {};
+}
+
+template <class Model>
+struct requirement
+{
+ static void failed() { ((Model*)0)->~Model(); }
+};
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+
+template <class Model>
+struct constraint
+{
+ static void failed() { ((Model*)0)->constraints(); }
+};
+
+template <class Model>
+struct requirement_<void(*)(Model)>
+ : mpl::if_<
+ concept::not_satisfied<Model>
+ , constraint<Model>
+ , requirement<Model>
+ >::type
+{};
+
+# else
+
+// For GCC-2.x, these can't have exactly the same name
+template <class Model>
+struct requirement_<void(*)(Model)>
+ : requirement<Model>
+{};
+
+# endif
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
+ typedef ::boost::concept::detail::instantiate< \
+ &::boost::concept::requirement_<ModelFnPtr>::failed> \
+ BOOST_PP_CAT(boost_concept_check,__LINE__)
+
+}}
+
+#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP