#include <iostream>
#include <type_traits>
template <typename T>
struct A {
int val = 0;
template<typename Integer
,typename = typename std::enable_if<T::value && sizeof(Integer)>::type
>
A(Integer n) : val(n) {};
A(...) {}
/* ... */
};
struct YES { constexpr static bool value = true; };
struct NO { constexpr static bool value = false; };
int main() {
A<YES> y(10);
A<NO> n;
std::cout << "YES: " << y.val << std::endl
<< "NO: " << n.val << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHlwZV90cmFpdHM+Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4Kc3RydWN0IEEgewogICAgaW50IHZhbCA9IDA7CgogICAgdGVtcGxhdGU8dHlwZW5hbWUgSW50ZWdlcgogICAgICAgICAgICAsdHlwZW5hbWUgID0gdHlwZW5hbWUgc3RkOjplbmFibGVfaWY8VDo6dmFsdWUgJiYgc2l6ZW9mKEludGVnZXIpPjo6dHlwZQogICAgICAgICAgICA+CiAgICBBKEludGVnZXIgbikgOiB2YWwobikge307CiAgICAKICAgIEEoLi4uKSB7fQogICAgLyogLi4uICovCn07CgpzdHJ1Y3QgWUVTIHsgY29uc3RleHByIHN0YXRpYyBib29sIHZhbHVlID0gdHJ1ZTsgfTsKc3RydWN0IE5PIHsgY29uc3RleHByIHN0YXRpYyBib29sIHZhbHVlID0gZmFsc2U7IH07CgppbnQgbWFpbigpIHsKICAgIEE8WUVTPiB5KDEwKTsKICAgIEE8Tk8+IG47CiAgICBzdGQ6OmNvdXQgPDwgIllFUzogIiA8PCB5LnZhbCA8PCBzdGQ6OmVuZGwKICAgICAgICAgICAgICA8PCAiTk86ICAiIDw8IG4udmFsIDw8IHN0ZDo6ZW5kbDsKfQ==