On Thursday, 11 February 2016 at 03:47:09 UTC, Steven
Schveighoffer wrote:
Misunderstanding.
An AA under the hood is simply a pointer. Initialized to null.
When you pass it around, you are passing a pointer. AA assign
checks for null and allocates a new AA impl to hold the data.
But this does
On 2/10/16 10:10 PM, Matt Elkins wrote:
Consider the following definition of Foo and an accompanying unittest:
[code]
struct Foo
{
@property int[int] aa() {return m_aa;}
@property ref int[int] aaRef() {return m_aa;}
int[int] m_aa;
}
unittest
{
Foo foo;
assert(5 !in foo.
Consider the following definition of Foo and an accompanying
unittest:
[code]
struct Foo
{
@property int[int] aa() {return m_aa;}
@property ref int[int] aaRef() {return m_aa;}
int[int] m_aa;
}
unittest
{
Foo foo;
assert(5 !in foo.m_aa); // Sanity-check to start off
foo.a