Is it possible to create boost phoenix lazy variant of std::make_shared
? I mean, to make possible something like
namespace p = boost::phoenix;
...
expr = custom_parser[_a=p::make_shared<Node>(_1,_2,_3)] >> ...
One cannot use BOOST_PHOENIX_ADAPT_FUNCTION
because of variadic template nature of std::make_shared
. So, probably wrapper should be variadic template itself, if it is possible to write one.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…