Ticket #11226: let_testcase.cpp

File let_testcase.cpp, 450 bytes (added by edaskel@…, 8 years ago)

Test case illustrating compile failure for void result type

Line 
1#include <iostream>
2#include <boost/phoenix.hpp>
3
4int main() {
5 using boost::phoenix::let;
6 using boost::phoenix::val;
7 using boost::phoenix::ref;
8 using boost::phoenix::construct;
9 using namespace boost::phoenix::local_names;
10
11 int i = 0;
12
13 let(_a = val(i))[
14 _a++,
15 ref(i) = _a,
16 std::cout << "i is now " << ref(i) << std::endl,
17 construct<void>() // contrived void return type
18 ]();
19
20
21}
22