// 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 #include #include #include namespace hana = boost::hana; namespace boost { namespace hana { template struct to_impl, std::vector, when::value>> : embedding::value> { static std::vector apply(std::vector const& xs) { std::vector result; for (auto const& x: xs) result.push_back(to(x)); return result; } }; }} int main() { BOOST_HANA_RUNTIME_CHECK( hana::to>(std::vector{1.1, 2.2, 3.3}) == std::vector{1, 2, 3} ); static_assert(!hana::is_embedded, std::vector>{}, ""); }