From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-12-24 00:56:14
Beman Dawes wrote:
> "Christopher Kohlhoff" <chris_at_[hidden]> wrote in message
>>>How do you expect to write tests for your library that cover
>>>*all* the various methods supported in one platform?
>>By doing what Caleb Epstein suggested and having a different
>>macro passed when building each set of tests.
>>I note that this is how Boost.Threads, for example,
>>differentiates between the native Windows threads and pthreads
> It is also how Boost.Filesystem chooses between Windows and POSIX variants
> on platforms (Cygwin) that support both.
And I dislike that approach in general, I consider it a kludge. Because
it eventually leads to ODR and dynamic linking problems. I also consider
it a design dodge to only provide users one abstraction implementation
for one category of OS services, instead of providing one abstraction
that uses any implementation of that one category of OS services.
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk