mirror of
https://github.com/boostorg/utility.git
synced 2025-05-11 13:24:02 +00:00
Fix Ticket 12140; mark only single-arg ctor as explicit. Thanks to Thimo for the patch.
This commit is contained in:
parent
287844fe76
commit
181f302ee4
@ -47,11 +47,11 @@
|
|||||||
// {}
|
// {}
|
||||||
// This macro should only persist within this file.
|
// This macro should only persist within this file.
|
||||||
|
|
||||||
#define BOOST_PRIVATE_CTR_DEF( z, n, data ) \
|
#define BOOST_PRIVATE_CTR_DEF( z, n, data ) \
|
||||||
template < BOOST_PP_ENUM_PARAMS(n, typename T) > \
|
template < BOOST_PP_ENUM_PARAMS(n, typename T) > \
|
||||||
explicit base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) ) \
|
base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) ) \
|
||||||
: member( BOOST_PP_ENUM_PARAMS(n, x) ) \
|
: member( BOOST_PP_ENUM_PARAMS(n, x) ) \
|
||||||
{} \
|
{} \
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
|
|
||||||
@ -142,7 +142,8 @@ protected:
|
|||||||
: member()
|
: member()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY),
|
template < typename T0 > explicit base_from_member( T0 x0 ) : member( x0 ) {}
|
||||||
|
BOOST_PP_REPEAT_FROM_TO( 2, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY),
|
||||||
BOOST_PRIVATE_CTR_DEF, _ )
|
BOOST_PRIVATE_CTR_DEF, _ )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user