From a4b2048a2903de53a8a284d8702dc302487f672b Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 26 Oct 2022 19:13:27 +0300 Subject: [PATCH] Add is_contiguous_range_test3 (refs #28) --- test/Jamfile.v2 | 1 + test/is_contiguous_range_test3.cpp | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/is_contiguous_range_test3.cpp diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 6908fef..e72f200 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -101,3 +101,4 @@ run hash_unordered_map_test.cpp ; run is_range_test3.cpp ; run is_contiguous_range_test2.cpp ; run is_unordered_range_test2.cpp ; +run is_contiguous_range_test3.cpp ; diff --git a/test/is_contiguous_range_test3.cpp b/test/is_contiguous_range_test3.cpp new file mode 100644 index 0000000..eec6559 --- /dev/null +++ b/test/is_contiguous_range_test3.cpp @@ -0,0 +1,25 @@ +// Copyright 2022 Peter Dimov. +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include + +struct X1 +{ + char const* begin() const; + char const* end() const; + std::size_t size() const; + + char data[16]; +}; + +int main() +{ + using boost::container_hash::is_contiguous_range; + + BOOST_TEST_TRAIT_FALSE((is_contiguous_range)); + + return boost::report_errors(); +}