From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- .../libs/unordered/test/helpers/metafunctions.hpp | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/boost/libs/unordered/test/helpers/metafunctions.hpp (limited to 'src/boost/libs/unordered/test/helpers/metafunctions.hpp') diff --git a/src/boost/libs/unordered/test/helpers/metafunctions.hpp b/src/boost/libs/unordered/test/helpers/metafunctions.hpp new file mode 100644 index 00000000..f5f13851 --- /dev/null +++ b/src/boost/libs/unordered/test/helpers/metafunctions.hpp @@ -0,0 +1,30 @@ + +// Copyright 2005-2009 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_UNORDERED_TEST_HELPERS_METAFUNCTIONS_HEADER) +#define BOOST_UNORDERED_TEST_HELPERS_METAFUNCTIONS_HEADER + +#include +#include + +namespace test { + template + struct is_set : public boost::is_same + { + }; + + template struct has_unique_keys + { + static char flip(typename Container::iterator const&); + static long flip(std::pair const&); + BOOST_STATIC_CONSTANT(bool, + value = sizeof(long) == + sizeof(flip( + ((Container*)0)->insert(*(typename Container::value_type*)0)))); + }; +} + +#endif -- cgit v1.2.3