Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-09-24 06:57:17


>Oh, I see. OK I agree in principle though I worry what happens when
someone
>transitions from some other POSIX library to yours and they #include both
>headers. The POSIX lib will walk over your namespace redefining those
>symbols. Maybe it would be best to simply use the lowercase versions of
>those symbols and possibly have a special posix compatibility include if
you
>really need the uppercase spellings (?)

Dave, I get a surprising amount of feedback about those POSIX API's, more
than about the templates sadly :-(

I guess most are either migrating from another library or are converting an
existing app from narrow to wide characters, others just want to use API's
that are part of some standard.

I take your point about including both headers - but I don't really think
anyone should be doing that - it sounds like a recipe for disaster (cf
including both boost/stdint.h and a vendor supplied header), what they
should be able to do though is write code that uses the standard names and
switch from one regex implementation to another just by changing the
include directories. To put it another way, if you call a POSIX standard
API shouldn't you pass POSIX standard constants to it as required? I admit
that there is the namespace issue that makes it non-standard in C++ mode
(unless you include via <boost/regex.h>), but I would rather see it at
least half way protected by a namespace than not at all.

- John.


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