Boost logo

Boost :

Subject: Re: [boost] [config] clang deleted functions bugged
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2013-10-27 21:45:43


On 28 October 2013 00:12, Vicente J. Botet Escriba wrote:
>
> Boost.Thread defines a private constructor when
> BOOST_NO_CXX11_DELETED_FUNCTIONS is defined and in this case there is no
> compiler error.

That might be true, but that is not sufficient to conclude that clang
doesn't support deleted functions!

The stackoverflow question you linked to is years old and Howard's
answer is wrong (but Johannes's comments on that answer are correct,
and agree with what Peter already said.)

The stack trace shows that std::vector is trying to copy the element,
not move it.

My guess would be that boost::thread's move constructor is not
noexcept, so the libc++ std::vector refuses to use a move when
inserting, and falls back to a copy instead, which fails. That is the
correct, standard behaviour for std::vector. If my guess is correct
you should make the move constructor noexcept.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk