[thread] SEVERE bug on packaged_task constructor in C++11 mode.
Hi, There is a severe bug in packaged_task constructor when compiling in C++11 mode and giving a copyable functor as parameter, as reported in https://svn.boost.org/trac/boost/ticket/8596. I believe that this is not a regression, this have never worked. Until I find a fix, the packaged_task could be used only with free functions and with movable functors when compiling in C++11 mode. Fortunately there is no regression on C++98 compilers (at least not identified yet). Sorry for the disagreement, Vicente
On Tue, May 21, 2013 at 10:24 AM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote:
Hi,
There is a severe bug in packaged_task constructor when compiling in C++11 mode and giving a copyable functor as parameter, as reported in https://svn.boost.org/trac/**boost/ticket/8596https://svn.boost.org/trac/boost/ticket/8596. I believe that this is not a regression, this have never worked.
Until I find a fix, the packaged_task could be used only with free functions and with movable functors when compiling in C++11 mode.
Fortunately there is no regression on C++98 compilers (at least not identified yet).
Can C++11 code be disabled/removed (i.e. so that only C++03 working variant is left) as a hotfix for 1.54? Or do you intend to fix it before the release?
Le 21/05/13 08:42, Andrey Semashev a écrit :
On Tue, May 21, 2013 at 10:24 AM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote:
Hi,
There is a severe bug in packaged_task constructor when compiling in C++11 mode and giving a copyable functor as parameter, as reported in https://svn.boost.org/trac/**boost/ticket/8596https://svn.boost.org/trac/boost/ticket/8596. I believe that this is not a regression, this have never worked.
Until I find a fix, the packaged_task could be used only with free functions and with movable functors when compiling in C++11 mode.
Fortunately there is no regression on C++98 compilers (at least not identified yet).
Can C++11 code be disabled/removed (i.e. so that only C++03 working variant is left) as a hotfix for 1.54? Or do you intend to fix it before the release?
This is a possibility, but I'm not sure the C++11 users would add to their movable classes the Boost.Move needed stuff. Note that this is not a regression, but a feature that was delivered with bugged behavior since the beginning. I will try to fix it as soon as possible. I can not ensure this will however be done for 1.54. Release managers could you give your advice? Thanks, Vicente
On 13-05-21 10:40 AM, Vicente J. Botet Escriba wrote:
Le 21/05/13 08:42, Andrey Semashev a écrit :
On Tue, May 21, 2013 at 10:24 AM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote:
Hi,
There is a severe bug in packaged_task constructor when compiling in C++11 mode and giving a copyable functor as parameter, as reported in https://svn.boost.org/trac/**boost/ticket/8596https://svn.boost.org/trac/boost/ticket/8596.
I believe that this is not a regression, this have never worked.
Until I find a fix, the packaged_task could be used only with free functions and with movable functors when compiling in C++11 mode.
Fortunately there is no regression on C++98 compilers (at least not identified yet).
Can C++11 code be disabled/removed (i.e. so that only C++03 working variant is left) as a hotfix for 1.54? Or do you intend to fix it before the release?
This is a possibility, but I'm not sure the C++11 users would add to their movable classes the Boost.Move needed stuff.
Note that this is not a regression, but a feature that was delivered with bugged behavior since the beginning. I will try to fix it as soon as possible. I can not ensure this will however be done for 1.54.
Release managers could you give your advice?
As you can see from the release schedule (http://www.boost.org/development/index.html), the release branch is open for bug fixes until next Monday. Get a fix checked into trunk and let tests cycle. Then you can merge to release. -- Eric Niebler Boost.org
Le 21/05/13 23:25, Eric Niebler a écrit :
On 13-05-21 10:40 AM, Vicente J. Botet Escriba wrote:
Release managers could you give your advice?
As you can see from the release schedule (http://www.boost.org/development/index.html), the release branch is open for bug fixes until next Monday. Get a fix checked into trunk and let tests cycle. Then you can merge to release.
Committed revision https://svn.boost.org/trac/boost/changeset/84414. A lot of the testers have already cycled this revision and the updated test that check the bug pass on all of them. I will merge on Saturday. Best, Vicente
Le 21/05/13 08:24, Vicente J. Botet Escriba a écrit :
Hi,
There is a severe bug in packaged_task constructor when compiling in C++11 mode and giving a copyable functor as parameter, as reported in https://svn.boost.org/trac/boost/ticket/8596. I believe that this is not a regression, this have never worked.
Until I find a fix, the packaged_task could be used only with free functions and with movable functors when compiling in C++11 mode.
I think that i have found why this was not working an fix it. The
forwarding from packaged task to the internal class was incorrect.
The following patch fix the example in ticket and works for all the
ts_packaged_task regression tests.
I'll commit this on trunk once the whole regression tests finish and pass.
Best,
Vicente
svn diff detail/config.hpp future.hpp
Index: detail/config.hpp
===================================================================
--- detail/config.hpp (revision 84336)
+++ detail/config.hpp (working copy)
@@ -13,8 +13,6 @@
#include
participants (3)
-
Andrey Semashev
-
Eric Niebler
-
Vicente J. Botet Escriba