Boost logo

Boost Users :

Subject: Re: [Boost-users] [CONFIG] static const definitions
From: Brian Budge (brian.budge_at_[hidden])
Date: 2013-02-27 14:23:52


On Wed, Feb 27, 2013 at 11:02 AM, John M. Dlugosz
<mpbecey7gu_at_[hidden]> wrote:
> On 2/27/2013 5:09 AM, boost-users-request-at-lists.boost.org |Boost/Allow to
> home| wrote:
>>
>> In fact even when initialized inline, an out of line definition should
>> always be provided as different compilers have different ideas about what
>> constitutes "use" of the variable (rather than just the value). MSVC
>> pretty
>> much never requires an out-of-line definition for example, where as GCC
>> will
>> often generate linker errors if you don't provide it.
>
> The problem is that MSVC is _prohibiting_ an out-of-line definition!
> (Visual Studio 2010)

Exactly, hence my suggestion for performing a preprocessor check
around the out-of-line definition. I suppose it would be nice to have
a BOOST-y preprocessor def that could let you know if this is the
case...

  Brian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net