stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r414952 - /incubator/stdcxx/trunk/tests/utilities/20.specialized.cpp
Date Fri, 16 Jun 2006 23:05:32 GMT
Author: sebor
Date: Fri Jun 16 16:05:32 2006
New Revision: 414952

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

	* 20.specialized.cpp (make_iter): Replaced a template with a couple
	of ordinary functions to avoid tripping up broken compilers such
	as HP aCC 3.63 on argument deduction.

Modified:
    incubator/stdcxx/trunk/tests/utilities/20.specialized.cpp

Modified: incubator/stdcxx/trunk/tests/utilities/20.specialized.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/utilities/20.specialized.cpp?rev=414952&r1=414951&r2=414952&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/utilities/20.specialized.cpp (original)
+++ incubator/stdcxx/trunk/tests/utilities/20.specialized.cpp Fri Jun 16 16:05:32 2006
@@ -2,7 +2,7 @@
  *
  * specialized.cpp - test exercising 20.4.4 [lib.specialized.algorithms]
  *
- * $Id: //stdlib/dev/tests/stdlib/utilities/specialized.cpp#3 $
+ * $Id: //stdlib/dev/tests/stdlib/utilities/specialized.cpp#4 $
  *
  ***************************************************************************
  *
@@ -80,8 +80,19 @@
 template <class T>
 const char* type_name (const volatile T*, T*) { return "const volatile T*"; }
 
-template <class T>
-volatile T* make_iter (T *beg, T*, T*, volatile T*) { return beg; }
+// defined as ordinary functions (as opposed to templates)
+// to avoid tripping up broken compilers on argument deduction
+inline const volatile int*
+make_iter (const int *beg, const int*, const int*, const volatile int*)
+{
+    return beg;
+}
+
+inline volatile Y*
+make_iter (Y *beg, Y*, Y*, volatile Y*)
+{
+    return beg;
+}
 
 /**************************************************************************/
 



Mime
View raw message