[libcxx] r197313 - GCC does not support strong enum in pre-C++0x mode.

Logan Chien tzuhsiang.chien at gmail.com
Fri Dec 13 22:44:09 PST 2013


Author: logan
Date: Sat Dec 14 00:44:09 2013
New Revision: 197313

URL: http://llvm.org/viewvc/llvm-project?rev=197313&view=rev
Log:
GCC does not support strong enum in pre-C++0x mode.

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 we are compiling with
g++ without c++0x.


Modified:
    libcxx/trunk/include/__config

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=197313&r1=197312&r2=197313&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Sat Dec 14 00:44:09 2013
@@ -374,6 +374,7 @@ namespace std {
 #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__
 





More information about the cfe-commits mailing list