Too correct concept checks?
I found the following concept checks in CORSIKA, e.g.
template <
typename _StackDataType = StackDataType,
typename = std::enable_if<std::is_same<StackDataType, _StackDataType>::value &&
std::is_reference<_StackDataType>::value,
void>>
Stack(StackDataType vD)
: fData(vD) {}
The following should suffice:
template <
typename _StackDataType = StackDataType,
typename = std::enable_if<std::is_reference<_StackDataType>::value>>
Stack(StackDataType vD)
: fData(vD) {}
Strictly speaking, the original is safer, but who is really going to set the template parameter manually? I think the second form is much more readable.
Edited by Hans Dembinski