文字列リテラルをテンプレート引数で渡したい - Faith and Brave - C++で遊ぼう
class Hoge(string s){ immutable string str = s; } alias Hoge!("hello") HogeHello; enum e = HogeHello.str; // コンパイル時に取得できます void main(){}
アキラさんはD言語でできても嬉しくないけど!
文字列リテラルをテンプレート引数で渡したい - Faith and Brave - C++で遊ぼう
class Hoge(string s){ immutable string str = s; } alias Hoge!("hello") HogeHello; enum e = HogeHello.str; // コンパイル時に取得できます void main(){}
アキラさんはD言語でできても嬉しくないけど!