majintao0131 / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

private enumeration clashes with system macro #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. With Sun Studio C++ compiler (v12) in 64-bit mode, build something with 
"yaml-cpp/emitter.h" included (no need to actually build yaml-cpp)

What is the expected output? What do you see instead?

Although we'd expect this private enumeration to compile properly - it fails 
because AT_SEQ has been macro-defined by a system header to 0x0008 (I didn't 
track down which one).

        enum ATOMIC_TYPE { AT_SCALAR, AT_SEQ, AT_BLOCK_SEQ, AT_FLOW_SEQ, AT_MAP, AT_BLOCK_MAP, AT_FLOW_MAP };

What version of the product are you using? On what operating system?
Sun Solaris with (latest) native compiler

Please provide any additional information below.

I don't actually see any references to this, so this line (emitter.h line 74) 
could simply be excised.

Original issue reported on code.google.com by rboe...@gmail.com on 22 Aug 2011 at 9:21

GoogleCodeExporter commented 9 years ago
Hmm, interesting. You're right, that enum doesn't appear to be used. I don't 
even remember what it was for :)

Anyways, it's gone, r490. Thanks for the note!

Original comment by jbe...@gmail.com on 22 Aug 2011 at 9:38