On Wed, Feb 27, 2013 at 11:02 AM, John M. Dlugosz
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