Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Dec 2013 16:49:54 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Gergely CZUCZY <gergely.czuczy@harmless.hu>
Cc:        ports@freebsd.org, office@freebsd.org
Subject:   Re: devel/boost issues regarding boost/chrono/duration.hpp constexpr definitions with clang
Message-ID:  <21F55D65-F8C4-4163-9E42-4CAEFF7E3413@FreeBSD.org>
In-Reply-To: <20131211132255.00004886@unknown>
References:  <20131211132255.00004886@unknown>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_29ECDB6C-0E26-4834-B11E-4A087906997A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 11 Dec 2013, at 13:22, Gergely CZUCZY <gergely.czuczy@harmless.hu> =
wrote:
> Could you please update boost to 1.55? There's seems to be some issues
> with the current version, which might be fixed later.
>=20
> 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:
>=20
> --- BEGIN boostmtx.cc ---
> #include <boost/thread/shared_mutex.hpp>
>=20
> int main() { return 0; }
> --- END boostmtx.cc ---
>=20
> And when trying to build it:
> $ CXXFLAGS=3D"-Werror -pedantic -std=3Dc++11 -I/usr/local/include" =
CXX=3Dclang++ make boostmtx
> clang++ -Werror -pedantic -std=3Dc++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

Have a look at http://svnweb.freebsd.org/changeset/base/251066 for a =
fix.

Basically, just make the operator() functions themselves const.

-Dimitry


--Apple-Mail=_29ECDB6C-0E26-4834-B11E-4A087906997A
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)

iEYEARECAAYFAlKoibYACgkQsF6jCi4glqM6dACfZsC5RZwzcO83C9mB8I2kS9jB
h7wAoM1SatQJ7j3QOpPfGX72cbw6CZp3
=oo2r
-----END PGP SIGNATURE-----

--Apple-Mail=_29ECDB6C-0E26-4834-B11E-4A087906997A--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?21F55D65-F8C4-4163-9E42-4CAEFF7E3413>