Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-09-22 09:17:57

From: "David Abrahams" <dave_at_[hidden]>
> From: "Peter Dimov" <pdimov_at_[hidden]>
> > > How about getting rid of the complication in case of BOOST_NO_THREADS?
> >
> > Not that much difference in the generated code, and #ifdefs just clutter
> the
> > source. People hate #ifdefs. :-) I don't like the #ifdefs in
> > shared_count.hpp much either, but some compilers don't optimize out the
> > empty BOOST_NO_THREADS mutex in lwm_nop.hpp for some reason, and those
> > functions are performance critical.
> Experience tells me that most compilers won't optimize out your catch
> block.
> Did you really measure the opposite?

No, the catch block is there, just unreachable (and harmless.)

> In this case, the #ifdefs would have had great explanatory value ;-)

Yes, I thought of this too. I might #ifdef make_shared after all. :-)

Boost list run by bdawes at, gregod at, cpdaniel at, john at