www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Is this a ctfe bugs ? ref scope const(ubyte)[32]

reply d007 <d007 gmail.com> writes:
```d
extern(C) int test(ref scope const(ubyte)[32] b);
```

This will automatic become this in ctfe relection

```d
extern(C) int test(ref scope const(ubyte[32]) b);
```

LDC2 1.34.0 DMD v2.104.2
Sep 06 2023
parent reply Adam D Ruppe <destructionator gmail.com> writes:
On Wednesday, 6 September 2023 at 12:04:40 UTC, d007 wrote:
 extern(C) int test(ref scope const(ubyte)[32] b);
 extern(C) int test(ref scope const(ubyte[32]) b);
These are the same thing since the ref cannot be rebound anyway; a static array just is its contents.
Sep 06 2023
parent d007 <d007 gmail.com> writes:
On Wednesday, 6 September 2023 at 12:15:02 UTC, Adam D Ruppe 
wrote:
 On Wednesday, 6 September 2023 at 12:04:40 UTC, d007 wrote:
 extern(C) int test(ref scope const(ubyte)[32] b);
 extern(C) int test(ref scope const(ubyte[32]) b);
These are the same thing since the ref cannot be rebound anyway; a static array just is its contents.
thanks for explain
Sep 06 2023