Opened 21 years ago
Closed 21 years ago
#9 closed Bugs (Invalid)
config_info ambiguity error
Reported by: | ejames-beckham | Owned by: | jmaurer |
---|---|---|---|
Milestone: | Component: | test | |
Version: | None | Severity: | |
Keywords: | Cc: |
Description
I am doing internal testing on a pre-release version of the Borland C++ compiler. config/test/config_info.cpp generates an ambiguity with Borland C++ 5.5.1 when using the STLPort library in place of the currently shipping RogueWave. I see that other highly-conformant compilers are also failing this test. I have confirmed that with g++ 2.95 the error given is the same as the error I see with Borland's compiler (w/STLPort). Here is a code sample that I narrowed from config_info.cpp: #include<wchar.h> #include<functional> template<class S,class>class AA: unary_function <int, S>{}; template<class S,class T>AA<S,T>mem_fun(S(T::*)()const) {} class BB{public:void ff()const{}}; void test(){mem_fun(BB::ff);} /* Error E2015 config_test.cpp 6: Ambiguity between '_STL::_STL::const_mem_fun_t<BB> mem_fun<void,BB>(void (BB::*)() const)' and 'AA<void,BB> mem_fun<void,BB>(void (BB::*)() const)' in function test() */
Change History (2)
comment:2 by , 21 years ago
Status: | assigned → closed |
---|
Logged In: YES user_id=53943 The test case you gave above is invalid in at least two respects: 1. unary_function is used without std:: qualification. 2. You're trying to get the address of a non-static member function without using the address-of operator. Also, I doubt you're having a problem with config_info.cpp. It's more likely config_test.cpp. Please post a new bug report showing the compiler command line you're using with the unmodified boost code (what version?), and the error message you get with gcc. What OS do you use?
Note:
See TracTickets
for help on using tickets.