Skip to content

Instantly share code, notes, and snippets.

@rmartinho
Created July 4, 2014 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmartinho/a35050159aa65a151701 to your computer and use it in GitHub Desktop.
Save rmartinho/a35050159aa65a151701 to your computer and use it in GitHub Desktop.
#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
};
#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