[Bug c++/92894] New: "declared using local type 'test01()::X', is used but never defined" during concept satisfaction
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 10 17:20:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92894
Bug ID: 92894
Summary: "declared using local type 'test01()::X', is used but
never defined" during concept satisfaction
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Blocks: 67491
Target Milestone: ---
The following should compile, because the undefined member function is never
odr-used, only its return type is needed.
#include <iterator>
template<typename T,
std::indirect_unary_predicate<std::projected<T*, std::identity>> Pred>
constexpr void
all_of(T*, Pred)
{ }
void
test01()
{
struct X { };
X x;
all_of(&x, [](X&) { return false; });
}
Compiled with -std=gnu++2a and current trunk:
In file included from
/home/jwakely/gcc/10/include/c++/10.0.0/bits/stl_iterator_base_types.h:71,
from /home/jwakely/gcc/10/include/c++/10.0.0/iterator:61,
from proj.cc:1:
/home/jwakely/gcc/10/include/c++/10.0.0/bits/iterator_concepts.h:669:40: error:
'std::indirect_result_t<_Proj&, _Iter> std::projected<_Iter,
_Proj>::operator*() const [with _Iter = test01()::X*; _Proj = std::identity;
std::indirect_result_t<_Proj&, _Iter> = test01()::X&]', declared using local
type 'test01()::X', is used but never defined [-fpermissive]
669 | indirect_result_t<_Proj&, _Iter> operator*() const; // not
defined
| ^~~~~~~~
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues
More information about the Gcc-bugs
mailing list