Author: sebor
Date: Sun Jan  8 14:41:11 2006
New Revision: 367113

URL: http://svn.apache.org/viewcvs?rev=367113&view=rev
Log:
2006-01-08  Martin Sebor  <[EMAIL PROTECTED]>

        STDCXX-101
        * Merged in a fix from trunk/ at rev 367109.


Modified:
    
incubator/stdcxx/branches/4.1.3/etc/config/src/EXPLICIT_INSTANTIATION_BEFORE_DEFINITION.cpp
    
incubator/stdcxx/branches/4.1.3/etc/config/src/EXTERN_TEMPLATE_BEFORE_DEFINITION.cpp
    
incubator/stdcxx/branches/4.1.3/etc/config/src/instantiation_before_definition.h

Modified: 
incubator/stdcxx/branches/4.1.3/etc/config/src/EXPLICIT_INSTANTIATION_BEFORE_DEFINITION.cpp
URL: 
http://svn.apache.org/viewcvs/incubator/stdcxx/branches/4.1.3/etc/config/src/EXPLICIT_INSTANTIATION_BEFORE_DEFINITION.cpp?rev=367113&r1=367112&r2=367113&view=diff
==============================================================================
--- 
incubator/stdcxx/branches/4.1.3/etc/config/src/EXPLICIT_INSTANTIATION_BEFORE_DEFINITION.cpp
 (original)
+++ 
incubator/stdcxx/branches/4.1.3/etc/config/src/EXPLICIT_INSTANTIATION_BEFORE_DEFINITION.cpp
 Sun Jan  8 14:41:11 2006
@@ -10,6 +10,13 @@
 #  define INCLUDE_CC_FILE
 #endif   // _RWSTD_NO_IMPLICIT_INCLUSION
 
+#ifdef _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
+   // tell "instantiation_before_definition.h" to use explicit
+   // function template specialization instead of the extern
+   // template extension
+#  define SPECIALIZE_FUNCTION_TEMPLATE
+#endif   // _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
+
 #define INSTANTIATE_TEMPLATE
 #include "instantiation_before_definition.h"
 

Modified: 
incubator/stdcxx/branches/4.1.3/etc/config/src/EXTERN_TEMPLATE_BEFORE_DEFINITION.cpp
URL: 
http://svn.apache.org/viewcvs/incubator/stdcxx/branches/4.1.3/etc/config/src/EXTERN_TEMPLATE_BEFORE_DEFINITION.cpp?rev=367113&r1=367112&r2=367113&view=diff
==============================================================================
--- 
incubator/stdcxx/branches/4.1.3/etc/config/src/EXTERN_TEMPLATE_BEFORE_DEFINITION.cpp
 (original)
+++ 
incubator/stdcxx/branches/4.1.3/etc/config/src/EXTERN_TEMPLATE_BEFORE_DEFINITION.cpp
 Sun Jan  8 14:41:11 2006
@@ -16,6 +16,13 @@
 #  define INCLUDE_CC_FILE
 #endif   // _RWSTD_NO_IMPLICIT_INCLUSION
 
+#ifdef _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
+   // tell "instantiation_before_definition.h" to use explicit
+   // function template specialization instead of the extern
+   // template extension
+#  define SPECIALIZE_FUNCTION_TEMPLATE
+#endif   // _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
+
 #define EXTERN_TEMPLATE
 #include "instantiation_before_definition.h"
 

Modified: 
incubator/stdcxx/branches/4.1.3/etc/config/src/instantiation_before_definition.h
URL: 
http://svn.apache.org/viewcvs/incubator/stdcxx/branches/4.1.3/etc/config/src/instantiation_before_definition.h?rev=367113&r1=367112&r2=367113&view=diff
==============================================================================
--- 
incubator/stdcxx/branches/4.1.3/etc/config/src/instantiation_before_definition.h
 (original)
+++ 
incubator/stdcxx/branches/4.1.3/etc/config/src/instantiation_before_definition.h
 Sun Jan  8 14:41:11 2006
@@ -1,6 +1,11 @@
 #ifndef INSTANTIATION_BEFORE_DEFINITION_INCLUDED
 #define INSTANTIATION_BEFORE_DEFINITION_INCLUDED
 
+// NOTE: do not #include config.h here and avoid relying
+// the config infrastructure automatically establishing
+// dependencies on other config tests (headers are not
+// scanned for such dependencies)
+
 template <class T>
 T instantiated_before_defined (T);
 
@@ -33,7 +38,12 @@
 #    pragma GCC system_header
 #  endif   // gcc >= 3
 
+#  ifndef SPECIALIZE_FUNCTION_TEMPLATE
 extern template int instantiated_before_defined (int);
+#  else   // if defined (SPECIALIZE_FUNCTION_TEMPLATE)
+template<> int instantiated_before_defined (int);
+#  endif   // SPECIALIZE_FUNCTION_TEMPLATE
+
 extern template struct InstantiatedBeforeDefined<int>;
 
 #endif   // INSTANTIATE_TEMPLATE, EXTERN_TEMPLATE


Reply via email to