Skip to content

Instantly share code, notes, and snippets.

@dnadlinger
Created May 27, 2009 22:14
Show Gist options
  • Save dnadlinger/118944 to your computer and use it in GitHub Desktop.
Save dnadlinger/118944 to your computer and use it in GitHub Desktop.
module Main;
struct Struct {
static Struct opCall( float value ) {
Struct newStruct;
newStruct.value = value;
return newStruct;
}
Struct method() {
return *this;
}
float value;
}
template Template( float value ) {
const CONST_STRUCT = Struct( value ).method();
}
void main( char[][] args ) {
alias Template!( 1 ) foo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment