https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97010
Bug ID: 97010
Summary: C++20 ADL and function templates that are not visible
(P0846R0) fails on call with templated type
Product: gcc
Version: 10.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kirshamir at gmail dot com
Target Milestone: ---
#include <iostream>
#include <tuple>
template<class Tuple>
void print(const Tuple& tup) {
// P0846R0: ADL should work here correctly
std::cout << get<0>(tup) << std::endl; // fails with gcc
}
int main() {
auto two_ints = std::make_tuple(1, 2);
std::cout << get<0>(two_ints) << std::endl; // ok
print(two_ints);
}
Code: https://godbolt.org/z/YGGaEo