Open puentev opened 7 years ago
Same here.
Why is it incorrectly? I would simply remove the variable like this:
diff --git a/include/cereal/archives/json.hpp b/include/cereal/archives/json.hpp
index 102f86e..05a77a5 100644
--- a/include/cereal/archives/json.hpp
+++ b/include/cereal/archives/json.hpp
@@ -488,7 +488,7 @@ namespace cereal
}
Iterator(ValueIterator begin, ValueIterator end) :
- itsValueItBegin(begin), itsValueItEnd(end), itsIndex(0), itsType(Value)
+ itsValueItBegin(begin), itsIndex(0), itsType(Value)
{
if( std::distance( begin, end ) == 0 )
itsType = Null_;
@@ -543,7 +543,7 @@ namespace cereal
private:
MemberIterator itsMemberItBegin, itsMemberItEnd; //!< The member iterator (object)
- ValueIterator itsValueItBegin, itsValueItEnd; //!< The value iterator (array)
+ ValueIterator itsValueItBegin; //!< The value iterator (array)
size_t itsIndex; //!< The current index of this iterator
enum Type {Value, Member, Null_} itsType; //!< Whether this holds values (array) or members (objects) or nothing
};
Agreed with @jhasse just remove the member and its initialization, its not used.
Again json, xcode9.0 compiler (incorrectly) detect a private member in json.hpp as unused.
The compiler version is:
The workaraound is to tell clang to ignore that (with a couple of pragmas):