```
void bar()
{
throw new Exception("");
}
void foo() nothrow
{
scope(failure) {}
bar();
}
void main() {}
```
Doesn't compile with 2.066:
```
source/app.d(9): Error: 'app.bar' is not nothrow
source/app.d(6): Error: function 'app.foo' is nothrow yet may
throw
```
On Sunday, 6 July 2014 at 13:04:35 UTC, Marc Schütz wrote:
On Sunday, 6 July 2014 at 12:31:42 UTC, NCrashed wrote:
```
void bar()
{
throw new Exception("");
}
void foo() nothrow
{
scope(failure) {}
bar();
}
void main() {}
```
Doesn't compile with 2.066:
```
source/app.
I am using ranges (wrapped in InputRangeObject for use in
interfaces) of shared objects, with new beta some cases are
broken:
```
import std.range;
class A {}
InputRange!(shared A) foo()
{
return [new A].inputRangeObject;
}
void bar()
{
auto res = foo.array;
}
void main() {}
On Monday, 7 July 2014 at 15:34:33 UTC, Meta wrote:
On Monday, 7 July 2014 at 09:53:22 UTC, NCrashed wrote:
I am using ranges (wrapped in InputRangeObject for use in
interfaces) of shared objects, with new beta some cases are
broken:
```
import std.range;
class A {}
InputRange!(shared A) foo
This was working under 2.065:
```
import std.container;
void main()
{
DList!int list;
list.clear();
}
```
Run-time assertion:
```
core.exception.AssertError@/usr/include/dmd/phobos/std/container/dlist.d(480):
Cannot remove from an un-initialized List
/home/ncra
On Tuesday, 8 July 2014 at 13:06:34 UTC, NCrashed wrote:
This was working under 2.065:
```
import std.container;
void main()
{
DList!int list;
list.clear();
}
```
Run-time assertion:
```
core.exception.AssertError@/usr/include/dmd/phobos/std/container/dlist.d(480):
Cannot remov
On Tuesday, 8 July 2014 at 13:07:57 UTC, Meta wrote:
On Tuesday, 8 July 2014 at 12:42:44 UTC, NCrashed wrote:
Oops, I forgot shared at new. But the major issue is that
doesn't fix the problem:
```
import std.range;
class A {}
InputRange!(shared A) foo()
{
return [new shared A].inputRa
Try this:
```
import std.typecons;
import std.typetuple;
import std.math;
import std.stdio;
auto tie(StoreElements...)(ref StoreElements stores)
{
alias Elements = staticMap!(Unqual, StoreElements);
template toPointer(T)
{
alias toPointer = T*;
}
struct Holder
{
alias StoreElementsPtrs = staticM
On Tuesday, 8 July 2014 at 17:42:00 UTC, Remo wrote:
How to make something that work like std::tie in D2 ?
Tuple!(float, float) sinCos(float n) {
return tuple(cast(float)sin(n), cast(float)cos(n)); //please
note cast(float)!
}
int main(string[] argv) {
float s,c;
tie!(s,c) = sinCos(3.0f)
Sorry, some glitch with email answer.
The main difference between my solution and TypeTuple is that you
can pass anonymous struct between other functions to use it later:
```
void foo(T)(T holder)
{
holder = sinCos(3.0f);
}
void main()
{
float s,c;
foo(tie(s,c));
On Wednesday, 9 July 2014 at 10:57:33 UTC, Larry wrote:
Hello,
I extracted a part of my code written in c.
it is deliberately useless here but I would understand the
different technics to optimize such kind of code with gdc
compiler.
it currently runs under a microsecond.
Constraint : the w
On Wednesday, 9 July 2014 at 20:04:47 UTC, Maxime
Chevalier-Boisvert wrote:
auto members = [__traits(allMembers, "ir.ir")];
pragma(msg, members);
Have you tried without quotes?
pragma(msg, __traits(allMembers, ir.ir));
On Wednesday, 9 July 2014 at 20:07:57 UTC, NCrashed wrote:
Produces:
ir/iir.d(85): Error: argument has no members
If module name is ir.iir: pragma(msg, __traits(allMembers,
ir.iir));
On Thursday, 10 July 2014 at 15:36:53 UTC, francesco cattoglio
wrote:
A code I'm working on stops working and starts printing an
infinite loop of
core.exception.InvalidMemoryOperationError
to the command line output. The code is quite complex and the
bug seems to present itself almost in random
14 matches
Mail list logo