Merge pull request #1652 from medithe/patch-1
Cast the tr1::tuple_element template parameter to int
This commit is contained in:
commit
85b572394b
@ -978,12 +978,13 @@ struct TuplePolicy {
|
||||
static const size_t tuple_size = ::std::tr1::tuple_size<Tuple>::value;
|
||||
|
||||
template <size_t I>
|
||||
struct tuple_element : ::std::tr1::tuple_element<I, Tuple> {};
|
||||
struct tuple_element : ::std::tr1::tuple_element<static_cast<int>(I), Tuple> {
|
||||
};
|
||||
|
||||
template <size_t I>
|
||||
static typename AddReference<
|
||||
const typename ::std::tr1::tuple_element<I, Tuple>::type>::type get(
|
||||
const Tuple& tuple) {
|
||||
static typename AddReference<const typename ::std::tr1::tuple_element<
|
||||
static_cast<int>(I), Tuple>::type>::type
|
||||
get(const Tuple& tuple) {
|
||||
return ::std::tr1::get<I>(tuple);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user