template strof (T) { static string strof = T.stringof; } void main () { alias typeof(delegate () { return (invariant(char)[]).init;} ) del; // doesn't affect aliased type auto a = strof!(del); // doesn't affect non-delegate literal types auto aa = strof!(int); // doesn't affect non-delegates with typeof auto ab = strof!(typeof(5)); // doesn't affect typeof with assigned variable auto meth = delegate () { return (invariant(char)[]).init;}; auto b = strof!(typeof(meth)); // rejects with delegate literal in typeof -- both of the following fail auto c = strof!(typeof(delegate () { return 5; } )); auto d = strof!(typeof(delegate () { return (invariant(char)[]).init;} )); }
Fixed dmd 1.026 and 2.010
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル