Joshua J Cogliati added the comment:

>> using namespace std;

>Doing this in a header is ugly.

If you put it in the:
#ifdef __cplusplus
extern "C" {

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;

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. )


Python tracker <>
Python-bugs-list mailing list

Reply via email to