|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-01-12 09:15:35
At 10:46 AM 1/12/2001 +0100, Schaible, Joerg wrote:
>>What did you do about the warning messages? (See below.)
>
><g>
>
>#pragma warning( disable : 4251 ) // needs dll-interface
>
>// here comes the class definition
>
>#pragma warning( default : 4251 ) // needs dll-interface
>
>This warning can be ignored if the base class is implemented completly
>inline and has no static member variables. Unfortunately you have to wrap
>all your classes that separate the implementation and derive from a
>complete
>inline class with this pragmas. I managed to compile VC6 STL code really
>without any warning in level 4, but that is nothing I would advice for
>boost
>- unless you are willing to clatter the complete source with such kind of
>pragmas.
Agreed. I'm not about to suggest messing up perfectly clean code like
boost::noncopyable with VC++ pragmas. To do it consistently, it would have
to be done to classes which might be used as base classes even though they
usually aren't. Ugh.
>>I think I'll
>>just move the timer, etc., implementation into the headers and be done
>with
>
>>it. Slightly poorer encapsulation, but much less aggravation.
>
>I always vote encapsultaion :)
I probably shouldn't have said encapsulation. It is really more a case of
slightly increased coupling in the .hpp's to some standard library headers.
But if there is a problem with those headers, the .cpp's won't compile
anyhow, so I'm not sure it really matters much.
Thanks,
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk