From abb1b9ce5b40d09a83602a4990aa2443dfda7d70 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 25 Dec 2025 14:57:51 +0200 Subject: [PATCH 1/6] Add char8_t tests to lightweight_test_test6 --- test/lightweight_test_test6.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/lightweight_test_test6.cpp b/test/lightweight_test_test6.cpp index c6928d8b..b5bfe9b2 100644 --- a/test/lightweight_test_test6.cpp +++ b/test/lightweight_test_test6.cpp @@ -1,6 +1,6 @@ // Test BOOST_TEST_EQ with character types // -// Copyright 2020 Peter Dimov +// Copyright 2020, 2025 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt @@ -19,14 +19,23 @@ int main() #if !defined(BOOST_NO_CXX11_CHAR16_T) + BOOST_TEST_EQ( u'A', u'A' ); BOOST_TEST_EQ( (char16_t)1, (char16_t)1 ); #endif #if !defined(BOOST_NO_CXX11_CHAR32_T) + BOOST_TEST_EQ( U'A', U'A' ); BOOST_TEST_EQ( (char32_t)1, (char32_t)1 ); +#endif + +#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L + + BOOST_TEST_EQ( u8'A', u8'A' ); + BOOST_TEST_EQ( (char8_t)1, (char8_t)1 ); + #endif return boost::report_errors(); From c4e5a6541fe28cee14783a2b729a5b941ebc8c11 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 25 Dec 2025 15:05:02 +0200 Subject: [PATCH 2/6] Add a test_output_impl overload for char8_t --- include/boost/core/lightweight_test.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/boost/core/lightweight_test.hpp b/include/boost/core/lightweight_test.hpp index 8b597a26..f786deb2 100644 --- a/include/boost/core/lightweight_test.hpp +++ b/include/boost/core/lightweight_test.hpp @@ -207,6 +207,16 @@ inline std::string test_output_impl( char const& v ) } } +#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L + +inline std::string test_output_impl( char8_t const& v ) +{ + // assume that char is ASCII, compatible with char8_t + return test_output_impl( static_cast( v ) ); +} + +#endif + // predicates struct lw_test_eq From 89b242e5404ad6181cf75d60ec84635336e25c03 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 25 Dec 2025 16:31:01 +0200 Subject: [PATCH 3/6] Add VS2026 to Drone --- .drone.jsonnet | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.drone.jsonnet b/.drone.jsonnet index b9d1dd85..fba93f5d 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -454,4 +454,10 @@ local windows_pipeline(name, image, environment, arch = "amd64") = "cppalliance/dronevs2022:1", { TOOLSET: 'msvc-14.3', CXXSTD: '14,17,20,latest', ADDRMD: '32,64' }, ), + + windows_pipeline( + "Windows VS2026 msvc-14.5", + "cppalliance/dronevs2026:1", + { TOOLSET: 'msvc-14.5', CXXSTD: '14,17,20,latest', ADDRMD: '32,64' }, + ), ] From 8c338d5a65688c8dcd3f0f34fbbb6f7368d42538 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 2 Jan 2026 13:22:31 +0200 Subject: [PATCH 4/6] Add boost/is_placeholder.hpp (moved from Bind) --- include/boost/is_placeholder.hpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/boost/is_placeholder.hpp diff --git a/include/boost/is_placeholder.hpp b/include/boost/is_placeholder.hpp new file mode 100644 index 00000000..5f1b544f --- /dev/null +++ b/include/boost/is_placeholder.hpp @@ -0,0 +1,31 @@ +#ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED +#define BOOST_IS_PLACEHOLDER_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined( _MSC_VER ) && ( _MSC_VER >= 1020 ) +# pragma once +#endif + + +// is_placeholder.hpp - TR1 is_placeholder metafunction +// +// Copyright (c) 2006 Peter Dimov +// +// 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 + + +namespace boost +{ + +template< class T > struct is_placeholder +{ + enum _vt { value = 0 }; +}; + +} // namespace boost + +#endif // #ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED From f3cae495d325c654dd01883d83b0c5b8abb64a70 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 2 Jan 2026 13:40:47 +0200 Subject: [PATCH 5/6] Document is_placeholder --- doc/changes.qbk | 6 ++++ doc/core.qbk | 1 + doc/is_placeholder.qbk | 69 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 doc/is_placeholder.qbk diff --git a/doc/changes.qbk b/doc/changes.qbk index d2acc4b4..53a3f60f 100644 --- a/doc/changes.qbk +++ b/doc/changes.qbk @@ -7,6 +7,12 @@ [section Revision History] +[section Changes in 1.91.0] + +* The header [link core.is_placeholder `boost/is_placeholder.hpp`] has been moved from Bind to Core. ([github_issue 90]) + +[endsect] + [section Changes in 1.90.0] * The implementation of `BOOST_TEST_THROWS` and `BOOST_TEST_NO_THROW` macros defined in diff --git a/doc/core.qbk b/doc/core.qbk index 2ec1b3f0..666736d7 100644 --- a/doc/core.qbk +++ b/doc/core.qbk @@ -61,6 +61,7 @@ criteria for inclusion is that the utility component be: [include functor.qbk] [include identity.qbk] [include ignore_unused.qbk] +[include is_placeholder.qbk] [include is_same.qbk] [include launder.qbk] [include lightweight_test.qbk] diff --git a/doc/is_placeholder.qbk b/doc/is_placeholder.qbk new file mode 100644 index 00000000..7e991a6b --- /dev/null +++ b/doc/is_placeholder.qbk @@ -0,0 +1,69 @@ +[/ + Copyright 2014, 2025 Peter Dimov + + Distributed under the Boost Software License, Version 1.0. + + See accompanying file LICENSE_1_0.txt + or copy at http://boost.org/LICENSE_1_0.txt +] + +[section:is_placeholder is_placeholder] + +[simplesect Authors] + +* Peter Dimov + +[endsimplesect] + +[section Header ] + +The header `` defines the class template +`boost::is_placeholder`. It defines a nested integral constant +`value` which is `0` when `T` is not a `boost::bind` placeholder +type, and a positive value corresponding to the placeholder index +otherwise. + +That is, `is_placeholder<_1>::value` is `1`, +`is_placeholder<_2>::value` is `2`, and so on. + +`is_placeholder` can be specialized for user types. If it is, +`boost::bind` will recognize these types as placeholders. + +[section Synopsis] + +`` +namespace boost +{ + template struct is_placeholder; +} +`` + +[endsect] + +[section Example] + +`` +#include +#include + +struct arg1_type {}; +constexpr arg1_type arg1{}; + +template<> struct boost::is_placeholder +{ + static constexpr int value = 1; +}; + +int f( int x ) { return x + 1; } + +int main() +{ + return boost::bind( f, arg1 )( -1 ); +} +`` + +[endsect] + +[endsect] + +[endsect] From a90a31934fe8bcb6e6be6dfea77b80492c7b6c81 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 22 Jan 2026 15:21:40 +0300 Subject: [PATCH 6/6] Remove dependencies on Boost.StaticAssert. Boost.StaticAssert has been merged into Boost.Config, so replace the dependency accordingly. --- test/CMakeLists.txt | 2 +- test/Jamfile.v2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1ed0e40b..a6cdfdcc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,7 +6,7 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST) if(HAVE_BOOST_TEST) -boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::core Boost::static_assert Boost::type_traits) +boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::core Boost::config Boost::type_traits) set(BOOST_TEST_LINK_LIBRARIES Boost::core Boost::throw_exception) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index e83443c4..2a1ed4ac 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -14,7 +14,7 @@ import testing ; project : requirements /boost/core//boost_core - /boost/static_assert//boost_static_assert + /boost/config//boost_config /boost/type_traits//boost_type_traits extra msvc:on