Skip to content
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

Warning on Intel compiler (icc 17) #550

Closed
mark-99 opened this issue Apr 7, 2017 · 16 comments
Closed

Warning on Intel compiler (icc 17) #550

mark-99 opened this issue Apr 7, 2017 · 16 comments
Assignees
Milestone

Comments

@mark-99
Copy link

mark-99 commented Apr 7, 2017

The warning below is generated when compiling with icc. I realise this is likely the compiler's fault, but perhaps there is a workaround which would make it work.

edit Actually Intel seem to think it's a valid warning: https://software.intel.com/en-us/forums/intel-c-compiler/topic/596393


nlohmann-json/json/json.hpp(9024): error #597: "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl::operator nlohmann::basic_json<std::map, std::vector, std::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<const nlohmann::basic_json<std::map, std::vector, std::string, bool,
int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>() const [with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=const nlohmann::basic_json<std::map, std::vector, std::string, bool, int64_t={long}, uint64_t={unsigned long}, double,
std::allocator, nlohmann::adl_serializer>]" will not be called for implicit or explicit conversions
operator const_iterator() const
^
detected during instantiation of class "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl [with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=const
nlohmann::basic_json<std::map, std::vector, std::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>]"

@mark-99 mark-99 changed the title Doesn't compile on Intel compiler (icc 16 or icc 17) Warning on Intel compiler (icc 16 or icc 17) Apr 7, 2017
@nlohmann
Copy link
Owner

nlohmann commented Apr 7, 2017

Thanks for the report! We never got feedback on using ICC so far. May I ask which version of the library you are using?

@mark-99
Copy link
Author

mark-99 commented Apr 7, 2017

2.1.1 (latest I think?).
If I suppress the warning it seems to work ok.
Note BTW I get a different problem with icc16, but I'm prepared to ignore that compiler as too old now.

@mark-99 mark-99 closed this as completed Apr 7, 2017
@mark-99 mark-99 reopened this Apr 7, 2017
@mark-99 mark-99 changed the title Warning on Intel compiler (icc 16 or icc 17) Warning on Intel compiler (icc 17) Apr 7, 2017
@nlohmann
Copy link
Owner

nlohmann commented Apr 8, 2017

Just to better understand: is it a warning or an error?

@mark-99
Copy link
Author

mark-99 commented Apr 8, 2017 via email

@nlohmann
Copy link
Owner

nlohmann commented Apr 8, 2017

Ok. I applied for a free version of ICC to check this myself.

@nlohmann
Copy link
Owner

nlohmann commented Apr 10, 2017

I can confirm the error.

cmake output
$ cmake .. -DCMAKE_C_COMPILER=/opt/intel/bin/icc -DCMAKE_CXX_COMPILER=/opt/intel/bin/icpc -DCMAKE_CXX_FLAGS=-std=c++11
-- The CXX compiler identification is Intel 17.0.2.20170213
-- Check for working CXX compiler: /opt/intel/bin/icpc
-- Check for working CXX compiler: /opt/intel/bin/icpc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- cotire 1.7.9 loaded.
-- CXX target json_unit cotired without unity build.
-- Configuring done
-- Generating done
-- Build files have been written to: /vagrant/json/build
ubuntu@ubuntu-xenial:/vagrant/json/build$ make
Scanning dependencies of target catch_main
[  2%] Building CXX object test/CMakeFiles/catch_main.dir/src/unit.cpp.o
[  2%] Built target catch_main
[  5%] Generating CXX prefix header test/cotire/json_unit_CXX_prefix.hxx
Scanning dependencies of target json_unit
[  7%] Building CXX object test/CMakeFiles/json_unit.dir/src/unit-algorithms.cpp.o
"/vagrant/json/test/src/unit-algorithms.cpp": creating precompiled header file "/vagrant/json/build/test/cotire/json_unit_CXX_prefix.pchi"
/vagrant/json/src/json.hpp(9719): warning #597: "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<const nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long},
          uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>() const [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=const nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double,
          std::allocator, nlohmann::adl_serializer>]" will not be called for implicit or explicit conversions
          operator const_iterator() const
          ^
          detected during instantiation of class "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer,
                    U=const nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>]" at line 83 of "/vagrant/json/test/src/unit-algorithms.cpp"

