]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/tr1/3_function_objects/function/2.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / tr1 / 3_function_objects / function / 2.cc
index 3bce540a80edf799afd7ff6712ad19bae1c31a73..c798f217d8fad6e644856e0ead3f47c301d8151d 100644 (file)
@@ -1,6 +1,6 @@
 // 2005-01-15 Douglas Gregor <dgregor@cs.indiana.edu>
 //
-// Copyright (C) 2005-2021 Free Software Foundation, Inc.
+// Copyright (C) 2005-2024 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
@@ -59,6 +59,7 @@ void test02()
   f2 = truncate_float;
   VERIFY( f2(3.1f) == 3 );
 
+#if __cpp_rtti
   // target_type and target() functions
   const function<int(float)>& f1c = f1;
   VERIFY( typeid(int(*)(float)) == f1.target_type() );
@@ -66,6 +67,7 @@ void test02()
   VERIFY( *f2.target<int(*)(float)>() == &truncate_float );
   VERIFY( f1c.target<int(*)(float)>() != 0 );
   VERIFY( *f1c.target<int(*)(float)>() == &truncate_float );
+#endif
 }
 
 int main()