|
Boost Users : |
Subject: [Boost-users] boost with c++11
From: Christian Meesters (meesters_at_[hidden])
Date: 2016-04-13 08:50:29
Dear All,
Perhaps my question has been covered already, in this case a pointer to
the relevant docs / thread would be highly appreciated. However, I have
not been able to find the answer on my question:
My code makes use of the C++11 standard and the standard libraries. I
feel tempted to employ more current features, also beyond C++11,
eventually.
When downloading the boost 1.60.0 release and compiling with
cxxflags='-std=c++11 -march=native' toolset=gcc linkflags=-stdlib=libc++
supplied to b2 compilation of my software (with gcc 5.3.0) leads to a
number of warning messages and deprecation messages related to unused
variables or redifined symbols, e.g.:
- boost_1_60_0/include/boost/system/error_code.hpp:223:36: warning:
âboost::system::native_ecatâ defined but not used [-Wunused-variable]
static const error_category & native_ecat = system_category();
- /boost_1_60_0/include/boost/iostreams/chain.hpp:256:14: warning:
âtemplate<class> class std::auto_ptrâ is deprecated
[-Wdeprecated-declarations]
std::auto_ptr<streambuf_t>
In file included from /cluster/gcc/5.3.0/include/c++/5.3.0/memory:81:0,
from trunk/src/ngs_io.cpp:8:
/cluster/gcc/5.3.0/include/c++/5.3.0/bits/unique_ptr.h:49:28: note:
declared here
template<typename> class auto_ptr;
- /usr/include/boost/iostreams/detail/adapter/concept_adapter.hpp:35:7:
note:
âboost::iostreams::detail::concept_adapter<boost::iostreams::basic_gzip_decompressor<>
>::concept_adapter(const
boost::iostreams::detail::concept_adapter<boost::iostreams::basic_gzip_decompressor<>
>&)â is implicitly deleted because the default definition would be
ill-formed:
class concept_adapter {
^
etc.
And most importantly this error:
/usr/include/boost/iostreams/detail/adapter/concept_adapter.hpp:35:7:
error: use of deleted function
âboost::iostreams::basic_gzip_decompressor<>::basic_gzip_decompressor(const
boost::iostreams::basic_gzip_decompressor<>&)â
My g++ compiler flags (other than output and source file) are:
-c -fopenmp -O3 -march=native -Wall -ansi -pedantic -Wuninitialized
-std=c++11
The code compiles fine with a git pull from May last year, yet I do not
recall what I have done differently.
So, can anybody tell me how to set up boost, such that compilation and
linking against C++11 std-libraries works? I understand that
Best regards,
Christian Meesters
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net