5
#include <type_traits>
template<int n>
std::enable_if_t<n == 1, int> f() {}
// OK
template<int n>
std::enable_if_t<n > 1, int> g() {}
// VS2015 : error C2988: unrecognizable template declaration/definition
int main()
{}
मुझे पता है कि संकलक के कारण त्रुटि टेम्पलेट समाप्ति चिह्न के रूप में "से अधिक" साइन '>' लेती है।सी ++ टेम्पलेट्स में तुलनात्मक अभिव्यक्तियों का उपयोग कैसे करें?
मेरा प्रश्न है: ऐसे मामले में, तुलना अभिव्यक्ति कानूनी कैसे बनाएं?