/vagrant/json/src/json.hpp(9749): error: identifier "internal_iterator" is undefined
              std::is_nothrow_move_constructible<internal_iterator>::value and
                                                 ^
          detected during:
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(789): error: incomplete type is not allowed
      : public __is_destructible_safe<_Tp>::type
               ^
          detected during:
            instantiation of class "std::is_destructible<_Tp> [with _Tp=<error-type>]" at line 138
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_destructible<<error-type>>, _B2=std::__is_direct_constructible_impl<<error-type>, <error-type> &&>]" at line 954
            instantiation of class "std::__is_direct_constructible_new_safe<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1031
            instantiation of class "std::__is_direct_constructible_new<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1039
            instantiation of class "std::__is_direct_constructible<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1079
            [ 4 instantiation contexts not shown ]
            instantiation of class "std::__is_nothrow_move_constructible_impl<_Tp, true> [with _Tp=<error-type>]" at line 1212
            instantiation of class "std::is_nothrow_move_constructible<_Tp> [with _Tp=<error-type>]" at line 9749 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(789): error: not a class or struct name
      : public __is_destructible_safe<_Tp>::type
               ^
          detected during:
            instantiation of class "std::is_destructible<_Tp> [with _Tp=<error-type>]" at line 138
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_destructible<<error-type>>, _B2=std::__is_direct_constructible_impl<<error-type>, <error-type> &&>]" at line 954
            instantiation of class "std::__is_direct_constructible_new_safe<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1031
            instantiation of class "std::__is_direct_constructible_new<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1039
            instantiation of class "std::__is_direct_constructible<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1079
            [ 4 instantiation contexts not shown ]
            instantiation of class "std::__is_nothrow_move_constructible_impl<_Tp, true> [with _Tp=<error-type>]" at line 1212
            instantiation of class "std::is_nothrow_move_constructible<_Tp> [with _Tp=<error-type>]" at line 9749 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(138): error: class "std::is_destructible<<error-type>>" has no member "value"
      : public conditional<_B1::value, _B2, _B1>::type
                                ^
          detected during:
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_destructible<<error-type>>, _B2=std::__is_direct_constructible_impl<<error-type>, <error-type> &&>]" at line 954
            instantiation of class "std::__is_direct_constructible_new_safe<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1031
            instantiation of class "std::__is_direct_constructible_new<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1039
            instantiation of class "std::__is_direct_constructible<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1079
            instantiation of class "std::__is_constructible_impl<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1090
            [ 3 instantiation contexts not shown ]
            instantiation of class "std::__is_nothrow_move_constructible_impl<_Tp, true> [with _Tp=<error-type>]" at line 1212
            instantiation of class "std::is_nothrow_move_constructible<_Tp> [with _Tp=<error-type>]" at line 9749 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(954): error: class "std::__and_<std::is_destructible<<error-type>>, std::__is_direct_constructible_impl<<error-type>, <error-type> &&>>" has no member class "type"
                      __is_direct_constructible_impl<_Tp, _Arg>>::type
                                                                  ^
          detected during:
            instantiation of class "std::__is_direct_constructible_new_safe<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1031
            instantiation of class "std::__is_direct_constructible_new<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1039
            instantiation of class "std::__is_direct_constructible<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1079
            instantiation of class "std::__is_constructible_impl<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1090
            instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 138
            [ 2 instantiation contexts not shown ]
            instantiation of class "std::__is_nothrow_move_constructible_impl<_Tp, true> [with _Tp=<error-type>]" at line 1212
            instantiation of class "std::is_nothrow_move_constructible<_Tp> [with _Tp=<error-type>]" at line 9749 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(953): error: not a class or struct name
      : public __and_<is_destructible<_Tp>,
               ^
          detected during:
            instantiation of class "std::__is_direct_constructible_new_safe<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1031
            instantiation of class "std::__is_direct_constructible_new<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1039
            instantiation of class "std::__is_direct_constructible<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1079
            instantiation of class "std::__is_constructible_impl<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1090
            instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 138
            [ 2 instantiation contexts not shown ]
            instantiation of class "std::__is_nothrow_move_constructible_impl<_Tp, true> [with _Tp=<error-type>]" at line 1212
            instantiation of class "std::is_nothrow_move_constructible<_Tp> [with _Tp=<error-type>]" at line 9749 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(1039): error: class "std::__is_direct_constructible_new<<error-type>, <error-type> &&>" has no member class "type"
      : public __is_direct_constructible_new<_Tp, _Arg>::type
                                                         ^
          detected during:
            instantiation of class "std::__is_direct_constructible<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1079
            instantiation of class "std::__is_constructible_impl<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1090
            instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 138
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_constructible<<error-type>, <error-type> &&>, _B2=std::__is_nt_constructible_impl<<error-type>, <error-type> &&>]" at line 1176
            instantiation of class "std::is_nothrow_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 1206
            instantiation of class "std::__is_nothrow_move_constructible_impl<_Tp, true> [with _Tp=<error-type>]" at line 1212
            instantiation of class "std::is_nothrow_move_constructible<_Tp> [with _Tp=<error-type>]" at line 9749 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(1039): error: not a class or struct name
      : public __is_direct_constructible_new<_Tp, _Arg>::type
               ^
          detected during:
            instantiation of class "std::__is_direct_constructible<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1079
            instantiation of class "std::__is_constructible_impl<_Tp, _Arg> [with _Tp=<error-type>, _Arg=<error-type> &&]" at line 1090
            instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 138
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_constructible<<error-type>, <error-type> &&>, _B2=std::__is_nt_constructible_impl<<error-type>, <error-type> &&>]" at line 1176
            instantiation of class "std::is_nothrow_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 1206
            instantiation of class "std::__is_nothrow_move_constructible_impl<_Tp, true> [with _Tp=<error-type>]" at line 1212
            instantiation of class "std::is_nothrow_move_constructible<_Tp> [with _Tp=<error-type>]" at line 9749 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(1090): error: class "std::__is_constructible_impl<<error-type>, <error-type> &&>" has no member class "type"
      : public __is_constructible_impl<_Tp, _Args...>::type
                                                       ^
          detected during:
            instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 138
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_constructible<<error-type>, <error-type> &&>, _B2=std::__is_nt_constructible_impl<<error-type>, <error-type> &&>]" at line 1176
            instantiation of class "std::is_nothrow_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 1206
            instantiation of class "std::__is_nothrow_move_constructible_impl<_Tp, true> [with _Tp=<error-type>]" at line 1212
            instantiation of class "std::is_nothrow_move_constructible<_Tp> [with _Tp=<error-type>]" at line 9749 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(1090): error: not a class or struct name
      : public __is_constructible_impl<_Tp, _Args...>::type
               ^
          detected during:
            instantiation of class "std::is_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 138
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_constructible<<error-type>, <error-type> &&>, _B2=std::__is_nt_constructible_impl<<error-type>, <error-type> &&>]" at line 1176
            instantiation of class "std::is_nothrow_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 1206
            instantiation of class "std::__is_nothrow_move_constructible_impl<_Tp, true> [with _Tp=<error-type>]" at line 1212
            instantiation of class "std::is_nothrow_move_constructible<_Tp> [with _Tp=<error-type>]" at line 9749 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(138): error: class "std::is_constructible<<error-type>, <error-type> &&>" has no member "value"
      : public conditional<_B1::value, _B2, _B1>::type
                                ^
          detected during:
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_constructible<<error-type>, <error-type> &&>, _B2=std::__is_nt_constructible_impl<<error-type>, <error-type> &&>]" at line 1176
            instantiation of class "std::is_nothrow_constructible<_Tp, _Args...> [with _Tp=<error-type>, _Args=<<error-type> &&>]" at line 1206
            instantiation of class "std::__is_nothrow_move_constructible_impl<_Tp, true> [with _Tp=<error-type>]" at line 1212
            instantiation of class "std::is_nothrow_move_constructible<_Tp> [with _Tp=<error-type>]" at line 9749 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/vagrant/json/src/json.hpp(9750): error: identifier "internal_iterator" is undefined
              std::is_nothrow_move_assignable<internal_iterator>::value
                                              ^
          detected during:
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(1234): error: class "std::__is_assignable_helper<<error-type> &, <error-type> &&>" has no member class "type"
        : public __is_assignable_helper<_Tp, _Up>::type
                                                   ^
          detected during:
            instantiation of class "std::is_assignable<_Tp, _Up> [with _Tp=<error-type> &, _Up=<error-type> &&]" at line 138
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_assignable<<error-type> &, <error-type> &&>, _B2=std::__is_nt_assignable_impl<<error-type> &, <error-type> &&>]" at line 1282
            instantiation of class "std::is_nothrow_assignable<_Tp, _Up> [with _Tp=<error-type> &, _Up=<error-type> &&]" at line 1312
            instantiation of class "std::__is_nt_move_assignable_impl<_Tp, true> [with _Tp=<error-type>]" at line 1318
            instantiation of class "std::is_nothrow_move_assignable<_Tp> [with _Tp=<error-type>]" at line 9750 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(1234): error: not a class or struct name
        : public __is_assignable_helper<_Tp, _Up>::type
                 ^
          detected during:
            instantiation of class "std::is_assignable<_Tp, _Up> [with _Tp=<error-type> &, _Up=<error-type> &&]" at line 138
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_assignable<<error-type> &, <error-type> &&>, _B2=std::__is_nt_assignable_impl<<error-type> &, <error-type> &&>]" at line 1282
            instantiation of class "std::is_nothrow_assignable<_Tp, _Up> [with _Tp=<error-type> &, _Up=<error-type> &&]" at line 1312
            instantiation of class "std::__is_nt_move_assignable_impl<_Tp, true> [with _Tp=<error-type>]" at line 1318
            instantiation of class "std::is_nothrow_move_assignable<_Tp> [with _Tp=<error-type>]" at line 9750 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

