- 916 名前:デフォルトの名無しさん mailto:sage [2022/02/14(月) 11:54:11.63 ID:L8LvhIeL.net]
- >>900
ふつーにテンプレートじゃね? template <typename T> requires std::is_floating_point_v<T> void func(T&& arg) { } あとanyなんて手もあるけど void func(std::any arg) { if(arg.type() == typeid(double)) { } if(arg.type() == typeid(float)) { } }
|

|