如果我有类似的代码
struct Foo
{
template<class T>
Foo(T arg) { }
};
这是否会阻止T成为const,volatile或参考?
同样,如果我有
struct Bar
{
template<class T>
Bar(T const volatile &arg) { }
};
这是否意味着T永远不会是const,volatile或参考?
本质上,这是否意味着必须推断构造函数模板参数,即不能指定为推断值以外的任何值?