aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/testsuite_tr1.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/testsuite_tr1.h')
-rw-r--r--libstdc++-v3/testsuite/testsuite_tr1.h107
1 files changed, 60 insertions, 47 deletions
diff --git a/libstdc++-v3/testsuite/testsuite_tr1.h b/libstdc++-v3/testsuite/testsuite_tr1.h
index 2a47483951c..ea6affb37c1 100644
--- a/libstdc++-v3/testsuite/testsuite_tr1.h
+++ b/libstdc++-v3/testsuite/testsuite_tr1.h
@@ -121,69 +121,82 @@ namespace __gnu_test
{ operator int() const; };
class AbstractClass
- { virtual void rotate(int) = 0; };
+ {
+ virtual void rotate(int) = 0;
+ virtual ~AbstractClass();
+ };
+ class PolymorphicClass
+ {
+ virtual void rotate(int);
+ virtual ~PolymorphicClass();
+ };
- int truncate_float(float x) { return (int)x; }
- long truncate_double(double x) { return (long)x; }
+ class DerivedPolymorphic : public PolymorphicClass { };
- struct do_truncate_float_t
- {
- do_truncate_float_t()
- {
- ++live_objects;
- }
+ union UnionType { };
- do_truncate_float_t(const do_truncate_float_t&)
- {
- ++live_objects;
- }
- ~do_truncate_float_t()
- {
- --live_objects;
- }
+ int truncate_float(float x) { return (int)x; }
+ long truncate_double(double x) { return (long)x; }
- int operator()(float x) { return (int)x; }
+ struct do_truncate_float_t
+ {
+ do_truncate_float_t()
+ {
+ ++live_objects;
+ }
- static int live_objects;
- };
+ do_truncate_float_t(const do_truncate_float_t&)
+ {
+ ++live_objects;
+ }
- int do_truncate_float_t::live_objects = 0;
+ ~do_truncate_float_t()
+ {
+ --live_objects;
+ }
- struct do_truncate_double_t
- {
- do_truncate_double_t()
- {
- ++live_objects;
- }
+ int operator()(float x) { return (int)x; }
- do_truncate_double_t(const do_truncate_double_t&)
- {
+ static int live_objects;
+ };
+
+ int do_truncate_float_t::live_objects = 0;
+
+ struct do_truncate_double_t
+ {
+ do_truncate_double_t()
+ {
++live_objects;
- }
+ }
- ~do_truncate_double_t()
- {
- --live_objects;
- }
+ do_truncate_double_t(const do_truncate_double_t&)
+ {
+ ++live_objects;
+ }
+
+ ~do_truncate_double_t()
+ {
+ --live_objects;
+ }
- long operator()(double x) { return (long)x; }
+ long operator()(double x) { return (long)x; }
- static int live_objects;
- };
+ static int live_objects;
+ };
- int do_truncate_double_t::live_objects = 0;
+ int do_truncate_double_t::live_objects = 0;
- struct X
- {
- int bar;
+ struct X
+ {
+ int bar;
- int foo() { return 1; }
- int foo_c() const { return 2; }
- int foo_v() volatile { return 3; }
- int foo_cv() const volatile { return 4; }
- };
-}; // namespace __gnu_test
+ int foo() { return 1; }
+ int foo_c() const { return 2; }
+ int foo_v() volatile { return 3; }
+ int foo_cv() const volatile { return 4; }
+ };
+} // namespace __gnu_test
#endif // _GLIBCXX_TESTSUITE_TR1_H