-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix VS 2012 breakage caused by explicit operator #731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Dani-Hub
added a commit
to Dani-Hub/jsoncpp
that referenced
this issue
Jan 13, 2018
…to restore VS 2012 support after recent introduction of explicit conversion function in JSON::Value.
Let's make the special-case for the older compiler. Feel free to submit a PR. |
cdunn2001
pushed a commit
that referenced
this issue
Jan 20, 2018
…support after recent introduction of explicit conversion function in JSON::Value.
Oh, it was already done. Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pull request #695 has added an unconditional explicit conversion function to class
Json::Value
(See json/value.h line 404). This breaks Visual Studio 2012, which understand basic C++11, but not explicit conversion functions (These are supported since VS 2013).The previous VS 2012 support could be restored by using a similar
JSONCPP_XXX
approach as has been used foroverride
andnoexcept
, but this time for theexplicit
keyword used for conversion functions, for example by definingfor fully conforming C++11 compilers and
otherwise and then using the
JSONCPP_OP_EXPLICIT
macro as prefix of theoperator bool
declaration.I would create a pull request for this approach, if the basic idea sounds reasonable.
The text was updated successfully, but these errors were encountered: