Created
July 4, 2014 12:09
-
-
Save rmartinho/a35050159aa65a151701 to your computer and use it in GitHub Desktop.
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
#include <tuple> | |
#include <type_traits> | |
template <int... I> | |
using bar = std::tuple<std::integral_constant<int, I>...>; | |
template <int... I> | |
struct foo { | |
int total(bar<I...> const&) const { return 0; } // error C3520: 'I' : parameter pack must be expanded in this context | |
}; |
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
#include <tuple> | |
#include <type_traits> | |
template <int... I> | |
using bar = std::tuple<std::integral_constant<int, I>...>; | |
template <bool X, int... I> | |
struct foo { | |
int total(bar<I...> const&) const { return 0; } // fatal error C1001: An internal error has occurred in the compiler. | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment