searchable.cpp 734 B

12345678910111213141516171819202122232425
  1. // Copyright Louis Dionne 2013-2017
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  4. #include <boost/hana/assert.hpp>
  5. #include <boost/hana/equal.hpp>
  6. #include <boost/hana/ext/std/integer_sequence.hpp>
  7. #include <boost/hana/ext/std/integral_constant.hpp>
  8. #include <boost/hana/find.hpp>
  9. #include <boost/hana/integral_constant.hpp>
  10. #include <boost/hana/optional.hpp>
  11. #include <type_traits>
  12. #include <utility>
  13. namespace hana = boost::hana;
  14. constexpr std::integer_sequence<int, 1, 2, 3, 4> xs{};
  15. BOOST_HANA_CONSTANT_CHECK(hana::equal(
  16. hana::find(xs, hana::int_c<3>),
  17. hana::just(std::integral_constant<int, 3>{})
  18. ));
  19. int main() { }