[PATCH] GCC does not support strong enum in pre-C++0x mode.
Logan Chien
tzuhsiang.chien at gmail.com
Wed Dec 11 09:11:48 PST 2013
GCC does not support strong enum if -std=c++0x is not used.
Without the strong enum, we will see following error:
In file included from libcxx/include/ostream:131:0,
from libcxx/include/sstream:174,
from libcxx/include/complex:247,
from cpp03-headers.cpp:11:
libcxx/include/ios:419:68: error: 'io_errc' is not a class or namespace
libcxx/include/ios:420:66: error: 'io_errc' is not a class or namespace
To workaround this issue, this commit will define
_LIBCPP_HAS_NO_STRONG_ENUMS when GCC is detected and
-std=c++0x is not given.
http://llvm-reviews.chandlerc.com/D2383
Files:
include/__config
Index: include/__config
===================================================================
--- include/__config
+++ include/__config
@@ -374,6 +374,7 @@
#define _LIBCPP_HAS_NO_VARIADICS
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
+#define _LIBCPP_HAS_NO_STRONG_ENUMS
#else // __GXX_EXPERIMENTAL_CXX0X__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2383.1.patch
Type: text/x-patch
Size: 357 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131211/ae8e23c4/attachment.bin>
More information about the cfe-commits
mailing list