From f8ee448fa5f8803b78566acf5fd654d9f299645b Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 8 May 2025 03:04:21 +0300 Subject: [PATCH] Add test case from #106. Refs #106. --- test/Jamfile | 1 + test/mp_map_find_4.cpp | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 test/mp_map_find_4.cpp diff --git a/test/Jamfile b/test/Jamfile index 0404169..8c3d4da 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -250,6 +250,7 @@ run mp_similar.cpp ; run mp_map_find.cpp ; run mp_map_find_2.cpp ; run mp_map_find_3.cpp ; +run mp_map_find_4.cpp ; run mp_map_contains.cpp ; run mp_map_insert.cpp ; run mp_map_replace.cpp ; diff --git a/test/mp_map_find_4.cpp b/test/mp_map_find_4.cpp new file mode 100644 index 0000000..5e724fd --- /dev/null +++ b/test/mp_map_find_4.cpp @@ -0,0 +1,32 @@ +// Copyright 2016, 2020, 2024 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include + +template struct Wrap +{ + struct type {}; +}; + +int main() +{ + using boost::mp11::mp_map_find; + using boost::mp11::mp_list; + + using Int = Wrap::type; + using Long = Wrap::type; + + using Map = mp_list< + mp_list, + mp_list + >; + + BOOST_TEST_TRAIT_SAME( mp_map_find, mp_list ); + BOOST_TEST_TRAIT_SAME( mp_map_find, mp_list ); + BOOST_TEST_TRAIT_SAME( mp_map_find, void ); + + return boost::report_errors(); +}