Thread overview
What does scope do as storage class?
Dec 23
Marc
December 23
for example:

scope struct S {
  int x;
}

What does scope do here?
December 23
On Saturday, December 23, 2017 21:05:25 Marc via Digitalmars-d-learn wrote:
> for example:
>
> scope struct S {
>    int x;
> }
>
> What does scope do here?

Absolutely nothing.

https://stackoverflow.com/questions/47240714/d-pure-classes-and-structs

- Jonathan M Davis

December 23
On Saturday, 23 December 2017 at 21:20:13 UTC, Jonathan M Davis wrote:
> On Saturday, December 23, 2017 21:05:25 Marc via Digitalmars-d-learn wrote:
>> for example:
>>
>> scope struct S {
>>    int x;
>> }
>>
>> What does scope do here?
>
> Absolutely nothing.
>
> https://stackoverflow.com/questions/47240714/d-pure-classes-and-structs
>
> - Jonathan M Davis

There's one special case, though, with scope in classes - scope will force user to allocate class as a scope:

```
scope class X
{
	int x;	
}

void main()
{
	auto instance = new X;	// ERROR must be scope instance = new X;
}
```