// -*- C++ -*-
-// Exception testing utils for the C++ library testsuite.
+// Exception testing utils for the C++ library testsuite.
//
-// Copyright (C) 2007-2013 Free Software Foundation, Inc.
+// Copyright (C) 2007-2020 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
: bad_non_virtual(), Exception("construct diamond") { }
};
};
-
+
template<typename Exception, bool DefaultCons>
struct diamond_derivation
: diamond_derivation_base<Exception, DefaultCons>
// behavior is ambiguity.
static void test()
{
- bool test __attribute__((unused)) = true;
try
{ throw error_type(); }
catch (std::exception const&)
{ VERIFY( false ); }
- catch (...)
+ catch (...)
{ VERIFY( true ); }
}
};
{ return *this; }
#endif
};
-
+
// See: 20.1.1 Template argument requirements.
inline bool
operator==(const NonDefaultConstructible&, const NonDefaultConstructible&)
// For 26 numeric algorithms requirements, need addable,
// subtractable, multiplicable.
inline NonDefaultConstructible
- operator+(const NonDefaultConstructible& lhs,
- const NonDefaultConstructible& rhs)
+ operator+(const NonDefaultConstructible&, const NonDefaultConstructible&)
{ return NonDefaultConstructible(1); }
inline NonDefaultConstructible
- operator-(const NonDefaultConstructible& lhs,
- const NonDefaultConstructible& rhs)
+ operator-(const NonDefaultConstructible&, const NonDefaultConstructible&)
{ return NonDefaultConstructible(1); }
inline NonDefaultConstructible
- operator*(const NonDefaultConstructible& lhs,
- const NonDefaultConstructible& rhs)
+ operator*(const NonDefaultConstructible&, const NonDefaultConstructible&)
{ return NonDefaultConstructible(1); }
// Like unary_function, but takes no argument. (ie, void).
template<typename _Result>
struct void_function
{
- typedef _Result result_type;
+ typedef _Result result_type;
result_type
operator()() const
template<>
struct void_function<NonDefaultConstructible>
{
- typedef NonDefaultConstructible result_type;
+ typedef NonDefaultConstructible result_type;
result_type
operator()() const
// For std::addressof, etc.
struct OverloadedAddressAux { };
-
+
struct OverloadedAddress
{
OverloadedAddressAux