/usr/include/c++/5/type_traits(138): error: class "std::is_assignable<<error-type> &, <error-type> &&>" has no member "value"
      : public conditional<_B1::value, _B2, _B1>::type
                                ^
          detected during:
            instantiation of class "std::__and_<_B1, _B2> [with _B1=std::is_assignable<<error-type> &, <error-type> &&>, _B2=std::__is_nt_assignable_impl<<error-type> &, <error-type> &&>]" at line 1282
            instantiation of class "std::is_nothrow_assignable<_Tp, _Up> [with _Tp=<error-type> &, _Up=<error-type> &&]" at line 1312
            instantiation of class "std::__is_nt_move_assignable_impl<_Tp, true> [with _Tp=<error-type>]" at line 1318
            instantiation of class "std::is_nothrow_move_assignable<_Tp> [with _Tp=<error-type>]" at line 9750 of "/vagrant/json/src/json.hpp"
            instantiation of "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U> &nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator=(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
                      NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator,
                      nlohmann::adl_serializer>]" at line 952 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_ForwardIterator std::__adjacent_find(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>,
                      _BinaryPredicate=__gnu_cxx::__ops::_Iter_equal_to_iter]" at line 3918 of "/usr/include/c++/5/bits/stl_algo.h"
            instantiation of "_FIter std::adjacent_find(_FIter, _FIter) [with _FIter=nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>]" at line 185 of "/vagrant/json/test/src/unit-algorithms.cpp"

