Opened 21 years ago
Closed 21 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
Note:
See TracTickets
for help on using tickets.
