diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4231b68..6b11981 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -175,6 +175,12 @@ jobs:
container: ubuntu:24.04
os: ubuntu-latest
install: clang-18
+ - toolset: clang
+ compiler: clang++-19
+ cxxstd: "11,14,17,20,2b"
+ container: ubuntu:24.04
+ os: ubuntu-latest
+ install: clang-19
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-13
diff --git a/doc/release_notes.html b/doc/release_notes.html
index ade6710..1f76be0 100644
--- a/doc/release_notes.html
+++ b/doc/release_notes.html
@@ -31,6 +31,7 @@
+
+ - Fixed compile errors in Clang 19 and later due to
+ P0522R0 support.
+
+
+
Boost 1.87 release
@@ -257,9 +267,9 @@
Boost 1.38 release
-Revised September 29th 2024
+Revised September 20th 2025
-© Copyright 2006-2024 Joaquín M López Muñoz.
+
© Copyright 2006-2025 Joaquín M López Muñoz.
Distributed under the Boost Software
License, Version 1.0. (See accompanying file
LICENSE_1_0.txt or copy at
diff --git a/include/boost/flyweight/detail/not_placeholder_expr.hpp b/include/boost/flyweight/detail/not_placeholder_expr.hpp
index 53271f7..4c59516 100644
--- a/include/boost/flyweight/detail/not_placeholder_expr.hpp
+++ b/include/boost/flyweight/detail/not_placeholder_expr.hpp
@@ -1,4 +1,4 @@
-/* Copyright 2006-2024 Joaquin M Lopez Munoz.
+/* Copyright 2006-2025 Joaquin M Lopez Munoz.
* 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)
@@ -13,6 +13,11 @@
#pragma once
#endif
+#include /* keep it first to prevent nasty warns in MSVC */
+#include
+#include
+#include
+
/* BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION can be inserted at the end
* of a class template parameter declaration:
* template<
@@ -26,38 +31,153 @@
* MPL invocation.
*/
-#include /* keep it first to prevent nasty warns in MSVC */
-#include
-
-#if BOOST_WORKAROUND(__GNUC__, <4)||\
- BOOST_WORKAROUND(__GNUC__,==4)&&(__GNUC_MINOR__<2)||\
- BOOST_WORKAROUND(__GNUC__, ==7)&&( __cplusplus>=201703L)||\
- BOOST_WORKAROUND(__GNUC__, >=8)&&( __cplusplus>=201103L)
-/* The default trick on which the macro is based, namely adding a int=0
- * defaulted template parameter, does not work in GCC prior to 4.2 due to
- * an unfortunate compiler non-standard extension, as explained in
- * http://lists.boost.org/boost-users/2007/07/29866.php
- * As it happens, GCC 7 in C++17 mode and GCC 8 (and presumably later) in
- * C++11 mode (and presumably later) go back to this old behavior, anticipating
- * the resolution of CWG DR 150 (see P0522R0).
- * In these cases we resort to an uglier technique, adding defaulted template
- * parameters so as to exceed BOOST_MPL_LIMIT_METAFUNCTION_ARITY.
+namespace boost{
+
+namespace flyweights{
+
+namespace detail{
+
+struct not_a_ph_expr;
+
+} /* namespace flyweights::detail */
+
+} /* namespace flyweights */
+
+} /* namespace boost */
+
+#define BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_ARG \
+(boost::flyweights::detail::not_a_ph_expr*)0
+#define BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION \
+,boost::flyweights::detail::not_a_ph_expr* = \
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_ARG
+#define BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_DEF \
+,boost::flyweights::detail::not_a_ph_expr*
+
+/* Even though, under the definition given by Boost.MPL, the inclusion of a
+ * non-type template parameter makes a class template instantiation not a
+ * placeholder expression, https://wg21.link/p0522r0, which allows
+ * template-parameters to bind ignoring default arguments, causes
+ * boost::mpl::lambda to fail to properly honor
+ * BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION (in P0552R0-compliant
+ * compilers). We fix this by specializing boost::mpl::lambda accordingly.
*/
-#include
-#include
-#include
+namespace boost{
-#define BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION \
-BOOST_PP_ENUM_TRAILING_PARAMS( \
- BOOST_MPL_LIMIT_METAFUNCTION_ARITY,typename=int BOOST_PP_INTERCEPT)
-#define BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_DEF \
-BOOST_PP_ENUM_TRAILING_PARAMS( \
- BOOST_MPL_LIMIT_METAFUNCTION_ARITY,typename BOOST_PP_INTERCEPT)
+namespace mpl{
-#else
-#define BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION ,int=0
-#define BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_DEF ,int
-#endif
+template<
+ template<
+ typename
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_DEF
+ > class F,
+ typename T1,
+ typename Tag
+>
+struct lambda<
+ F,
+ Tag
+ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<1>)
+>
+{
+ typedef false_ is_le;
+ typedef F<
+ T1,
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_ARG
+ > result_;
+ typedef result_ type;
+};
+
+template<
+ template<
+ typename,typename
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_DEF
+ > class F,
+ typename T1,typename T2,
+ typename Tag
+>
+struct lambda<
+ F,
+ Tag
+ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<2>)
+>
+{
+ typedef false_ is_le;
+ typedef F<
+ T1,T2,
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_ARG
+ > result_;
+ typedef result_ type;
+};
+
+template<
+ template<
+ typename,typename,typename
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_DEF
+ > class F,
+ typename T1,typename T2,typename T3,
+ typename Tag
+>
+struct lambda<
+ F,
+ Tag
+ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<3>)
+>
+{
+ typedef false_ is_le;
+ typedef F<
+ T1,T2,T3,
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_ARG
+ > result_;
+ typedef result_ type;
+};
+
+template<
+ template<
+ typename,typename,typename,typename
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_DEF
+ > class F,
+ typename T1,typename T2,typename T3,typename T4,
+ typename Tag
+>
+struct lambda<
+ F,
+ Tag
+ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<4>)
+>
+{
+ typedef false_ is_le;
+ typedef F<
+ T1,T2,T3,T4,
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_ARG
+ > result_;
+ typedef result_ type;
+};
+
+template<
+ template<
+ typename,typename,typename,typename,typename
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_DEF
+ > class F,
+ typename T1,typename T2,typename T3,typename T4,typename T5,
+ typename Tag
+>
+struct lambda<
+ F,
+ Tag
+ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<5>)
+>
+{
+ typedef false_ is_le;
+ typedef F<
+ T1,T2,T3,T4,T5,
+ BOOST_FLYWEIGHT_NOT_A_PLACEHOLDER_EXPRESSION_ARG
+ > result_;
+ typedef result_ type;
+};
+
+} /* namespace mpl */
+
+} /* namespace boost */
#endif