Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5475: [Foreach] rvalue reference binding of temporary ranges
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-20 15:39:09
#5475: [Foreach] rvalue reference binding of temporary ranges
--------------------------------------+-------------------------------------
Reporter: mimomorin@⦠| Owner: eric_niebler
Type: Patches | Status: assigned
Milestone: To Be Determined | Component: foreach
Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords: foreach, C++0x
--------------------------------------+-------------------------------------
Comment (by Michel Morin <mimomorin@â¦>):
OK :)
Well, I don't have access to MSVC 10, so could you compile the following
codes
and tell me what compiler error happens?
A.cpp
{{{
class my_container
{
public:
my_container()
{}
private:
int array_[5];
my_container(my_container const &);
my_container &operator =(my_container const &);
my_container(my_container &&);
my_container &operator =(my_container &&);
};
typedef my_container const const_my_container;
int main (int argc, char* argv[])
{
my_container const && x = const_my_container();
return 0;
}
}}}
B.cpp
{{{
class my_container
{
public:
my_container()
{}
// private:
int array_[5];
my_container(my_container const &);
my_container &operator =(my_container const &);
my_container(my_container &&);
my_container &operator =(my_container &&);
};
typedef my_container const const_my_container;
int main (int argc, char* argv[])
{
my_container const && x = const_my_container();
return 0;
}
}}}
Thanks in advance.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5475#comment:7> 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:07 UTC