Opened 17 years ago

Closed 17 years ago

#25 closed Bugs (Fixed)

duplicate symbol string_compare on Sun

Reported by: nobody Owned by: John Maddock
Milestone: Component: regex
Version: None Severity:
Keywords: Cc:



this is Thomas Hampp (

The Sun Workshop compiler (which uses Rouge Wave STL) 
will complain about a duplicate symbol string_compare 
during linkage.
The reason is that the function string_compare in 
header boost/regex/detail/regex_match.hpp (only 
defined for Rouge Wave) is not declared inline.

I have added the keyword inline to each function to 
make it work (see paste below)

# define STR_COMP(s,p)
template <class C, class T, class 
inline int string_compare(const 
std::basic_string<C,T,A>& s, const C* 
{ return
(p); }                                                 
inline int string_compare(const std::string& s, const 
char* p)                            
{ return std::strcmp(s.c_str(), 
p); }                                                  
inline int string_compare(const std::wstring& s, const 
wchar_t* p)                        
{ return std::wcscmp(s.c_str(), 
p); }                                                  
# define STR_COMP(s,p) string_compare

Attachments (0)

Change History (1)

comment:1 Changed 17 years ago by John Maddock

Status: assignedclosed
Logged In: YES 

This has now been fixed in the cvs, thanks!

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain John Maddock.
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.