Modify

Opened 16 years ago

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

Description

Hi,

this is Thomas Hampp (thampp@de.ibm.com)

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)

#ifndef 
_RWSTD_VER                                             
                           
# define STR_COMP(s,p) s.compare
(p)                                                    
   
#else                                                  
                                   
template <class C, class T, class 
A>                                                     
 
inline int string_compare(const 
std::basic_string<C,T,A>& s, const C* 
p)                  
{ return s.compare
(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
(s,p)                                                
#endif


Attachments (0)

Change History (1)

comment:1 Changed 16 years ago by John Maddock

Status: assignedclosed
Logged In: YES 
user_id=14804

This has now been fixed in the cvs, thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.