I have a template that looks like this
template <typename T> class Foo
{
public:
Foo(const T& t) : _t(t) {}
private:
const T _t;
};
Is there a savvy template metaprogramming way to avoid using a const reference in cases where the argument type is trivial like a bool or char? like:
Foo(stl::smarter_argument<T>::type t) : _t(t) {}