incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject using gcc -std=c++0x to enable C++ 0x ([Fwd: svn commit: r675809 - /stdcxx/branches/4.3.x/include/rw/_config-gcc.h])
Date Thu, 10 Jul 2008 23:47:58 GMT
This change makes it possible to enable stdcxx C++ 0x extensions
by using the -std=c++0x (or -std=gnu++0x) gcc command line option.
Specifically, it's possible to use these extensions with a library
configured w/o the option simply by setting CXXOPTS=-std=c++0x on
the make command line.

-------- Original Message --------
Subject: svn commit: r675809 - 
/stdcxx/branches/4.3.x/include/rw/_config-gcc.h
Date: Thu, 10 Jul 2008 23:35:45 -0000
From: sebor@apache.org
Reply-To: dev@stdcxx.apache.org
To: commits@stdcxx.apache.org

Author: sebor
Date: Thu Jul 10 16:35:45 2008
New Revision: 675809

URL: http://svn.apache.org/viewvc?rev=675809&view=rev
Log:
2008-07-10  Martin Sebor  <sebor@roguewave.com>

	* include/rw/_config-gcc.h [gcc >= 4.3 && __GXX_EXPERIMENTAL_CXX0X__]
	(_RWSTD_NO_VARIADIC_TEMPLATES, _RWSTD_NO_RVALUE_REFERENCES): Undefined
	to make it possible to use C++ 0x library extensions even in builds
	configured w/o C++ 0x extensions enabled in the compiler.
	(_RWSTD_EXT_CXX_0X): #defined in response to either of the -std=c++0x
	or -std=gnu++0x options.

Modified:
     stdcxx/branches/4.3.x/include/rw/_config-gcc.h

Modified: stdcxx/branches/4.3.x/include/rw/_config-gcc.h
URL: 
http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_config-gcc.h?rev=675809&r1=675808&r2=675809&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_config-gcc.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_config-gcc.h Thu Jul 10 16:35:45 2008
@@ -200,5 +200,20 @@
  #  define _RWSTD_TT_MAX_ALIGNMENT           16
  #  define _RWSTD_TT_ALIGNED_POD(N) \
       struct { unsigned char _C_align __attribute__ ((aligned ((N)))); }
+
+#  ifdef __GXX_EXPERIMENTAL_CXX0X__
+     // enable C++ 0x features disabled in builds
+     // configured without -std=c++0x or -std=gnu++0x
+
+     // C++ 0x features supported since 4.3.0
+#    undef _RWSTD_NO_VARIADIC_TEMPLATES
+#    undef _RWSTD_NO_RVALUE_REFERENCES
+
+#    ifndef _RWSTD_EXT_CXX_0X
+       // enable our C++ 0x extensions in GNU gcc C++ 0x mode
+#      define _RWSTD_EXT_CXX_0X
+#    endif
+#  endif
+
  #endif   // __GNUC__ >= 4.3




Mime
View raw message