Skip to content

Commit

Permalink
#ifndef _MSC_VER out implicit string creation. fails to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
RossBencina committed May 24, 2015
1 parent 540b763 commit 03b0d1d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ class basic_json
: basic_json(string_t(value))
{}

#ifndef _MSC_VER
/// create a string (implicit)
template <class V, typename
std::enable_if<
Expand All @@ -428,6 +429,12 @@ class basic_json
inline basic_json(const V& value)
: basic_json(string_t(value))
{}
#else
// MSVC2013 fails with:
// json.hpp(434): error C2794 : 'basic_json' : is not a member of any direct or indirect base class of 'nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,double,std::allocator>'
// json.hpp(4921) : see reference to class template instantiation 'nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,double,std::allocator>' being compiled
// Not sure how to fix this.
#endif

/// create a boolean (explicit)
inline basic_json(boolean_t value)
Expand Down

0 comments on commit 03b0d1d

Please sign in to comment.