Error building Spirit parser in VS2017
Hello,
I am receiving the following error building against the latest VS2017 ...
1>Version_Parser.cpp
1>d:\dev\boost.org\boost_1_68_0\boost\iostreams\positioning.hpp(96):
error C4996: 'std::fpos<_Mbstatet>::seekpos': warning STL4019: The
member std::fpos::seekpos() is non-Standard, and is preserved only for
compatibility with workarounds for old versions of Visual C++. It will
be removed in a future release, and in this release always returns 0.
Please use standards-conforming mechanisms to manipulate fpos, such as
conversions to and from streamoff, or an integral type, instead. If
you are receiving this message while compiling Boost.IOStreams, a fix
has been submitted upstream to make Boost use standards-conforming
mechanisms, as it does for other compilers. You can define
_SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING to acknowledge that you have
received this warning, or define _REMOVE_FPOS_SEEKPOS to remove
std::fpos::seekpos entirely.
1>c:\program files (x86)\microsoft visual
studio\2017\enterprise\vc\tools\msvc\14.15.26726\include\iosfwd(59):
note: see declaration of 'std::fpos<_Mbstatet>::seekpos'
With my grammar:
BOOST_FUSION_ADAPT_STRUCT(NS_VERSION_H::version, _major, _minor,
_patch, _build);
template <typename It>
struct version_parser : qi::grammar
On 31/10/2018 12:20, Michael Powell wrote:
I am receiving the following error building against the latest VS2017 ...
Did you read the error? It's pretty explicit what the problem is and what you need to do to work around it until a newer version of Boost is released.
On Tue, Oct 30, 2018 at 11:22 PM Gavin Lambert via Boost-users
On 31/10/2018 12:20, Michael Powell wrote:
I am receiving the following error building against the latest VS2017 ...
Did you read the error? It's pretty explicit what the problem is and what you need to do to work around it until a newer version of Boost is released.
Well, I added _REMOVE_FPOS_SEEKPOS to my preprocessor defs, and now I am receiving this, I suppose, predictably: Severity Code Description Project File Line Suppression State Error C2039 'seekpos': is not a member of 'std::fpos<_Mbstatet>' Kingdom.OrTools.Sat.Params.Generator d:\dev\boost.org\boost_1_68_0\boost\iostreams\positioning.hpp 96 I can defined _SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING instead, but clearly if seekpos() is always returning 0, there's going to be some regressions. So... What's the recourse beyond that? Depending on the deprecated (always returning zero) seekpos() is the wrong thing to do.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
On 31/10/2018 16:28, Michael Powell wrote:
I can defined _SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING instead, but clearly if seekpos() is always returning 0, there's going to be some regressions.
So... What's the recourse beyond that? Depending on the deprecated (always returning zero) seekpos() is the wrong thing to do.
When it follows that codepath, it doesn't use _only_ the zero, it combines it with another non-zero value so that it should still produce the correct answer. But if you want to avoid it entirely, then you need to do one of: 1. Use the 14.0 toolset. 2. Wait for the release of Boost 1.69. 3. Apply this patch to your local Boost: https://github.com/boostorg/iostreams/pull/57/files
On Wed, Oct 31, 2018 at 12:28 AM Gavin Lambert via Boost-users
On 31/10/2018 16:28, Michael Powell wrote:
I can defined _SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING instead, but clearly if seekpos() is always returning 0, there's going to be some regressions.
So... What's the recourse beyond that? Depending on the deprecated (always returning zero) seekpos() is the wrong thing to do.
When it follows that codepath, it doesn't use _only_ the zero, it combines it with another non-zero value so that it should still produce the correct answer.
But if you want to avoid it entirely, then you need to do one of:
1. Use the 14.0 toolset. 2. Wait for the release of Boost 1.69. 3. Apply this patch to your local Boost: https://github.com/boostorg/iostreams/pull/57/files
I'm encountering the error in iostreams/positioning.hpp, not fpos.hpp (although obviously that one needs remediation as well).
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
On 31/10/2018 17:31, Michael Powell wrote:
But if you want to avoid it entirely, then you need to do one of:
1. Use the 14.0 toolset. 2. Wait for the release of Boost 1.69. 3. Apply this patch to your local Boost: https://github.com/boostorg/iostreams/pull/57/files
I'm encountering the error in iostreams/positioning.hpp, not fpos.hpp (although obviously that one needs remediation as well).
fpos.hpp is a configuration header used by positioning.hpp. As I said before, defining _SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING is sufficient for Boost 1.68; it will still just work. Doing the above is optional but will let you resolve the issue without defining that.
On Wed, Oct 31, 2018 at 12:42 AM Gavin Lambert via Boost-users
On 31/10/2018 17:31, Michael Powell wrote:
But if you want to avoid it entirely, then you need to do one of:
1. Use the 14.0 toolset. 2. Wait for the release of Boost 1.69. 3. Apply this patch to your local Boost: https://github.com/boostorg/iostreams/pull/57/files
I'm encountering the error in iostreams/positioning.hpp, not fpos.hpp (although obviously that one needs remediation as well).
fpos.hpp is a configuration header used by positioning.hpp.
Well, color me confused. seekpos() is called from positioning.hpp, which seekpos() is the thing going away, correct? Clearly you've done the root cause analysis; I'm just reporting them as I see them.
As I said before, defining _SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING is sufficient for Boost 1.68; it will still just work. Doing the above is optional but will let you resolve the issue without defining that. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
On 31/10/2018 18:03, Michael Powell wrote:
fpos.hpp is a configuration header used by positioning.hpp.
Well, color me confused. seekpos() is called from positioning.hpp, which seekpos() is the thing going away, correct?
The change to fpos.hpp makes positioning.hpp use a different code path that no longer calls (or compiles any calls to) seekpos().
Clearly you've done the root cause analysis; I'm just reporting them as I see them.
I knew absolutely nothing about this issue until I replied to your message; I just spent five minutes reading the code.
On Wed, Oct 31, 2018 at 1:48 AM Gavin Lambert via Boost-users
On 31/10/2018 18:03, Michael Powell wrote:
fpos.hpp is a configuration header used by positioning.hpp.
Well, color me confused. seekpos() is called from positioning.hpp, which seekpos() is the thing going away, correct?
The change to fpos.hpp makes positioning.hpp use a different code path that no longer calls (or compiles any calls to) seekpos().
Clearly you've done the root cause analysis; I'm just reporting them as I see them.
I knew absolutely nothing about this issue until I replied to your message; I just spent five minutes reading the code.
Oh, I see. I had no idea. So, I applied the patch, still need to define the acknowledgment apparently. Thanks...
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Gavin Lambert
-
Michael Powell