Is there a way to do this?
import std.algorithm;
auto fun(T)(T a){return a;}
template fun2(T){auto fun2(T a){return fun(a);}}//OK but heavy syntax and
cannot be nested inside test()
void main(){
//alias fun2=fun!int; //OK but needs to specify template params
//none of those work:
//alias
On Thursday, 5 June 2014 at 00:33:26 UTC, Ali Çehreli wrote:
On 06/04/2014 05:05 PM, Robert Hathaway wrote:
I've got a program that reads a text file line by line (using
std.stdio
readln())
Consider using byLine() instead. (Important: byLine uses an
internal buffer for the line; so, don't fo
On 06/04/2014 05:05 PM, Robert Hathaway wrote:
I've got a program that reads a text file line by line (using std.stdio
readln())
Consider using byLine() instead. (Important: byLine uses an internal
buffer for the line; so, don't forget to make a copy if you want to
store the line for later us
I've got a program that reads a text file line by line (using
std.stdio readln()) and I'd like to refer to the line number when
I send a message to stderr upon finding a mis-formatted line. Is
there a way to get the current line number? Of course, I could
create a counter and increment it wit
I have the following code (on dpaste,
http://dpaste.dzfl.pl/636c04430a33):
enum : uint { a, b, c }
enum list = [a, b];
void foo(T...)()
{
pragma(msg, T[0].length); // fine
pragma(msg, T[0][0]); // fine
pragma(msg, T[0][1]); // fine
foreach(i; Iota!(0,T[0].length)) // fi
I take it the output looks something like this:
struct S {
int a;
}
S s;
s.a = 3;
void main() {
}
Hope this clears up this next problem. Module scope doesn't get
to utilize a variable, it can only initialize at compile-time.
On Saturday, 31 May 2014 at 23:27:45 UTC, Qox wrote:
On Saturday, 31 May 2014 at 07:57:18 UTC, Kagamin wrote:
http://www.xomb.org/ ?
seems to be outdated, but its another OS written in D.
It's dead for only a year, the developer have probably graduated.
LLVM never supported OMF. LDC uses msvcrt runtime, and MS claims
that whatever can link with msvcrt, it also can link with later
versions of msvcrt.
On Wednesday, 4 June 2014 at 00:07:35 UTC, Jesse Phillips wrote:
On Tuesday, 3 June 2014 at 22:10:06 UTC, bioinfornatics wrote:
I do not see why it fail in debug output we see that tuple
have a
field with given name.
Your generated output (short and formatted)
alias TL = Tuple!(int,"x",
On Wed, 04 Jun 2014 06:25:53 +
Steve D via Digitalmars-d-learn
wrote:
> You would think the promise of OO and Inheritance
> would make it easy and free us from hacks like this ;)
That would require using OO and inheritance, which has nothing to do with
Tuple. ;)
And actually, I find that I
On Wednesday, 4 June 2014 at 00:07:35 UTC, Jesse Phillips wrote:
On Tuesday, 3 June 2014 at 22:10:06 UTC, bioinfornatics wrote:
I do not see why it fail in debug output we see that tuple
have a
field with given name.
Your generated output (short and formatted)
alias TL = Tuple!(int,"x",
11 matches
Mail list logo