You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A fresh checkout of the develop branch of the library fails to build with Clang 6.0.1, 7.0.1, and 8.0.0 under CentOS 7 when compiled in C++14 mode with the following error:
json/single_include/nlohmann/json.hpp:13192:38: error: too few template arguments for class template 'less'
using object_comparator_t = std::less<>;
^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_function.h:231:12: note: template is declared here
struct less : public binary_function<_Tp, _Tp, bool>
^
In file included from /home/mmoller/foo/json/test/src/unit-wstring.cpp:32:
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:13282:11: error: use of undeclared identifier 'object_comparator_t'
object_comparator_t,
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:13674:9: error: unknown type name 'object_t'
object_t* object;
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:13776:26: error: unknown type name 'object_t'
json_value(const object_t& value)
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:13782:20: error: unknown type name 'object_t'
json_value(object_t&& value)
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15181:5: error: unknown type name 'object_t'
object_t* get_impl_ptr(object_t* /*unused*/) noexcept
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15181:28: error: unknown type name 'object_t'
object_t* get_impl_ptr(object_t* /*unused*/) noexcept
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15187:21: error: unknown type name 'object_t'
constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15187:50: error: unknown type name 'object_t'
constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15827:33: error: use of undeclared identifier 'object_t'
reference at(const typename object_t::key_type& key)
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15827:43: error: expected a qualified name after 'typename'
reference at(const typename object_t::key_type& key)
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15827:51: error: expected ')'
reference at(const typename object_t::key_type& key)
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15827:17: note: to match this '('
reference at(const typename object_t::key_type& key)
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15878:39: error: use of undeclared identifier 'object_t'
const_reference at(const typename object_t::key_type& key) const
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15878:49: error: expected a qualified name after 'typename'
const_reference at(const typename object_t::key_type& key) const
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15878:57: error: expected ')'
const_reference at(const typename object_t::key_type& key) const
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:15878:23: note: to match this '('
const_reference at(const typename object_t::key_type& key) const
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:16008:41: error: use of undeclared identifier 'object_t'
reference operator[](const typename object_t::key_type& key)
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:16008:51: error: expected a qualified name after 'typename'
reference operator[](const typename object_t::key_type& key)
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:16008:59: error: expected ')'
reference operator[](const typename object_t::key_type& key)
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:16008:25: note: to match this '('
reference operator[](const typename object_t::key_type& key)
^
/home/mmoller/foo/json/single_include/nlohmann/json.hpp:16057:47: error: use of undeclared identifier 'object_t'
const_reference operator[](const typename object_t::key_type& key) const
Steps to reproduce:
$> CC=`which clang` CXX=`which clang++` cmake .. -DCMAKE_CXX_STANDARD=14
$> make
Remarks:
The same error occurs when using the master branch.
Compiling the same checkout GCC (tested with 4.8.5 and above) works fine.
The text was updated successfully, but these errors were encountered:
The problem seems to be due to the fact that I compiled clang from the sources on my CentOS machine, whereby GCC 4.8.5 was used, which does not support C++14 to full extent. A properly compiled clang works without problems. Thanks for the quick help.
Am 08.06.2019 um 18:55 schrieb Niels Lohmann <notifications@github.com<mailto:notifications@github.com>>:
I cannot reproduce this - at least with Clang 7.0.0 on Ubuntu, I can execute the exact commands you provided without error.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#1628?email_source=notifications&email_token=AAPGPIZOZZK3FBUA3CSU3LTPZPQAHA5CNFSM4HWHDPT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXHYSTI#issuecomment-500140365>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAPGPI3CUIKVCHG62JMN6BLPZPQAHANCNFSM4HWHDPTQ>.
Problem
A fresh checkout of the develop branch of the library fails to build with Clang 6.0.1, 7.0.1, and 8.0.0 under CentOS 7 when compiled in C++14 mode with the following error:
Steps to reproduce:
Remarks:
The text was updated successfully, but these errors were encountered: