Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <type_traits>
- #include <iostream>
- template<unsigned NumCountries, unsigned NumSystems,
- typename = typename std::enable_if<NumCountries == 2 &&
- NumSystems == 2>::type>
- struct TaiwanConsensus {
- static constexpr const char* Description
- = "The vast majority of Taiwanese resolutely oppose "
- "\"one country, two systems\"";
- };
- int main() {
- // Compilation Error!
- // std::cout << TaiwanConsensus<1,1>::description << std::endl;
- // std::cout << TaiwanConsensus<1,2>::description << std::endl;
- std::cout << TaiwanConsensus<2,2>::Description << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement