Repository navigation
[GNATS 24180] Spurious diagnostic for more than one std:begin matches the argument list #125
jhsedg
started this conversation in
Issue Triage - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Customer bug ID
coroutine2/test/test_coroutine_asm.test/test_coroutine.cpp, gnats/24180 (full preprocessed), gnats/24180a (reducded)
Description
This is the reduced test case below. Note that the full preprocessed test case has an addition error message for more than one instance of std:end matches the funciton template.
//type:fp
//options_all:--gnu_version 80100 --c++17 -tused -w
template class pull_coroutine {
public:
template pull_coroutine(Fn);
class iterator {
public:
bool operator!=(iterator);
void operator++();
int operator*();
};
};
template
typename pull_coroutine::iterator begin(pull_coroutine);
template
typename pull_coroutine::iterator end(pull_coroutine);
namespace std {
template void begin(pull_coroutine);
}
struct coroutine {
using pull_type = pull_coroutine;
};
void f16() {
coroutine::pull_type coro(6);
for (auto i : coro)
;
}
fe_only -DTEST_NUMBER=1 --gnu_version 80100 --c++17 -tused -w Test_name.c
"Test_name.c", line 25: error: more than one instance of "begin" matches the
argument list:
function template "void std::begin(pull_coroutine)" (declared at
line 18)
function template "pull_coroutine::iterator
begin(pull_coroutine)" (declared at line 14)
argument types are: (coroutine::pull_type)
for (auto i : coro)
^
1 error detected in the compilation of "Test_name.c".
24180a.C:fp::FAIL--NO PREVIOUS OUTPUT:
Notes
ellen, 2021-12-09:
Boost 1_78_0 the complete test case now passes.
All reactions