D言語 Part24
■ このスレッドは過去ログ倉庫に格納されています
0127デフォルトの名無しさん
2010/02/24(水) 11:19:24超適当に
template noncopyable() // mixin templateと書きたい・・・
{
@disable
{
this(this) {}
void opAssign(typeof(this) rhs) {}
}
}
struct Foo
{
mixin noncopyable!();
}
void main()
{
Foo a, b;
a = b; // error
Foo c = a; // error
}
■ このスレッドは過去ログ倉庫に格納されています