summaryrefslogtreecommitdiff
path: root/boost/hana/concept/logical.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/hana/concept/logical.hpp')
-rw-r--r--boost/hana/concept/logical.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/boost/hana/concept/logical.hpp b/boost/hana/concept/logical.hpp
new file mode 100644
index 0000000000..74c0fb3a51
--- /dev/null
+++ b/boost/hana/concept/logical.hpp
@@ -0,0 +1,33 @@
+/*!
+@file
+Defines `boost::hana::Logical`.
+
+@copyright Louis Dionne 2013-2016
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+ */
+
+#ifndef BOOST_HANA_CONCEPT_LOGICAL_HPP
+#define BOOST_HANA_CONCEPT_LOGICAL_HPP
+
+#include <boost/hana/fwd/concept/logical.hpp>
+
+#include <boost/hana/config.hpp>
+#include <boost/hana/core/default.hpp>
+#include <boost/hana/core/tag_of.hpp>
+#include <boost/hana/eval_if.hpp>
+#include <boost/hana/not.hpp>
+#include <boost/hana/while.hpp>
+
+
+BOOST_HANA_NAMESPACE_BEGIN
+ template <typename L>
+ struct Logical {
+ using Tag = typename tag_of<L>::type;
+ static constexpr bool value = !is_default<eval_if_impl<Tag>>::value &&
+ !is_default<not_impl<Tag>>::value &&
+ !is_default<while_impl<Tag>>::value;
+ };
+BOOST_HANA_NAMESPACE_END
+
+#endif // !BOOST_HANA_CONCEPT_LOGICAL_HPP