summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/testsuite/util
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/util')
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_api.h7
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_character.h15
2 files changed, 20 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/util/testsuite_api.h b/libstdc++-v3/testsuite/util/testsuite_api.h
index 658e2ad168c..cbb606c42a8 100644
--- a/libstdc++-v3/testsuite/util/testsuite_api.h
+++ b/libstdc++-v3/testsuite/util/testsuite_api.h
@@ -84,6 +84,13 @@ namespace __gnu_test
{
NonDefaultConstructible(int) { }
NonDefaultConstructible(const NonDefaultConstructible&) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // For std::iota.
+ NonDefaultConstructible&
+ operator++()
+ { return *this; }
+#endif
};
// See: 20.1.1 Template argument requirements.
diff --git a/libstdc++-v3/testsuite/util/testsuite_character.h b/libstdc++-v3/testsuite/util/testsuite_character.h
index e9dde65c2f3..2aa0bc72e53 100644
--- a/libstdc++-v3/testsuite/util/testsuite_character.h
+++ b/libstdc++-v3/testsuite/util/testsuite_character.h
@@ -3,7 +3,8 @@
// Testing character type and state type with char_traits and codecvt
// specializations for the C++ library testsuite.
//
-// Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -44,8 +45,18 @@ namespace __gnu_test
struct pod_int
{
int value;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // For std::iota.
+ pod_int&
+ operator++()
+ {
+ ++value;
+ return *this;
+ }
+#endif
};
-
+
// For 20.1 requirements for instantiable type: equality comparable
// and less than comparable.
inline bool
OpenPOWER on IntegriCloud