#include <iostream>
#include <limits>
#include <type_traits>
using namespace std;
template <typename T>
constexpr enable_if_t<is_integral<T>::value, int[]> foo = { 1, 2 };
template <typename T>
constexpr enable_if_t<is_floating_point<T>::value, int[]> foo = { 10, 20, 30 };
int main() {
cout << foo<int>[0] << endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bGltaXRzPgojaW5jbHVkZSA8dHlwZV90cmFpdHM+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CmNvbnN0ZXhwciBlbmFibGVfaWZfdDxpc19pbnRlZ3JhbDxUPjo6dmFsdWUsIGludFtdPiBmb28gPSB7IDEsIDIgfTsKCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgpjb25zdGV4cHIgZW5hYmxlX2lmX3Q8aXNfZmxvYXRpbmdfcG9pbnQ8VD46OnZhbHVlLCBpbnRbXT4gZm9vID0geyAxMCwgMjAsIDMwIH07CgoKaW50IG1haW4oKSB7CiAgY291dCA8PCBmb288aW50PlswXSA8PCBlbmRsOwp9
prog.cpp:11:59: error: redeclaration of ‘template<class T> constexpr std::enable_if_t<std::is_floating_point<_Tp>::value, int []> foo’
constexpr enable_if_t<is_floating_point<T>::value, int[]> foo = { 10, 20, 30 };
^~~
prog.cpp:8:53: note: previous declaration ‘template<class T> constexpr std::enable_if_t<std::is_integral<_Tp>::value, int []> foo<T>’
constexpr enable_if_t<is_integral<T>::value, int[]> foo = { 1, 2 };
^~~