Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #83578
| From | Paavo Helde <eesnimi@osa.pri.ee> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: ambiguous reference to 'find' in std and std::ranges namespaces |
| Date | 2022-04-13 17:26 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <t36mim$25k$1@dont-email.me> (permalink) |
| References | <t35vs1$8pu$1@dont-email.me> <t36c3i$dpq$1@dont-email.me> <t36j2i$10a3$1@gioia.aioe.org> <t36j5k$10a3$2@gioia.aioe.org> |
13.04.2022 16:28 Juha Nieminen kirjutas:
> Juha Nieminen <nospam@thanks.invalid> wrote:
>> Paavo Helde <eesnimi@osa.pri.ee> wrote:
>>> In my implementation it appears to be implemented as a function object,
>>> having operator() member functions. I guess the problem is caused by
>>> this specific implementation, as the whole point of niebloids seems to
>>> be the opposite (avoiding clashes with the std:: namespace).
>>
>> Perhaps a minimal example that replicates the mentioned behavior could
>> illuminate if this is normal to-be-expected behavior, a problem with
>> the library implementation, or perhaps even a problem with the compiler
>> itself.
>
> (I mean a minimal example that doesn't use the standard library,
> ie. a piece of code that itself demonstrates what's happening inside
> the library for this error to happen.)
Here you are:
namespace A {
template<typename T> void foo(T, T, T) {}
}
namespace B {
struct C {
void operator()(int) {}
} foo;
}
using namespace A;
using namespace B;
int main() {
foo(1);
}
ConsoleTestVS2019.cpp(15,8): error C2872: 'foo': ambiguous symbol
ConsoleTestVS2019.cpp(2,30): message : could be 'void A::foo(T,T,T)'
ConsoleTestVS2019.cpp(8,7): message : or 'B::C B::foo'
ConsoleTestVS2019.cpp(15,5): error C2672: 'A::foo': no matching
overloaded function found
ConsoleTestVS2019.cpp(15,10): error C2780: 'void A::foo(T,T,T)': expects
3 arguments - 1 provided
ConsoleTestVS2019.cpp(2): message : see declaration of 'A::foo'
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ambiguous reference to 'find' in std and std::ranges namespaces Ralf Goertz <me@myprovider.invalid> - 2022-04-13 09:58 +0200
Re: ambiguous reference to 'find' in std and std::ranges namespaces Paavo Helde <eesnimi@osa.pri.ee> - 2022-04-13 14:27 +0300
Re: ambiguous reference to 'find' in std and std::ranges namespaces Bo Persson <bo@bo-persson.se> - 2022-04-13 14:21 +0200
Re: ambiguous reference to 'find' in std and std::ranges namespaces Paavo Helde <eesnimi@osa.pri.ee> - 2022-04-13 15:31 +0300
Re: ambiguous reference to 'find' in std and std::ranges namespaces Juha Nieminen <nospam@thanks.invalid> - 2022-04-13 13:26 +0000
Re: ambiguous reference to 'find' in std and std::ranges namespaces Juha Nieminen <nospam@thanks.invalid> - 2022-04-13 13:28 +0000
Re: ambiguous reference to 'find' in std and std::ranges namespaces Paavo Helde <eesnimi@osa.pri.ee> - 2022-04-13 17:26 +0300
Re: ambiguous reference to 'find' in std and std::ranges namespaces Christian Gollwitzer <auriocus@gmx.de> - 2022-04-14 07:13 +0200
Re: ambiguous reference to 'find' in std and std::ranges namespaces Ralf Goertz <me@myprovider.invalid> - 2022-04-14 08:57 +0200
Re: ambiguous reference to 'find' in std and std::ranges namespaces Bo Persson <bo@bo-persson.se> - 2022-04-14 13:23 +0200
Re: ambiguous reference to 'find' in std and std::ranges namespaces Paavo Helde <eesnimi@osa.pri.ee> - 2022-04-14 16:32 +0300
Re: ambiguous reference to 'find' in std and std::ranges namespaces Bo Persson <bo@bo-persson.se> - 2022-04-14 18:30 +0200
Re: ambiguous reference to 'find' in std and std::ranges namespaces Ralf Goertz <me@myprovider.invalid> - 2022-04-15 10:14 +0200
Re: ambiguous reference to 'find' in std and std::ranges namespaces Manfred <noname@add.invalid> - 2022-04-14 15:02 +0200
Re: ambiguous reference to 'find' in std and std::ranges namespaces Christian Hanné <the.hanne@gmail.com> - 2022-04-15 14:39 +0200
csiph-web