mirror of
https://github.com/boostorg/lambda2.git
synced 2025-05-12 14:11:40 +00:00
Define own placeholders to avoid lookup problems
This commit is contained in:
parent
82820de89d
commit
b65381daef
@ -18,6 +18,40 @@ namespace boost
|
|||||||
namespace lambda2
|
namespace lambda2
|
||||||
{
|
{
|
||||||
|
|
||||||
|
template<int I> struct lambda2_arg
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(__cpp_inline_variables) && __cpp_inline_variables >= 201606L
|
||||||
|
# define BOOST_LAMBDA2_INLINE_VAR inline
|
||||||
|
#else
|
||||||
|
# define BOOST_LAMBDA2_INLINE_VAR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<1> _1;
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<2> _2;
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<3> _3;
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<4> _4;
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<5> _5;
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<6> _6;
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<7> _7;
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<8> _8;
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<9> _9;
|
||||||
|
|
||||||
|
#undef BOOST_LAMBDA2_INLINE_VAR
|
||||||
|
|
||||||
|
} // namespace lambda2
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
template<int I> struct std::is_placeholder< boost::lambda2::lambda2_arg<I> >: std::integral_constant<int, I>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace boost
|
||||||
|
{
|
||||||
|
namespace lambda2
|
||||||
|
{
|
||||||
|
|
||||||
namespace lambda2_detail
|
namespace lambda2_detail
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -71,8 +105,6 @@ BOOST_LAMBDA2_BINARY_LAMBDA(|, std::bit_or<>)
|
|||||||
BOOST_LAMBDA2_BINARY_LAMBDA(^, std::bit_xor<>)
|
BOOST_LAMBDA2_BINARY_LAMBDA(^, std::bit_xor<>)
|
||||||
BOOST_LAMBDA2_UNARY_LAMBDA(~, std::bit_not<>)
|
BOOST_LAMBDA2_UNARY_LAMBDA(~, std::bit_not<>)
|
||||||
|
|
||||||
using namespace std::placeholders;
|
|
||||||
|
|
||||||
} // namespace lambda2
|
} // namespace lambda2
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user