compilation aborted for /vagrant/json/test/src/unit-algorithms.cpp (code 2)
test/CMakeFiles/json_unit.dir/build.make:67: recipe for target 'test/CMakeFiles/json_unit.dir/src/unit-algorithms.cpp.o' failed
make[2]: *** [test/CMakeFiles/json_unit.dir/src/unit-algorithms.cpp.o] Error 2
CMakeFiles/Makefile2:122: recipe for target 'test/CMakeFiles/json_unit.dir/all' failed
make[1]: *** [test/CMakeFiles/json_unit.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

@nlohmann
Copy link
Owner

But this error looks weird:

/vagrant/json/src/json.hpp(9749): error: identifier "internal_iterator" is undefined
              std::is_nothrow_move_constructible<internal_iterator>::value and
                                                 ^

This is the code:

        iter_impl& operator=(iter_impl other) noexcept(
            std::is_nothrow_move_constructible<pointer>::value and
            std::is_nothrow_move_assignable<pointer>::value and
            std::is_nothrow_move_constructible<internal_iterator>::value and
            std::is_nothrow_move_assignable<internal_iterator>::value
        )
        {
            std::swap(m_object, other.m_object);
            std::swap(m_it, other.m_it);
            return *this;
        }

@mark-99
Copy link
Author

mark-99 commented Apr 10, 2017

Yeah that looks like it. I didn't see the second one, but our build system was warnings-as-errors enabled by default so I think it just bailed at the first one.

@nlohmann
Copy link
Owner

I haven't fully understood the warning in the first place...

@mark-99
Copy link
Author

mark-99 commented Apr 10, 2017

There's some info on that Intel forum post in the OP.
I think it's warning that a conversion/cast operator that returns the name of a template doesn't make sense (as it's a template, not a type).

The example they give is:

template <class T>
class B
{
  operator B() const { };
};

So this says "convert to a B", but there is no such thing as type B, only type B<T>. So it has to be explicitly qualified somehow or it will never be called.

Or something like that :)

@nlohmann
Copy link
Owner

To use your example:

using const_iterator = iter_impl<const basic_json>;

template<typename U>
class iter_impl
{
  operator const_iterator() const { };
};

I tried to change the operator to use iter_impl<const basic_json> rather than const_iterator, but got the same message:

json.hpp(9719): warning #597: "nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::iter_impl<U>::operator nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>::iter_impl<const nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long},
          uint64_t={unsigned long}, double, std::allocator, nlohmann::adl_serializer>>() const [with ObjectType=std::map, ArrayType=std::vector, StringType=std::__cxx11::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, U=const nlohmann::basic_json<std::map, std::vector, std::__cxx11::string, bool, int64_t={long}, uint64_t={unsigned long}, double,
          std::allocator, nlohmann::adl_serializer>]" will not be called for implicit or explicit conversions
          operator iter_impl<const basic_json>() const
          ^

@nlohmann
Copy link
Owner

Maybe @Bosswestfalen has an idea - he wrote that code in the first place ;-)

@HenryRLee
Copy link
Contributor

The operator() is for the conversion from iterator to const_iterator, right?

I think we can just define a constructor and assignment from iterator type to the general iterator type (both const and non const), instead of operator().

So the signature of the constructor may look like this:

iter_impl(const iter_impl<basic_json> &);

@HenryRLee
Copy link
Contributor

HenryRLee commented May 30, 2017

I set up the Intel studio environment and tested. Using a converting constructor from iterator to const iterator, instead of the operator(), as I mentioned in the previous message, can resolve the warning.

As for the second error, it's due to the internal_iterator is a struct type, therefore the more formal way of using this type name is struct internal_iterator.

Fixing these two allows my compiling went through 31%, but then it stopped because my virtual machine ran out of memory. I couldn't test further. Hopefully there wouldn't be any more errors.

nlohmann added a commit that referenced this issue Jun 6, 2017
#550 Fix iterator related compiling issues for Intel icc
@nlohmann
Copy link
Owner

nlohmann commented Jun 6, 2017

Fixed with #598.

@nlohmann nlohmann closed this as completed Jun 6, 2017
@nlohmann nlohmann self-assigned this Jun 6, 2017
@nlohmann nlohmann added this to the Release 3.0.0 milestone Jun 6, 2017
@nlohmann nlohmann added the platform: icc related to Intel compiler label Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants