summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/hana/test/issues/github_234.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/hana/test/issues/github_234.cpp')
-rw-r--r--src/boost/libs/hana/test/issues/github_234.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/boost/libs/hana/test/issues/github_234.cpp b/src/boost/libs/hana/test/issues/github_234.cpp
new file mode 100644
index 000000000..bf44412f8
--- /dev/null
+++ b/src/boost/libs/hana/test/issues/github_234.cpp
@@ -0,0 +1,31 @@
+// Copyright Louis Dionne 2013-2017
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+
+#include <boost/hana/assert.hpp>
+#include <boost/hana/contains.hpp>
+#include <boost/hana/integral_constant.hpp>
+#include <boost/hana/map.hpp>
+#include <boost/hana/pair.hpp>
+#include <boost/hana/set.hpp>
+namespace hana = boost::hana;
+
+
+int main() {
+ {
+ auto set = hana::make_set(hana::int_c<1>, hana::integral_c<signed char, 'x'>);
+
+ BOOST_HANA_CONSTANT_CHECK(hana::contains(set, hana::int_c<1>));
+ BOOST_HANA_CONSTANT_CHECK(hana::contains(set, hana::integral_c<signed char, 'x'>));
+ }
+
+ {
+ auto map = hana::make_map(
+ hana::make_pair(hana::int_c<1>, 1),
+ hana::make_pair(hana::integral_c<signed char, 'x'>, 'x')
+ );
+
+ BOOST_HANA_CONSTANT_CHECK(hana::contains(map, hana::int_c<1>));
+ BOOST_HANA_CONSTANT_CHECK(hana::contains(map, hana::integral_c<signed char, 'x'>));
+ }
+}