]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/function/2.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / function / 2.cc
index be3a2be486d049b06c0182b05379f373d5f0679c..2d79ac20ea13aa224c4e632a652e25350ec61522 100644 (file)
@@ -1,7 +1,9 @@
 // { dg-do run { target c++11 } }
+// { dg-require-effective-target hosted }
+
 // 2005-01-15 Douglas Gregor <dgregor@cs.indiana.edu>
 //
-// Copyright (C) 2005-2020 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
@@ -62,7 +64,9 @@ void test02()
 
   // target_type and target() functions
   const function<int(float)>& f1c = f1;
+#if __cpp_rtti
   VERIFY( typeid(int(*)(float)) == f1.target_type() );
+#endif
   VERIFY( f2.target<int(*)(float)>() != 0 );
   VERIFY( *f2.target<int(*)(float)>() == &truncate_float );
   VERIFY( f1c.target<int(*)(float)>() != 0 );