Sum the components of a tuple up by using std::get, std::tuple_size, std::tuple_element
问题 I've got a custom class that has a tuple-like interface. Because I want my code to be as generic as possible, I thought that it would be a good idea to base my algorithms on the functions std::get , std::tuple_size , std::tuple_element so you just have to specialize these functions to use my algorithms. Let's call the concept that requires these function specializations Tuple . Now I am trying to sum up the components of a Tuple . The function declaration should be something like this: