GenericValue: explicit constructors
In case of overloaded functions taking either a GenericValue or another class that can also be constructed from the same primitive types (e.g. std::string, which can be constructed from const char*), the overloading becomes ambiguous: void foo( const std::string& ); void foo( const rapidjson::Value & ); Declaring the GenericValue constructors taking primitive types as 'explicit' avoids this problem. This should not have any negative side-effects, since a GenericValue can't be copied or implicitly converted to other types. Fixes http://code.google.com/p/rapidjson/issues/detail?id=70.
Showing
Please
register
or
sign in
to comment