You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thank you for merging the Validator branch so fast.
I'm about to use it now and found a difference in behauvior of Document and SchemaDocument where I wonder if this is important. To me it seems that the copy constructor of SchemaDocument is implicitly deleted while Document maybe copied. Did I perceive this correctly? Alternatively I can of course use smart pointers, but just being curious, thus asking here :) So feel free to close it without much explanations please.
SchemaDocument const& schema = load_schema_from_file(schema_file);
Document const& document = load_json_from_file(path_to_file);
json_parser.cpp: In function ‘rapidjson::SchemaDocument load_schema_from_file(const string&)’:
json_parser.cpp:1397:52: error: use of deleted function ‘rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<> > >::GenericSchemaDocument(const rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<> > >&)’
return ::rapidjson::SchemaDocument(document);
^
In file included from json_validator.hpp:7:0,
from json_parser.cpp:42:
/usr/include/rapidjson/schema.h:1304:7: note: ‘rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<> > >::GenericSchemaDocument(const rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<> > >&)’ is implicitly deleted because the default definition would be ill-formed:
class GenericSchemaDocument {
^
In file included from /usr/include/rapidjson/reader.h:23:0,
from /usr/include/rapidjson/document.h:20,
from json_parser.cpp:13:
/usr/include/rapidjson/internal/stack.h:212:5: error: ‘rapidjson::internal::Stack<Allocator>::Stack(const rapidjson::internal::Stack<Allocator>&) [with Allocator = rapidjson::CrtAllocator]’ is private
Stack(const Stack&);
^
In file included from json_validator.hpp:7:0,
from json_parser.cpp:42:
/usr/include/rapidjson/schema.h:1304:7: error: within this context
class GenericSchemaDocument {
^
In file included from /usr/include/rapidjson/reader.h:23:0,
from /usr/include/rapidjson/document.h:20,
from json_parser.cpp:13:
/usr/include/rapidjson/internal/stack.h:212:5: error: ‘rapidjson::internal::Stack<Allocator>::Stack(const rapidjson::internal::Stack<Allocator>&) [with Allocator = rapidjson::CrtAllocator]’ is private
Stack(const Stack&);
^
In file included from json_validator.hpp:7:0,
from json_parser.cpp:42:
/usr/include/rapidjson/schema.h:1304:7: error: within this context
class GenericSchemaDocument {
^
ninja: build stopped: subcommand failed.
The text was updated successfully, but these errors were encountered:
Hello @miloyip,
thank you for merging the Validator branch so fast.
I'm about to use it now and found a difference in behauvior of
Document
andSchemaDocument
where I wonder if this is important. To me it seems that the copy constructor ofSchemaDocument
is implicitly deleted whileDocument
maybe copied. Did I perceive this correctly? Alternatively I can of course use smart pointers, but just being curious, thus asking here :) So feel free to close it without much explanations please.Stacktrace:
The text was updated successfully, but these errors were encountered: