Message238208
>> using namespace std;
>Doing this in a header is ugly.
If you put it in the:
#ifdef __cplusplus
extern "C" {
#endif
then it would only apply till the end of the pyatomic header, and not to anything that includes it. Something like:
#ifdef __cplusplus
extern "C" {
#if defined(HAVE_STD_ATOMIC)
using namespace std;
#endif
#endif
But if you are already defining:
#define _Atomic(T) atomic<T>
maybe it should be:
#define _Atomic(T) std::atomic<T>
(I haven't checked any of this code, but they would get around the namespace std being changed in code that includes pyatomic.h problem. ) |
|
Date |
User |
Action |
Args |
2015-03-16 14:11:28 | Joshua.J.Cogliati | set | recipients:
+ Joshua.J.Cogliati, vstinner, Arfrever, jrincayc, python-dev, Vitor.de.Lima, gustavotemple, lbianc |
2015-03-16 14:11:28 | Joshua.J.Cogliati | set | messageid: <1426515088.4.0.306572134759.issue23644@psf.upfronthosting.co.za> |
2015-03-16 14:11:28 | Joshua.J.Cogliati | link | issue23644 messages |
2015-03-16 14:11:28 | Joshua.J.Cogliati | create | |
|