Re: Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread H. S. Teoh via Digitalmars-d
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

Re: Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread Johan Engelen via Digitalmars-d
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

Re: Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread H. S. Teoh via Digitalmars-d
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

Re: Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread Basile B. via Digitalmars-d
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

Re: Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread H. S. Teoh via Digitalmars-d
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;} //

Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread Basile B. via Digitalmars-d
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