[ConceptGCC] |
ConceptGCC :Possible bug |
From: Brad Austin (artax_at_[hidden])
Date: 2007-03-11 04:17:27
I'm getting a compilation error on the following code, which I think
is correct:
#include <concepts>
template<
typename inner_functor_type,
typename argument_type
>
requires
std::CopyConstructible< inner_functor_type >,
std::Predicate< inner_functor_type, argument_type >
class foo
{
inner_functor_type inner_functor;
public:
foo( const inner_functor_type & inner_functor )
: inner_functor( inner_functor )
{
}
bool operator()( const argument_type & argument )
{
return inner_functor( argument );
}
};
The error is:
test.cpp:24: error: no matching function for call to âfoo<inner_functor_type, argument_type>::operator()(inner_functor_type&, const argument_type&)â
test.cpp:22: note: candidates are: bool foo<inner_functor_type, argument_type>::operator()(const argument_type&)
If I'm understanding this correctly, in this line:
return inner_functor( argument );
the compiler seems to be incorrectly trying to call:
foo::operator()( inner_functor_type&, const argument_type& )
instead of:
inner_functor_type::operator()( const argument_type& )
Does this look right, or am I confused?