Opened 9 years ago

#9362 new Bugs

Non-const operator() don't compile

Reported by: Andrey Semashev Owned by: Thomas Heller
Milestone: To Be Determined Component: phoenix
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description

Using phoenix::bind with a user-defined function object with non-const operator() results in compile errors, even though the operator could be called. It seems that at some point Boost.Phoenix adds const qualifier to the bound function which results in compilation failure either when result_of is invoked (in C++11), or when the function object is called (in C++03).

I've attached a test case and compilation errors from GCC 4.8.1 in C++03 and C++11 modes.

Attachments (3)

phoenix_non_const.cpp (280 bytes ) - added by Andrey Semashev 9 years ago.
A test case to reproduce the problem.
phoenix_non_const_cxx03.txt (10.6 KB ) - added by Andrey Semashev 9 years ago.
GCC 4.8.1 errors in C++03 mode.
phoenix_non_const_cxx11.txt (138.4 KB ) - added by Andrey Semashev 9 years ago.
GCC 4.8.1 errors in C++11 mode.

Download all attachments as: .zip

Change History (3)

by Andrey Semashev, 9 years ago

Attachment: phoenix_non_const.cpp added

A test case to reproduce the problem.

by Andrey Semashev, 9 years ago

Attachment: phoenix_non_const_cxx03.txt added

GCC 4.8.1 errors in C++03 mode.

by Andrey Semashev, 9 years ago

Attachment: phoenix_non_const_cxx11.txt added

GCC 4.8.1 errors in C++11 mode.

Note: See TracTickets for help on using tickets.