I have been having the following problem:
std::tuple<Ts...> some_tuple = std::tuple<Ts...>();
for (int i = 0; i < 2; i++) {
const int j = i;
std::get<j>(temp_row) = some_value;
}
Does not compile: (in xcode) it says " no matching function call for 'get' ".
However, the following works fine:
std::tuple<Ts...> some_tuple = std::tuple<Ts...>();
for (int i = 0; i < 2; i++) {
const int j = 1;
std::get<j>(temp_row) = some_value;
}
Does it have something to do with defining the value of a constant to be the value of a variable?
Thanks!
EDIT: The difference is in the const int j = i;
vs. const int j = 1;