I have class that represents an array reference (class array_ref
) and another that is (i.e. holds/own/contains) the array (class array
).
array_ref
behaves like a reference.
Does it make sense to specialize std::decay
for class array_ref
to be array
?
namespace std{
template<> class decay<arra_ref>{typedef array type;};
}
What other alternatives do I have to tell generic programs that array
is the "value type" of array_ref
?
Is std::decay
used in any STL algorithm?