Ticket #9363: phoenix_non_const_ref.cpp

File phoenix_non_const_ref.cpp, 338 bytes (added by Andrey Semashev, 9 years ago)

A test case to reproduce the problem.

Line 
1#include <boost/ref.hpp>
2#include <boost/phoenix.hpp>
3
4struct my_func
5{
6 typedef void result_type;
7
8 void operator() (int& n) const
9 {
10 ++n;
11 }
12};
13
14void foo(int& n)
15{
16 my_func f;
17 boost::phoenix::bind(f, boost::phoenix::placeholders::_1)(n);
18}
19
20int main(int, char*[])
21{
22 int n = 0;
23 foo(n);
24 return n;
25}