Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6525: format atldbgmem.h m_storage VS2010
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-09 20:26:48
#6525: format atldbgmem.h m_storage VS2010
-------------------------------+---------------------------
Reporter: epodkopaev@⦠| Owner: samuel_krempp
Type: Bugs | Status: new
Milestone: To Be Determined | Component: format
Version: Boost 1.48.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+---------------------------
Comment (by dbk25@â¦):
I have what appears to be a workaround; at least it helped when I hit this
problem.
Check whether the `#ifdef _DEBUG/#endif` that redefines `new` is before or
after the `#include <boost/format.hpp>`. I hit this problem when `new` is
redefined ''before'' including format.hpp, but do not have this problem if
`new` is redefined ''afterwards''. (I'm using a slightly different way to
redefine `new`, but that's most likely not material.)
In other words, this caused the compile error that you are reporting:
{{{
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include <boost/format.hpp>
}}}
and this worked for me:
{{{
#include <boost/format.hpp>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6525#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC