public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97010] New: C++20 ADL and function templates that are not visible (P0846R0) fails on call with templated type
@ 2020-09-10 13:45 kirshamir at gmail dot com
  2020-09-10 14:14 ` [Bug c++/97010] " mpolacek at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: kirshamir at gmail dot com @ 2020-09-10 13:45 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-08-04 11:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 13:45 [Bug c++/97010] New: C++20 ADL and function templates that are not visible (P0846R0) fails on call with templated type kirshamir at gmail dot com
2020-09-10 14:14 ` [Bug c++/97010] " mpolacek at gcc dot gnu.org
2020-09-10 22:16 ` mpolacek at gcc dot gnu.org
2020-10-07 21:25 ` cvs-commit at gcc dot gnu.org
2020-10-20 13:38 ` cvs-commit at gcc dot gnu.org
2020-10-20 13:39 ` mpolacek at gcc dot gnu.org
2021-08-04 11:47 ` redi at gcc dot gnu.org
2021-08-04 11:48 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).