You're right it did define two functions
same signature and no compile error, heh
On Sat, 22 Dec 2018 21:33:14 +, Dru wrote:
> The first example shows that it is possible to deprecate a function
> separately from it's definition.
No, it doesn't. You declared two *different* functions. One was
deprecated; the other wasn't.
> I want to know if it is possible to "fix" the se
I recently required a function to return an input range over some
base element type E. I was under the impression that this is
exactly what the interfaces in std.range.interface are for but
found that these are more restrictive than the checks from
std.range.primitives.
In particular, isInput
If I want to include the class type (TypeInfo) inside a class
instance hash, is the following snippet a good `@safe pure
nothrow @nogc`-solution?:
import core.internal.hash : hashOf;
/** Hash that distinguishes `Expr(X)` from `NounExpr(X)`. */
hash_t hashOfPolymorphic(Class)(Class aClassInsta
Thanks for the reply
I will try to explain what I mean:
The first example shows that it is possible to deprecate a
function separately from it's definition.
The second example tries the same for a member function but it
fails with a compile error.
I want to know if it is possible to "fix"
On Sat, 22 Dec 2018 18:55:47 +, Dru wrote:
> I would like to use "deprecated" on a member function, but do it from a
> separate file
>
> this works:
> ///
> void func() {}
>
> deprecated {
>void func();
> }
You're defining two functions, presumably in two different modules and
with two
Hi,
I would like to use "deprecated" on a member function, but do it
from a separate file
this works:
///
void func() {}
deprecated {
void func();
}
this doesn't work:
class C{
void func() {}
}
deprecated {
void C.func();
}
I get: Error: semicolon expected, not .
Thank
On Saturday, 22 December 2018 at 10:11:23 UTC, bauss wrote:
On Saturday, 22 December 2018 at 03:44:09 UTC, Timoses wrote:
Awesome hack!
Being a hack, it would be even nicer if it worked ouf of the
box:
mixin template foo(bool b)
{
int _impl() { writeln(b); return int.init; }
On Saturday, 22 December 2018 at 03:44:09 UTC, Timoses wrote:
Awesome hack!
Being a hack, it would be even nicer if it worked ouf of the
box:
mixin template foo(bool b)
{
int _impl() { writeln(b); return int.init; }
int _ipml2 = _impl();
}
vs
mixin template f
Thanks, Dennis and H.S. for the well-thought-out and
comprehensive replies.
On Saturday, 22 December 2018 at 03:44:09 UTC, Timoses wrote:
On Wednesday, 19 December 2018 at 15:40:50 UTC, Neia Neutuladh
wrote:
On Wed, 19 Dec 2018 15:12:14 +, bauss wrote:
Or while instantiating it:
mixin template foo()
{
int _ignoreme()
{
if (readln.strip == "abort") throw new
On Friday, 21 December 2018 at 22:31:26 UTC, Steven Schveighoffer
wrote:
On 12/21/18 3:41 PM, Giovanni Di Maria wrote:
[...]
Note: alloca is a builtin intrinsic, so I wouldn't use that as
a function name. Don't think it's affecting your program, but I
wanted to point that out.
[...]
Th
12 matches
Mail list logo