github_297.cpp 568 B

12345678910111213141516171819202122
  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/integral_constant.hpp>
  5. #include <boost/hana/map.hpp>
  6. #include <boost/hana/pair.hpp>
  7. #include <memory>
  8. namespace hana = boost::hana;
  9. int main() {
  10. auto map = hana::make_map(
  11. hana::make_pair(hana::int_c<0>, 123),
  12. hana::make_pair(hana::int_c<1>, 456)
  13. );
  14. std::unique_ptr<decltype(map)> p1{}, p2{};
  15. using std::swap;
  16. swap(p1, p2);
  17. }