On 09/10/2012 02:49 AM, monarch_dodra wrote:
On Sunday, 9 September 2012 at 23:54:45 UTC, Jonathan M Davis
wrote:
[SNIP]
the default assignment operator illegal. You could overload it, and as
long as
it doesn't touch any of the const member variables, it would work, but
the
const member
On Tuesday, 11 September 2012 at 09:00:15 UTC, Ali Çehreli wrote:
On 09/10/2012 02:49 AM, monarch_dodra wrote:
On Sunday, 9 September 2012 at 23:54:45 UTC, Jonathan M Davis
wrote:
[SNIP]
the default assignment operator illegal. You could overload
it, and as
long as
it doesn't touch any
On 2012-09-10 02:05, Namespace wrote:
I had never problems with that in C++.
If I have members which are const because they are assigned only one
time and needs no other assignment, why should I declare this member not
as const?
In the example I know exactly that I assign only one time a name
On Monday, September 10, 2012 09:13:04 Jacob Carlborg wrote:
On 2012-09-10 02:05, Namespace wrote:
I had never problems with that in C++.
If I have members which are const because they are assigned only one
time and needs no other assignment, why should I declare this member not
as const?
On 2012-09-10 09:24, Jonathan M Davis wrote:
And it works just fine in D2. It's const that's the problem. In general, if you
want a member variable to be read-only on a struct, I'd strongly advise
using a getter property without a setter property rather than making it const,
because const makes
On Monday, September 10, 2012 09:30:59 Jacob Carlborg wrote:
On 2012-09-10 09:24, Jonathan M Davis wrote:
And it works just fine in D2. It's const that's the problem. In general,
if you want a member variable to be read-only on a struct, I'd strongly
advise using a getter property without a
On Sunday, 9 September 2012 at 23:54:45 UTC, Jonathan M Davis
wrote:
[SNIP]
the default assignment operator illegal. You could overload it,
and as long as
it doesn't touch any of the const member variables, it would
work, but the
const member variable is stuck as it is, and anything trying
On Monday, September 10, 2012 11:49:48 monarch_dodra wrote:
It appears that when writting:
tests[4] = Test(Foobar);
It *looks* like compiler is eliding the opAssign/CC completely,
opting for a bit copy, which is illegal.
As I believe was mentioned elsewhere in this thread, that's due to
On Monday, 10 September 2012 at 09:54:46 UTC, Jonathan M Davis
wrote:
On Monday, September 10, 2012 11:49:48 monarch_dodra wrote:
It appears that when writting:
tests[4] = Test(Foobar);
It *looks* like compiler is eliding the opAssign/CC completely,
opting for a bit copy, which is illegal.
As
On Saturday, 8 September 2012 at 23:18:14 UTC, Timon Gehr wrote:
On 09/09/2012 01:16 AM, Namespace wrote:
Why fail this code?
without const on Name it works fine.
http://dpaste.dzfl.pl/9fa0986a
const fields cannot be written to. This includes the case when
the
entire struct is written to
On Saturday, 8 September 2012 at 23:18:14 UTC, Timon Gehr wrote:
On 09/09/2012 01:16 AM, Namespace wrote:
Why fail this code?
without const on Name it works fine.
http://dpaste.dzfl.pl/9fa0986a
const fields cannot be written to. This includes the case when
the
entire struct is written to
On 09/09/2012 08:09 AM, Namespace wrote:
On Saturday, 8 September 2012 at 23:18:14 UTC, Timon Gehr wrote:
On 09/09/2012 01:16 AM, Namespace wrote:
Why fail this code?
without const on Name it works fine.
http://dpaste.dzfl.pl/9fa0986a
const fields cannot be written to. This includes the
On Sunday, September 09, 2012 17:09:23 Namespace wrote:
On Saturday, 8 September 2012 at 23:18:14 UTC, Timon Gehr wrote:
On 09/09/2012 01:16 AM, Namespace wrote:
Why fail this code?
without const on Name it works fine.
http://dpaste.dzfl.pl/9fa0986a
const fields cannot be written
I had never problems with that in C++.
If I have members which are const because they are assigned only
one time and needs no other assignment, why should I declare this
member not as const?
In the example I know exactly that I assign only one time a name
to this struct, so why I should not
On Monday, September 10, 2012 02:05:08 Namespace wrote:
I had never problems with that in C++.
If I have members which are const because they are assigned only
one time and needs no other assignment, why should I declare this
member not as const?
In the example I know exactly that I assign
On 09/10/2012 02:05 AM, Namespace wrote:
I had never problems with that in C++.
clang++ sez:
error: cannot define the implicit default assignment operator for 'S',
because non-static const member 'x' can't use default assignment operator
If I have members which are const because they are
Why fail this code?
without const on Name it works fine.
http://dpaste.dzfl.pl/9fa0986a
On 09/09/2012 01:16 AM, Namespace wrote:
Why fail this code?
without const on Name it works fine.
http://dpaste.dzfl.pl/9fa0986a
const fields cannot be written to. This includes the case when the
entire struct is written to at once.
18 matches
Mail list logo