Hi,
template <typename T, decltype(T::a)* = nullptr>
bool DoCheck1(T t) { return false; }
template <typename T, decltype(T::b)* = nullptr>
bool DoCheck1(T t) { return false; }
template <typename T, typename std::enable_if<true, decltype(T::a)>* = nullptr>
bool DoCheck2(T t) { return false; }
template <typename T, typename std::enable_if<true, decltype(T::b)>* = nullptr>
bool DoCheck2(T t) { return false; }
Both above versions should have same behaviour, but icc 16.0.4 on Linux gives the following compilation error for DoCheck2 -
error: redefinition of default argument
template <typename T, typename std::enable_if<true, decltype(T::b)>* = nullptr>
Is this expected behaviour or a bug?
Regards,
Tarun