Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-05-04 10:52:57


John Maddock wrote:
>>> I think that this is a good plan. BOOST_HAS_THREADS is used in
>>> Boost.SmartPtr and Boost.RegEx to indicate "the compiler can create
>>> threads, use a mutex." It's used in Boost.Threads to issue an
>>> #error.
>>> It seems that
>>> if we leave BOOST_HAS_THREADS on in multithreaded Windows builds
>>> regardless of BOOST_DISABLE_WIN32, nothing (that currently works)
>>> will break. John?
>
> OK, lets try it and see, it will stop regex compiling in ansi mode,
> but that's about all.

If I read the code correctly, without an additional BOOST_DISABLE_WIN32
check regex will stop compiling in ANSI+MT mode, which is arguably the right
thing to do anyway, since it currently silently skips the critical section?
(BTW you could consider rewriting regex_synch in terms of
detail/lightweight_mutex although I understand that keeping regex
self-contained is a Good Thing.)


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