[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type
Joshua J Cogliati
report at bugs.python.org
Mon Mar 16 15:11:28 CET 2015
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" {
#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. )
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23644>
_______________________________________
More information about the Python-bugs-list
mailing list