2

So I'm trying to use boost::property_tree::read_json.

For this I need to: #include <boost/property_tree/json_parser.hpp>

When I try though I get:

warning C4512: boost::property_tree::json_parser::detail::source<Encoding,Iterator,Sentinel> : assignment operator could not be generated

I can disable this warning, but that feels particularly nasty. I would have assumed that Boost would have compiled warning free?

I'm using and I've seen this error on Boost 1.59.1 as well as Boost 1.65.1, and I found a comment here suggesting it's been around since Boost 1.57.0. Do I have to disable this warning or is there a workaround?

Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288

1 Answers1

2

There are lots of boost headers I do the following with:

#pragma warning(push)
#pragma warning(disable : <warning-number>)
#include <boost...>
#pragma warning(pop)
SoronelHaetir
  • 14,104
  • 1
  • 12
  • 23