On 01.03.2016 14:35, Andrea Fontana wrote:
This very very simple function [1] won't compile.
It says that param t is not nothrow. Why? What's wrong with this?
http://dpaste.dzfl.pl/bfc382e62711
It's a bug. Lazy parameters generate delegates. nothrow is currently not
inferred for those delegat
On Tuesday, 1 March 2016 at 13:35:08 UTC, Andrea Fontana wrote:
This very very simple function [1] won't compile.
It says that param t is not nothrow. Why? What's wrong with
this?
http://dpaste.dzfl.pl/bfc382e62711
writeln isn't nothrow so you can't call it from test which is
nothrow withou
This very very simple function [1] won't compile.
It says that param t is not nothrow. Why? What's wrong with this?
http://dpaste.dzfl.pl/bfc382e62711
On Tuesday, 1 March 2016 at 09:32:20 UTC, Andrea Fontana wrote:
Maybe you should look for "hamming weight" :)
maybe. and here is a snowman for you: ☃
the question was if it exists for BitArray in phobos.
https://issues.dlang.org/show_bug.cgi?id=10239 so apparently its
really missing in phobos
On Tuesday, 1 March 2016 at 09:03:47 UTC, yawniek wrote:
i figured i can count the number of bits set for a BitArray
with std.algorithm : count:
BitArray([0,0,1]).bitsSet.count()
but this seems not very optimal, is there a faster way directly
accessible trough phobos?
ideally something that
i figured i can count the number of bits set for a BitArray with
std.algorithm : count:
BitArray([0,0,1]).bitsSet.count()
but this seems not very optimal, is there a faster way directly
accessible trough phobos?
ideally something that is optimized by the compiler.
On Tuesday, 1 March 2016 at 08:53:20 UTC, Adrian Matoga wrote:
static if (is(Q : T)) {
Oops, should be T : Q
On Tuesday, 1 March 2016 at 05:05:40 UTC, Jack Stouffer wrote:
In Python, I can do this:
my_obj = Obj()
string_from_func = func()
setattr(my_obj, string_from_func, 100)
Say func() returns "member1" or "member2", the setattr would
then set either one of those to 100.
Is there any
On Tuesday, 1 March 2016 at 05:05:40 UTC, Jack Stouffer wrote:
In Python, I can do this:
my_obj = Obj()
string_from_func = func()
setattr(my_obj, string_from_func, 100)
Say func() returns "member1" or "member2", the setattr would
then set either one of those to 100.
Is there any
On Monday, 29 February 2016 at 22:40:41 UTC, Chris Katko wrote:
On Monday, 29 February 2016 at 22:12:37 UTC, jmh530 wrote:
On Monday, 29 February 2016 at 19:02:27 UTC, Chris Katko wrote:
Hello. Dlang newbie here.
,,,
I'm confused. Both posts appear to be for linking... D to C++
DLLs. I want
10 matches
Mail list logo