summaryrefslogtreecommitdiff
path: root/boost/hof/detail/using.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/hof/detail/using.hpp')
-rw-r--r--boost/hof/detail/using.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/boost/hof/detail/using.hpp b/boost/hof/detail/using.hpp
new file mode 100644
index 0000000000..1f320d8337
--- /dev/null
+++ b/boost/hof/detail/using.hpp
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 2016 Paul Fultz II
+ using.hpp
+ 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_HOF_GUARD_USING_HPP
+#define BOOST_HOF_GUARD_USING_HPP
+
+#include <boost/hof/config.hpp>
+
+#if BOOST_HOF_HAS_TEMPLATE_ALIAS
+#define BOOST_HOF_USING(name, ...) using name = __VA_ARGS__
+#define BOOST_HOF_USING_TYPENAME(name, ...) using name = typename __VA_ARGS__
+#else
+#define BOOST_HOF_USING(name, ...) struct name : std::enable_if<true, __VA_ARGS__>::type {}
+#define BOOST_HOF_USING_TYPENAME(name, ...) struct name : __VA_ARGS__ {}
+#endif
+
+#endif