mirror of
https://github.com/boostorg/phoenix.git
synced 2026-02-19 14:42:14 +00:00
19 lines
502 B
C++
19 lines
502 B
C++
#include <boost/phoenix.hpp>
|
|
#include <boost/range/as_literal.hpp>
|
|
#include <boost/detail/lightweight_test.hpp>
|
|
|
|
using namespace boost::phoenix::placeholders;
|
|
using namespace boost::phoenix;
|
|
|
|
int main()
|
|
{
|
|
char X('x'), Y ;
|
|
find(boost::as_literal("fox"), 'x')(); // works
|
|
#ifndef BOOST_NO_CXX11_DECLTYPE
|
|
Y = find(boost::as_literal("fox"), arg1)('x'); // works for C++11
|
|
#else
|
|
Y = find(boost::as_literal("fox"), construct<char>(arg1))('x'); // works
|
|
#endif
|
|
BOOST_TEST(X==Y);
|
|
}
|