Subject: [Boost-bugs] [Boost C++ Libraries] #6848: ref doesn't work with noncopyable object
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-01 06:12:23
#6848: ref doesn't work with noncopyable object
------------------------------------------------------+---------------------
Reporter: Maxim Yanchenko <Maxim.Yanchenko@â¦> | Owner: theller
Type: Bugs | Status: new
Milestone: To Be Determined | Component: phoenix
Version: Boost 1.49.0 | Severity: Problem
Keywords: |
------------------------------------------------------+---------------------
the following code fails to compile with both boost 1.47 and 1.49 (GCC
4.4.4):
{{{
#include <boost/phoenix.hpp>
class A
{
A(const A&);
A& operator=(const A&);
public:
A() {}
const A& operator<<(const char *p) const
{
return *this;
}
} g_a;
int main()
{
( boost::phoenix::ref(g_a) << boost::phoenix::placeholders::_1
)("test");
}
}}}
error: 'A::A(const A&)' is private
Btw, it also doesn't work with boost::lambda::var, in the same manner.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6848> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC