mercredi 1 janvier 2020

Compilation error in list while using C++11

I get the following error while compiling my C++ code using std=c++11 option.

In file included from /usr/include/c++/7/list:63:0,
                 from /usr/include/qt4/QtCore/qlist.h:51,
                 from /usr/include/qt4/QtCore/QList:1,

/usr/include/c++/7/bits/stl_list.h:591:68: error: ‘std::is_nothrow_default_constructible<typename std::__cxx11::_List_base<_Tp, _Alloc>::_Node_alloc_type>::value’ is not a type
       noexcept(is_nothrow_default_constructible<_Node_alloc_type>::value)

The code compiles, if I use std=c++98 option! But I need to compile it using C++11.

Aucun commentaire:

Enregistrer un commentaire