Boost logo

Boost :

From: Lars Gullik Bjønnes (larsbj_at_[hidden])
Date: 2002-07-02 05:16:50


larsbj_at_[hidden] (Lars Gullik Bjønnes) writes:

| Is this a correct fix?

It would be nice if someone bothered to answer...

>
| From: Angus Leeming <a.leeming_at_[hidden]>
| Subject: possible boost patch [was dying in boost/regex]
| Newsgroups: gmane.editors.lyx.devel
| Date: Tue, 11 Jun 2002 17:54:55 +0100
>
| This seems to fix things and seems sensible...
| Angus
>
| Index: boost/libs/regex/src/c_regex_traits.cpp
| ===================================================================
| RCS file:
| /usr/local/lyx/cvsroot/lyx-devel/boost/libs/regex/src/c_regex_traits.cpp,v
| retrieving revision 1.1
| diff -u -p -r1.1 c_regex_traits.cpp
| --- boost/libs/regex/src/c_regex_traits.cpp 24 May 2002 12:53:11 -0000
| 1.1
| +++ boost/libs/regex/src/c_regex_traits.cpp 11 Jun 2002 16:58:35 -0000
| @@ -189,7 +189,7 @@ std::size_t BOOST_REGEX_CALL re_get_mess
| return size;
| boost::scoped_array<char> cb(new char[size]);
| _re_get_message(cb.get(), size, id);
| - size = boost::c_regex_traits<wchar_t>::strwiden(buf, len, cb.get());
| + size = boost::c_regex_traits<charT>::strwiden(buf, len, cb.get());
| return size;
| }
>
>
>
>
| On Tuesday 11 June 2002 5:50 pm, Angus Leeming wrote:
>> Compilation here is dying in boost/regex because
>> boost::c_regex_traits<wchar_t> is not defined:
>>
>> cxx -std strict_ansi -DHAVE_CONFIG_H -I.
>> -I../../../../../devel/boost/libs/regex/src -I../../../../src
>> -I../../../../../devel/boost -I/usr/local/include -nocleanup
>> -msg_display_number -w1 -ptr
>> /usr/users/aleem/OTHERS_CODE/lyx/devel-build/lyx_cxx_repository -O2 -c -MD
>> ../../../../../devel/boost/libs/regex/src/c_regex_traits.cpp
>> cxx: Error: ../../../../../devel/boost/libs/regex/src/c_regex_traits.cpp,
>> line 192: #70
>> incomplete type is not allowed
>> size = boost::c_regex_traits<wchar_t>::strwiden(buf, len, cb.get());
>> ----------^
>> cxx: Info: 1 error detected in the compilation of
>> "../../../../../devel/boost/libs/regex/src/c_regex_traits.cpp".
>>
>> It is boost::c_regex_traits<wchar_t> taht is undefined. The class is
>> defined in regex_traits.hpp:
>>
>> #ifndef BOOST_NO_WREGEX
>> template<>
>> class BOOST_REGEX_DECL c_regex_traits<wchar_t> : public
>> re_detail::c_traits_base
>> {
>> };
>> #endif
>>
>> So is only defined if BOOST_NO_WREGEX is not defined.
>>
>> In config.hpp we have:
>> // If there isn't good enough wide character support then there will
>> // be no wide character regular expressions:
>> //
>> #if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) ||
>> defined(BOOST_NO_STD_WSTRING)) && !defined(BOOST_NO_WREGEX)
>> # define BOOST_NO_WREGEX
>> #else
>> ...
>> #endif
>>
>> What to do about this? Why is the function in c_regex_traits.cpp being
>> instantiated at all I wonder?
>>
>> Angus
>
| ----------
>
>
>
| --
| Lgb
| _______________________________________________
| Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

-- 
	Lgb

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