Homec4science

Cast the tr1::tuple_element template parameter to int

Authored by medithe <40990424+medithe@users.noreply.github.com> on Jul 9 2018, 13:36.

Description

Cast the tr1::tuple_element template parameter to int

Because in std::tr1::tuple_element the first template parameter should be of type int (https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.4/a00547.html), but the code inserts a size_t, the first template parameter should be casted to int before, to get rid of the following errors:

googletest-src/googletest/include/gtest/gtest-printers.h:957:60: error: conversion from ‘long unsigned int’ to ‘int’ may change value [-Werror=conversion]

   struct tuple_element : ::std::tr1::tuple_element<I, Tuple> {};

and

googletest-src/googletest/include/gtest/gtest-printers.h:961:56: error: conversion from ‘long unsigned int’ to ‘int’ may change value [-Werror=conversion]

const typename ::std::tr1::tuple_element<I, Tuple>::type>::type get(

Details

Committed
GitHub <noreply@github.com>Jul 9 2018, 13:36
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:ba96d0b1161f: Merge pull request #1622 from rohanjoyce/bazel_test_filter
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed R9484:b50b2f775ed0: Cast the tr1::tuple_element template parameter to int (authored by medithe <40990424+medithe@users.noreply.github.com>).Jul 9 2018, 13:36