Public bug reported:
Ubuntu release 18.04.1
Package version 2.1.1-1.1
Bug is reported already reported and resolved in upstream.
Compiling error from upstream issue about Ubuntu[0]:
In file included from test_json.cpp:6:0:
/usr/include/nlohmann/json.hpp: In function ‘bool
nlohmann::operator<(nlohmann::basic_json<ObjectType, ArrayType, StringType,
BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType,
AllocatorType, JSONSerializer>::const_reference,
nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType,
NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType,
JSONSerializer>::const_reference)’:
/usr/include/nlohmann/json.hpp:6057:62: error: wrong number of template
arguments (1, should be 2)
return *lhs.m_value.array < *rhs.m_value.array;
^~~~~
In file included from /usr/include/nlohmann/json.hpp:33:0,
from test_json.cpp:6:
/usr/include/c++/7/array:94:12: note: provided for ‘template<class _Tp, long
unsigned int _Nm> struct std::array’
struct array
^~~~~
Upstream issue discussing this bug - [1]
Proposed solution[2]:
> Changing the line in json.hpp to read
> return (*lhs.m_value.array) < *rhs.m_value.array;
> seems to fix the error using that simple test case.
Bug was fixed in [3]. Versions >=3.0.0 has this fix.
[0] https://github.com/nlohmann/json/issues/1110
[1] https://github.com/nlohmann/json/issues/590
[2] https://github.com/nlohmann/json/issues/590#issuecomment-305988306
[3]
https://github.com/nlohmann/json/commit/1a9d76679a3f41a038a89742fba29d81ee24ce82
** Affects: nlohmann-json (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1815441
Title:
Programs can not be compiled compile with header nlohmann/json.hpp
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nlohmann-json/+bug/1815441/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs