From e0e86a14139382102f6665d19a4fc9dc849dfc08 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 3 Jun 2022 20:01:26 +0300 Subject: [PATCH] Add detail_is_range_test2.cpp --- test/Jamfile.v2 | 1 + test/detail_is_range_test2.cpp | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 test/detail_is_range_test2.cpp diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 2e9d364..e04cf3c 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -60,6 +60,7 @@ build-project ../examples ; run hash_reference_values.cpp ; run detail_is_range_test.cpp ; +run detail_is_range_test2.cpp ; run detail_is_contiguous_range_test.cpp ; run detail_is_unordered_range_test.cpp ; diff --git a/test/detail_is_range_test2.cpp b/test/detail_is_range_test2.cpp new file mode 100644 index 0000000..9fda533 --- /dev/null +++ b/test/detail_is_range_test2.cpp @@ -0,0 +1,34 @@ +// Copyright 2022 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#if defined(_MSC_VER) +# pragma warning(disable: 4714) // forceinline not inlined +#endif + +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wsign-conversion" +#endif + +#include +#include +#include +#include +#if !defined(BOOST_NO_CXX17_HDR_FILESYSTEM) +# include +#endif + +int main() +{ + using boost::hash_detail::is_range; + + BOOST_TEST_TRAIT_FALSE((is_range< boost::filesystem::path >)); + BOOST_TEST_TRAIT_FALSE((is_range< boost::filesystem::path const >)); + +#if !defined(BOOST_NO_CXX17_HDR_FILESYSTEM) + BOOST_TEST_TRAIT_FALSE((is_range< std::filesystem::path >)); + BOOST_TEST_TRAIT_FALSE((is_range< std::filesystem::path const >)); +#endif + + return boost::report_errors(); +}