Roman Kononov writes:
> 2010-11-30 15:13 CST, Gabriel Dos Reis
> said:
>>On Tue, Nov 30, 2010 at 3:11 PM, Roman Kononov wrote:
>>> I exactly want to be unable to change an object during its lifetime
>>> except when it is moved-and-destroyed.
>>
>>isn't that a question for C++ forums?
>
> I hope
On 30 November 2010 21:45, Gabriel Dos Reis wrote:
> On Tue, Nov 30, 2010 at 3:34 PM, Roman Kononov wrote:
>> 2010-11-30 21:20 CST, Jonathan Wakely said:
>>>We do. The point is your question is off-topic on this list, because
>>>you are complaining about the C++0x language, which as far as we kno
On Tue, Nov 30, 2010 at 3:34 PM, Roman Kononov wrote:
> 2010-11-30 21:20 CST, Jonathan Wakely said:
>>We do. The point is your question is off-topic on this list, because
>>you are complaining about the C++0x language, which as far as we know
>>GCC implements correctly. If you don't like the lan
2010-11-30 21:20 CST, Jonathan Wakely said:
>We do. The point is your question is off-topic on this list, because
>you are complaining about the C++0x language, which as far as we know
>GCC implements correctly. If you don't like the language, complain
>somewhere else.
>
Then please tell me whic
On 30 November 2010 21:18, Roman Kononov wrote:
> 2010-11-30 15:13 CST, Gabriel Dos Reis
> said:
>>On Tue, Nov 30, 2010 at 3:11 PM, Roman Kononov wrote:
>>> I exactly want to be unable to change an object during its lifetime
>>> except when it is moved-and-destroyed.
>>
>>isn't that a question f
2010-11-30 15:13 CST, Gabriel Dos Reis
said:
>On Tue, Nov 30, 2010 at 3:11 PM, Roman Kononov wrote:
>> I exactly want to be unable to change an object during its lifetime
>> except when it is moved-and-destroyed.
>
>isn't that a question for C++ forums?
I hoped you knew the answer. :)
On Tue, Nov 30, 2010 at 3:11 PM, Roman Kononov wrote:
> 2010-11-30 13:03 CST, James Dennett said:
>>
>>If you want to be able to change an object during its lifetime, don't
>>make it const.
>
> I exactly want to be unable to change an object during its lifetime
> except when it is moved-and-destr
On Tue, Nov 30, 2010 at 3:02 PM, Roman Kononov wrote:
>>2) define a copy constructor, explicitly-defaulted if you wish.
>
> What if the copy constructor is too expensive and I have to use move
> constructor?
the discussion would be less confused if you identify clearly the
language semantics (as
2010-11-30 13:03 CST, James Dennett said:
>
>If you want to be able to change an object during its lifetime, don't
>make it const.
I exactly want to be unable to change an object during its lifetime
except when it is moved-and-destroyed.
Thanks
On Tue, Nov 30, 2010 at 2:53 PM, Roman Kononov wrote:
> 2010-11-30 20:40 CST, Jonathan Wakely said:
>>On 30 November 2010 20:33, Roman Kononov wrote:
>>> $ cat test1.cc
>>> struct X {
>>> X()=default;
>>> X(X&&)=default;
>>> X(X const&)=delete;
>>> //some very large or non-copyable content
>>
On Tue, Nov 30, 2010 at 12:53 PM, Roman Kononov wrote:
> 2010-11-30 20:40 CST, Jonathan Wakely said:
>>However, that doesn't change the fact you're trying to move from a
>>const object, which is obviously wrong.
>
> Not really, because the 2 const objects are about to be destroyed.
The fact that
2010-11-30 20:46 CST, Jonathan Wakely said:
>On 30 November 2010 20:40, Jonathan Wakely wrote:
>>> $ cat test1.cc
>>> struct X {
>>> X()=default;
>>> X(X&&)=default;
>>> X(X const&)=delete;
>>> //some very large or non-copyable content
>>> };
>>>
>>> X test() {
>>> X const x={};
>>> {
>>>
2010-11-30 20:40 CST, Jonathan Wakely said:
>On 30 November 2010 20:33, Roman Kononov wrote:
>> $ cat test1.cc
>> struct X {
>> X()=default;
>> X(X&&)=default;
>> X(X const&)=delete;
>> //some very large or non-copyable content
>> };
>>
>> X test() {
>> X const x={};
>> {
>> //a lot of co
On 30 November 2010 20:40, Jonathan Wakely wrote:
> On 30 November 2010 20:33, Roman Kononov wrote:
>> This is related to http://gcc.gnu.org/ml/gcc/2010-11/msg00623.html
>>
>> I write about it again because the following seems too bad:
>>
>> $ cat test1.cc
>> struct X {
>> X()=default;
>> X(X&&)=
On 30 November 2010 20:33, Roman Kononov wrote:
> This is related to http://gcc.gnu.org/ml/gcc/2010-11/msg00623.html
>
> I write about it again because the following seems too bad:
>
> $ cat test1.cc
> struct X {
> X()=default;
> X(X&&)=default;
> X(X const&)=delete;
> //some very large or non-
This is related to http://gcc.gnu.org/ml/gcc/2010-11/msg00623.html
I write about it again because the following seems too bad:
$ cat test1.cc
struct X {
X()=default;
X(X&&)=default;
X(X const&)=delete;
//some very large or non-copyable content
};
X test() {
X const x={};
{
//a l
16 matches
Mail list logo