On Thu, Jun 07, 2018 at 05:02:09PM +, Johan Engelen via Digitalmars-d wrote:
> On Thursday, 7 June 2018 at 15:18:49 UTC, H. S. Teoh wrote:
> >
> > Now all you have to do is to add operator overloading to make the
> > wrapper type infectious, and a convenience function that can be
> > easily
On Thursday, 7 June 2018 at 15:18:49 UTC, H. S. Teoh wrote:
Now all you have to do is to add operator overloading to make
the wrapper type infectious, and a convenience function that
can be easily typed, and you get:
[...]
I'd like to have this in the stdlib, what are the chances?
-Johan
On Thu, Jun 07, 2018 at 03:52:10PM +, Basile B. via Digitalmars-d wrote:
> On Thursday, 7 June 2018 at 15:18:49 UTC, H. S. Teoh wrote:
> > On Thu, Jun 07, 2018 at 01:42:17PM +, Basile B. via Digitalmars-d
> > wrote:
> > > [...]
> > [...]
> >
> > You're on the right track. Now all you have
On Thursday, 7 June 2018 at 15:18:49 UTC, H. S. Teoh wrote:
On Thu, Jun 07, 2018 at 01:42:17PM +, Basile B. via
Digitalmars-d wrote:
[...]
[...]
You're on the right track. Now all you have to do is to add
operator overloading to make the wrapper type infectious, and a
convenience
On Thu, Jun 07, 2018 at 01:42:17PM +, Basile B. via Digitalmars-d wrote:
> I don't know if this is a bug but this works:
>
> ```
> module runnable;
>
> struct Byte { byte value; alias value this;}
>
> void main()
> {
> {Byte b; auto c = ~b;} // no message
> {byte b; auto c = ~b;} //
I don't know if this is a bug but this works:
```
module runnable;
struct Byte { byte value; alias value this;}
void main()
{
{Byte b; auto c = ~b;} // no message
{byte b; auto c = ~b;} // deprecation...
}
```
---
Baz