Skip to content

Instantly share code, notes, and snippets.

@CommitThis
Created November 27, 2020 17:00
Show Gist options
  • Save CommitThis/f97434862208365b3ee38c1b6b12bdd7 to your computer and use it in GitHub Desktop.
Save CommitThis/f97434862208365b3ee38c1b6b12bdd7 to your computer and use it in GitHub Desktop.
NVCC Error
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