[thread] wrong guard for explicit bool operators (c++11)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[thread] wrong guard for explicit bool operators (c++11)

Juergen Hunold-2
Hi Vicente,

your commit
New Revision: 76951
URL: http://svn.boost.org/trac/boost/changeset/76951

Thread: Added explicit to operator bool for locks (11 hours ago)

leads to the following errors when using gcc-4.6.1 in non-c++11 mode:
$BOOST_ROOT/boost/thread/locks.hpp:1323:34: warning: explicit conversion
operators only available with -std=c++0x or -std=gnu++0x [enabled by default]

It seems that the guards checking for explicit conversion operators are wrong.

-#ifndef BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#if defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)

Patch attached. Ok to commit?

Yours,

Jürgen
--
Dipl.-Math. Jürgen Hunold       | IVE mbH
Software-Entwickler             | Lützerodestraße 10
Tel: +49 511 897668 33          | 30161 Hannover, Germany
Fax: +49 511 897668 29          | http://www.ivembh.de
[hidden email]        |
                                | Geschäftsführer:
Sitz des Unternehmens: Hannover | Univ.-Prof. Dr.-Ing. Thomas Siefer              
Amtsgericht Hannover, HRB 56965 | PD Dr.-Ing. Alfons Radtke  


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

thread_explicit.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [thread] wrong guard for explicit bool operators (c++11)

Vicente Botet
Juergen Hunold-2 wrote
Hi Vicente,

your commit
New Revision: 76951
URL: http://svn.boost.org/trac/boost/changeset/76951

Thread: Added explicit to operator bool for locks (11 hours ago)

leads to the following errors when using gcc-4.6.1 in non-c++11 mode:
$BOOST_ROOT/boost/thread/locks.hpp:1323:34: warning: explicit conversion
operators only available with -std=c++0x or -std=gnu++0x [enabled by default]

It seems that the guards checking for explicit conversion operators are wrong.

-#ifndef BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#if defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)

Patch attached. Ok to commit?
Hi,

I think the commit dates from yesterday.
I have see this issue this morning. Now that you have a correct patch, please, commit it.

Thanks,
Vicente
Reply | Threaded
Open this post in threaded view
|

Re: [thread] wrong guard for explicit bool operators (c++11)

Juergen Hunold-2
Hi Vicente,

On Thursday, 9. February 2012 15:54:15 Vicente Botet wrote:
> Juergen Hunold-2 wrote

> I think the commit dates from yesterday.
> I have see this issue this morning. Now that you have a correct patch,
> please, commit it.

Done:
New Revision: 76959
URL: http://svn.boost.org/trac/boost/changeset/76959

Log:
Fix: correct logic for enabling c++11 explicit conversion operators

Yours,

Jürgen
--
Dipl.-Math. Jürgen Hunold       | IVE mbH
Software-Entwickler             | Lützerodestraße 10
Tel: +49 511 897668 33          | 30161 Hannover, Germany
Fax: +49 511 897668 29          | http://www.ivembh.de
[hidden email]        |
                                | Geschäftsführer:
Sitz des Unternehmens: Hannover | Univ.-Prof. Dr.-Ing. Thomas Siefer              
Amtsgericht Hannover, HRB 56965 | PD Dr.-Ing. Alfons Radtke  


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost