Modify

Opened 16 years ago

Closed 16 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()
 */

Attachments (0)

Change History (2)

comment:1 Changed 16 years ago by beman_dawes

Logged In: YES 
user_id=51042

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

Thanks,

--Beman

comment:2 Changed 16 years ago by jmaurer

Status: assignedclosed
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?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain jmaurer.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.