stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r431265 - in /incubator/stdcxx/trunk/src: collate.cpp podarray.h ti_podarray.cpp
Date Sun, 13 Aug 2006 22:46:43 GMT
Author: sebor
Date: Sun Aug 13 15:46:43 2006
New Revision: 431265

URL: http://svn.apache.org/viewvc?rev=431265&view=rev
Log:
2006-08-13  Martin Sebor  <sebor@roguewave.com>

	STDCXX-274
	* collate.cpp (__rw_pod_array): Explicitly instantiated for Compaq C++
	and other compilers that do not do so automatically when a template
	specialization is used.
	(_RWSTD_NO_V3_LOCALE, _V3_LOCALE): Removed dead macros.
	* podarray.h (__rw_pod_array): Added explicit instantiation directive.
	* ti_podarray.cpp: New file for the explicit instantiation of class
	__rw_pod_array.

Added:
    incubator/stdcxx/trunk/src/ti_podarray.cpp   (with props)
Modified:
    incubator/stdcxx/trunk/src/collate.cpp
    incubator/stdcxx/trunk/src/podarray.h

Modified: incubator/stdcxx/trunk/src/collate.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/collate.cpp?rev=431265&r1=431264&r2=431265&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/collate.cpp (original)
+++ incubator/stdcxx/trunk/src/collate.cpp Sun Aug 13 15:46:43 2006
@@ -6,22 +6,23 @@
  *
  ***************************************************************************
  *
- * Copyright 2005-2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
  *
- * Copyright 2001-2006 Rogue Wave Software.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2001-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -39,8 +40,6 @@
 
 #include <rw/_defs.h>
 
-#ifndef _RWSTD_NO_V3_LOCALE
-
 #include <limits>     // for numeric_limits
 
 #include <limits.h>
@@ -56,8 +55,8 @@
 #include <loc/_localedef.h>
 
 #include "locale_body.h"
-#include "podarray.h"
-#include "setlocale.h"
+#include "podarray.h"      // for __rw_pod_array
+#include "setlocale.h"     // for __rw_setlocale
 
 
 // define _RWSTD_MB_MAX to the greater of MB_LEN_MAX and 8
@@ -125,10 +124,21 @@
 
 
 _RWSTD_NAMESPACE (__rw) {
-    
+ 
 #undef min
 #undef max
 
+
+#ifndef _RWSTD_NO_EXPLICIT_INSTANTIATION
+
+// explicitly instantiate for compilers such as Compaq/HP C++ that
+// do not do so automatically when a template specialization is
+// used
+template class _RWSTD_EXPORT __rw_pod_array<const unsigned int*, 1024>;
+
+#endif   // _RWSTD_NO_EXPLICIT_INSTANTIATION
+
+
 // computes LC_XXX category from a numeric facet id, returns the
 // LC_XXX category for standard facets, LC_ALL for all others
 int __rw_get_cat (int);
@@ -838,7 +848,7 @@
 }    // namespace __rw
 
 
-_RWSTD_NAMESPACE (_V3_LOCALE) { 
+_RWSTD_NAMESPACE (std) { 
 
 
 _RW::__rw_facet_id collate<char>::id;
@@ -1211,6 +1221,4 @@
 
 
 
-}   // namespace _V3_LOCALE
-
-#endif  // _RWSTD_NO_V3_LOCALE
+}   // namespace std

Modified: incubator/stdcxx/trunk/src/podarray.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/podarray.h?rev=431265&r1=431264&r2=431265&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/podarray.h (original)
+++ incubator/stdcxx/trunk/src/podarray.h Sun Aug 13 15:46:43 2006
@@ -5,20 +5,27 @@
  * This is an internal header file used to implement the C++ Standard
  * Library. It should never be #included directly by a program.
  *
- * $Id: //stdlib/dev/source/stdlib/podarray.h#12 $
+ * $Id$
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2001-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -173,9 +180,25 @@
 }   // namespace __rw
 
 
-#ifdef _RWSTD_NO_IMPLICIT_INCLUSION
+#if _RWSTD_DEFINE_TEMPLATE_FIRST (_POD_ARRAY)
+#  include "podarray.cc"
+#endif   // _RWSTD_DEFINE_TEMPLATE_FIRST (_POD_ARRAY)
+
+
+_RWSTD_NAMESPACE (__rw) { 
+
+#if _RWSTD_INSTANTIATE_POD_ARRAY
+
+_RWSTD_INSTANTIATE_2 (class _RWSTD_EXPORT __rw_pod_array<char, 256>);
+
+#endif   // _RWSTD_INSTANTIATE_POD_ARRAY
+
+
+#if _RWSTD_DEFINE_TEMPLATE_LAST (_POD_ARRAY)
 #  include "podarray.cc"
-#endif   // _RWSTD_NO_IMPLICIT_INCLUSION
+#endif   // _RWSTD_DEFINE_TEMPLATE_LAST (_POD_ARRAY)
+
+}   // namespace __rw
 
 
 #endif   // _RWSTD_PODARRAY_H_INCLUDED

Added: incubator/stdcxx/trunk/src/ti_podarray.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/ti_podarray.cpp?rev=431265&view=auto
==============================================================================
--- incubator/stdcxx/trunk/src/ti_podarray.cpp (added)
+++ incubator/stdcxx/trunk/src/ti_podarray.cpp Sun Aug 13 15:46:43 2006
@@ -0,0 +1,39 @@
+/***************************************************************************
+ *
+ * ti_podarray.cpp - explicit instantiation directives
+ *                   for class __rw_pod_array
+ *
+ * $Id$
+ *
+ ***************************************************************************
+ *
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2001-2006 Rogue Wave Software.
+ * 
+ **************************************************************************/
+
+#define _RWSTD_LIB_SRC
+
+#define _RWSTD_INSTANTIATE_TEMPLATES       1
+#define _RWSTD_INSTANTIATE_POD_ARRAY       1
+
+#include <rw/_defs.h>
+
+#undef _RWSTD_NO_TEMPLATE_DEFINITIONS
+
+#include "podarray.h"

Propchange: incubator/stdcxx/trunk/src/ti_podarray.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/src/ti_podarray.cpp
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message