Created
November 27, 2020 17:00
-
-
Save CommitThis/f97434862208365b3ee38c1b6b12bdd7 to your computer and use it in GitHub Desktop.
NVCC Error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum class policy { | |
a, b | |
}; | |
template <policy P> | |
auto foo() { | |
if constexpr (P == policy::a) { | |
return 240; | |
} else { | |
return 204; | |
} | |
} | |
auto main() -> int { | |
auto a = foo<policy::a>(); | |
auto b = foo<policy::b>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment