C++11/C++0x 15
■ このスレッドは過去ログ倉庫に格納されています
0593デフォルトの名無しさん
2012/03/05(月) 19:02:36.82それっぽく見えるだろ
struct bb{
bb & bb::operator , (int i){std::cout<<i; return *this;}
bb & bb::operator , (const std::string& s){std::cout<<s; return *this;}
bb & bb::operator () (int i){std::cout<<i; return *this;}
bb & bb::operator () (const std::string& s){std::cout<<s; return *this;}
};
bb aa(){ return bb(); }
void f(){
aa(), "aa", 0;
aa()("aa")(0);
}
■ このスレッドは過去ログ倉庫に格納されています