Opened 17 years ago

Closed 17 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:


  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 

template<class S,class>class AA: unary_function <int, 
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:1 Changed 17 years ago by beman_dawes

Logged In: YES 

I've forwarded this one to John Maddock; he is Boost's 
config expert.



comment:2 Changed 17 years ago by jmaurer

Status: assignedclosed
Logged In: YES 

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.