Pastes with template tag

 

# Paste Title Author Source
1 #6436074e Expression template example dejan
// Original D NG thread:
// http://forum.dlang.org/post/tgpauqzbjiheqmxurzwr@forum.dlang.org

/* RUS
2 #5155ab21 template alias parameter dejan
module main;

import std.stdio : writeln;

void F(alias f) (string x, string y)
{
	f(x, y);
}

void 
3 #8f9474b4 Mapping variadic template arguments in D dejan
/+
 | Andrej Mitrovic's code from the following thread:
 |
 | http://stackoverflow.com/a/12926873/87
4 #e7a846ef ParticlePeter - Template instance dejan
import std.stdio;

struct Key( T )  {

	this( float t , T v )  {
		time = t ;
		value = v ;
	}

	flo
5 #f0e57784 Meta template dejan
// Source: http://dlang.org/cpptod.html

import std.stdio; 

template Integer(int nbits) { 
  static
6 #4049b24c Get all fields dejan
module test;

class Experiment
{
	class Nested
	{
	}
	
	Nested nested;
	int plain;
	void delegate() 
7 #4fc6add5 Omissible Function Parameters Xinok
import std.stdio;

// Considering the fact that tuples automatically unpack at the site of a functio
8 #07a75697 Pragma with template dejan
import std.stdio;

template Foo(string s) {
  string str() { return s ~ " :)"; }
}

int main() {
  p
9 #b9600b857e97 Guest
import std.typecons;
import std.stdio;

void main()
{
	class A
	{
		this() { writeln("Hello, world!"