17 Jul
2017
17 Jul
'17
1:11 a.m.
Joaquin M López Muñoz wrote:
1.4 Tuple operations are named differently from their C++14/17 counterparts to "avoid ambiguities when both are visible or in unqualified calls". Yet, this policy is not followed in integer_sequence.hpp. I'd rather go the latter way.
The primitives in integer_sequence.hpp are template aliases, so argument-dependent lookup does not apply to them. The tuple functions are, well, functions, and when f.ex. make_from_tuple<T>(tp) is called with an std::tuple, ADL finds std::make_from_tuple because std is an associated namespace. So the code suddenly becomes ambiguous in C++17.