Boost logo

Boost :

From: Yitzhak Sapir (Yitzhak.Sapir_at_[hidden])
Date: 2008-03-11 11:16:48


> Yitzhak Sapir wrote:
> > that I know of. In Visual Studio, the problem would be solved by
> > making the class non- exported, and specifying for the specific
> > necessary functions within the class the export
> declaration. Also, if
> > this were a result of inlining, it would explain why the
> problem does
> > not appear in debug.
>
> I think you're correct that this is an inlining issue: and
> specific to GCC prior to 3.4 (which is where
> BOOST_REGEX_BUGGY_CTYPE_FACET is defined).
>
> Can you try removing the following section:
>
> #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET
> template BOOST_REGEX_DECL
> bool
> cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::isctype(const
> BOOST_REGEX_CHAR_T c, char_class_type mask) const; #endif
>
> from instantiate.hpp and then rebuild both the library and
> the test app and see if that fixes the issue?

Well, the macro appears in boost/regex/v4/cpp_regex_traits.hpp, boost/regex/v4/instances.hpp, and boost/regex/config.hpp

If the #ifdef in instances.hpp is changed to #if 0, I get the following:
/tmp/cc7hZEMV.o(.gnu.linkonce.t._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j+0x22): In function `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned)':
: undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned)'
collect2: ld returned 1 exit status
[
If I also comment out the define of the macro in config.hpp, I still get the same thing:
/tmp/ccH7Bese.o(.gnu.linkonce.t._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j+0x22): In function `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned)':
: undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned)'
collect2: ld returned 1 exit status

Yitzhak Sapir

CONFIDENTIALITY CAUTION
This e-mail and any attachments may be confidential or legally privileged. If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies, and you are prohibited from retaining, distributing, disclosing or using any information contained herein. Please inform us of the erroneous delivery by return e-mail.
Thank you for your cooperation.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk