Description
Hey there,
I have a problem when compiling a project using json.hpp.
When I use Microsoft Visual Studio 2015 Update 3 on Windows7 everything worsk fine, but when I use Mircosoft Visual Studio 2017 on Windows 10, I get the following error:
\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(887): error C4579: 'nlohmann::detail::static_constnlohmann::detail::to_json_fn::value': in-class initialization for type 'const T' is not yet implemented; static member will remain uninitialized at runtime but use in constant-expressions is supported
2> with
2> [
2> T=nlohmann::detail::to_json_fn
2> ]
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(898): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "nlohmann::detail::static_constnlohmann::detail::to_json_fn".
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(887): error C2131: Ausdruck wurde nicht zu einer Konstanten ausgewertet.
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(887): note: Fehler wurde durch Rückgabe der Adresse eines temporären Elements oder eines Verweises zu einem temporären Element verursacht
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(887): error C2059: Syntaxfehler: "="
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(887): error C4579: 'nlohmann::detail::static_constnlohmann::detail::from_json_fn::value': in-class initialization for type 'const T' is not yet implemented; static member will remain uninitialized at runtime but use in constant-expressions is supported
2> with
2> [
2> T=nlohmann::detail::from_json_fn
2> ]
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(899): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "nlohmann::detail::static_constnlohmann::detail::from_json_fn".
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): error C2784: "_Ty *std::begin(_Ty (&)[_Size]) noexcept": template-Argument für "_Ty (&)[_Size]" konnte nicht von "add_rvalue_reference::type" hergeleitet werden.
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xutility(1250): note: Siehe Deklaration von "std::begin"
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits(761): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "nlohmann::basic_jsonstd::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer".
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits(790): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "std::is_nothrow_constructible<_Ty,nlohmann::basic_jsonstd::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer &&>".
2> with
2> [
2> _Ty=nlohmann::json
2> ]
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(12931): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "std::is_nothrow_move_constructiblenlohmann::json".
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): error C2893: Funktionsvorlage "unknown-type std::begin(const _Container &)" konnte nicht spezialisiert werden
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): note: Mit den folgenden Vorlagenargumenten:
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): note: "_Container=add_rvalue_reference::type"
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): error C2893: Funktionsvorlage "unknown-type std::begin(_Container &)" konnte nicht spezialisiert werden
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): note: Mit den folgenden Vorlagenargumenten:
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): note: "_Container=add_rvalue_reference::type"
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): error C2784: "const _Elem *std::begin(std::initializer_list<_Elem>) noexcept": template-Argument für "std::initializer_list<_Elem>" konnte nicht von "add_rvalue_reference::type" hergeleitet werden.
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\initializer_list(60): note: Siehe Deklaration von "std::begin"
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\Source\EyeTrackingPlugin\Private\MultipartMessage.cpp(46): warning C4456: Deklaration von "msg" blendet vorherige lokale Deklaration aus
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\Source\EyeTrackingPlugin\Private\MultipartMessage.cpp(23): note: Siehe Deklaration von "msg"
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(887): error C4579: 'nlohmann::detail::static_constnlohmann::detail::to_json_fn::value': in-class initialization for type 'const T' is not yet implemented; static member will remain uninitialized at runtime but use in constant-expressions is supported
2> with
2> [
2> T=nlohmann::detail::to_json_fn
2> ]
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(898): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "nlohmann::detail::static_constnlohmann::detail::to_json_fn".
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(887): error C2131: Ausdruck wurde nicht zu einer Konstanten ausgewertet.
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(887): note: Fehler wurde durch Rückgabe der Adresse eines temporären Elements oder eines Verweises zu einem temporären Element verursacht
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(887): error C2059: Syntaxfehler: "="
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(887): error C4579: 'nlohmann::detail::static_constnlohmann::detail::from_json_fn::value': in-class initialization for type 'const T' is not yet implemented; static member will remain uninitialized at runtime but use in constant-expressions is supported
2> with
2> [
2> T=nlohmann::detail::from_json_fn
2> ]
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(899): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "nlohmann::detail::static_constnlohmann::detail::from_json_fn".
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): error C2784: "_Ty *std::begin(_Ty (&)[_Size]) noexcept": template-Argument für "_Ty (&)[_Size]" konnte nicht von "add_rvalue_reference::type" hergeleitet werden.
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xutility(1250): note: Siehe Deklaration von "std::begin"
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits(761): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "nlohmann::basic_jsonstd::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer".
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits(790): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "std::is_nothrow_constructible<_Ty,nlohmann::basic_jsonstd::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer &&>".
2> with
2> [
2> _Ty=nlohmann::json
2> ]
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(12931): note: Siehe Verweis auf die Instanziierung der gerade kompilierten Klassen-template "std::is_nothrow_move_constructiblenlohmann::json".
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): error C2893: Funktionsvorlage "unknown-type std::begin(const _Container &)" konnte nicht spezialisiert werden
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): note: Mit den folgenden Vorlagenargumenten:
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): note: "_Container=add_rvalue_reference::type"
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): error C2893: Funktionsvorlage "unknown-type std::begin(_Container &)" konnte nicht spezialisiert werden
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): note: Mit den folgenden Vorlagenargumenten:
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): note: "_Container=add_rvalue_reference::type"
2>D:\Uni\Bachelorarbeit\EyeTracking4_15\Plugins\EyeTrackingPlugin\ThirdParty\PupilLabs\include\json.hpp(6482): error C2784: "const _Elem *std::begin(std::initializer_list<_Elem>) noexcept": template-Argument für "std::initializer_list<_Elem>" konnte nicht von "add_rvalue_reference::type" hergeleitet werden.
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\initializer_list(60): note: Siehe Deklaration von "std::begin"
Is either Visual Studio 2017 or Windows 10 not supported yet?