2014-04-14から1日間の記事一覧
template<class> struct rhs { friend int operator*(int x, rhs){ return 2; } }; template<class T> rhs<T> make(T){ return rhs<T>(); } using R = decltype(42 * make(42)); int main(){} 自身が右辺に来る二項演算子を クラス内でオーバーロードした テンプレートクラスを テ</t></t></class></class>…