Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Dec 2013 13:22:55 +0100
From:      Gergely CZUCZY <gergely.czuczy@harmless.hu>
To:        office@freebsd.org
Cc:        ports@freebsd.org
Subject:   devel/boost issues regarding boost/chrono/duration.hpp constexpr definitions with clang
Message-ID:  <20131211132255.00004886@unknown>

next in thread | raw e-mail | index | archive | help
Hello,

Could you please update boost to 1.55? There's seems to be some issues
with the current version, which might be fixed later.

Namely, on a 9.x default install, built with defaults (gcc as defcc),
when one is trying to include boost/thread/shared_mutex.hpp and build
that file with clang:

--- BEGIN boostmtx.cc ---
#include <boost/thread/shared_mutex.hpp>

int main() { return 0; }
--- END boostmtx.cc ---

And when trying to build it:
$ CXXFLAGS="-Werror -pedantic -std=c++11 -I/usr/local/include" CXX=clang++ make boostmtx
clang++ -Werror -pedantic -std=c++11 -I/usr/local/include  boostmtx.cc  -o boostmtx
In file included from boostmtx.cc:1:
In file included from /usr/local/include/boost/thread/shared_mutex.hpp:21:
In file included from /usr/local/include/boost/thread/pthread/shared_mutex.hpp:13:
In file included from /usr/local/include/boost/thread/mutex.hpp:16:
In file included from /usr/local/include/boost/thread/pthread/mutex.hpp:12:
In file included from /usr/local/include/boost/thread/locks.hpp:18:
In file included from /usr/local/include/boost/chrono/time_point.hpp:33:
/usr/local/include/boost/chrono/duration.hpp:667:28: error: 'constexpr' non-static member function will not be implicitly 'const' in
      C++1y; add 'const' to avoid a change in behavior [-Werror,-Wconstexpr-not-const]
      BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
                           ^
                                                                                      const
/usr/local/include/boost/chrono/duration.hpp:677:28: error: 'constexpr' non-static member function will not be implicitly 'const' in
      C++1y; add 'const' to avoid a change in behavior [-Werror,-Wconstexpr-not-const]
      BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs)
                           ^
                                                                                      const
/usr/local/include/boost/chrono/duration.hpp:686:28: error: 'constexpr' non-static member function will not be implicitly 'const' in
      C++1y; add 'const' to avoid a change in behavior [-Werror,-Wconstexpr-not-const]
      BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
                           ^
                                                                                      const
/usr/local/include/boost/chrono/duration.hpp:696:28: error: 'constexpr' non-static member function will not be implicitly 'const' in
      C++1y; add 'const' to avoid a change in behavior [-Werror,-Wconstexpr-not-const]
      BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs)
                           ^
                                                                                      const
4 errors generated.
*** [boostmtx] Error code 1



FreeBSD dirk.bealak.harmless.lan 9.2-STABLE FreeBSD 9.2-STABLE #0: Sat Sep 28 13:31:29 CEST 2013     toor@dirk.bealak.harmless.lan:/usr/obj/usr/src/sys/DIRK  amd64

Could you please look into this issue? This should pretty much work with the clang in base.

Best regards,
Gergely





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131211132255.00004886>