We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5e8bc4 commit f566757Copy full SHA for f566757
headers/type_traits
@@ -368,12 +368,15 @@ template<class T>
368
using decay_t = T; // SIMPLIFIED typedef
369
#endif
370
371
-template<bool, class T = void> struct enable_if {
372
- typedef int type; // SIMPLIFIED type
+template<bool, class T = void> struct enable_if {};
+
373
+template<class T>
374
+struct enable_if<true, T> {
375
+ typedef T type;
376
};
377
#if CPPREFERENCE_STDVER >= 2014
-template<bool, class T = void>
-using enable_if_t = int; // SIMPLIFIED typedef
378
+template<bool B, class T = void>
379
+using enable_if_t = typename enable_if<B, T>::type;
380
381
382
template<bool, class T, class F> struct conditional {
0 commit comments