The header synopsis test fails to define NOTHROW for C++98.
The shared_ptr test should be skipped for C++98.
The debug mode one should work for C++98 too, it just needs to avoid
C++11 syntax that isn't valid in C++98.
libstdc++-v3/ChangeLog:
* testsuite/20_util/headers/memory/synopsis.cc: Define C++98
alternative for macro.
* testsuite/20_util/shared_ptr/creation/99006.cc: Add effective
target keyword.
* testsuite/25_algorithms/copy/debug/99402.cc: Avoid C++11
syntax.
#if __cplusplus >= 201103L
# define NOTHROW noexcept
+#else
+# define NOTHROW
#endif
namespace std {
-// FIXME: This should use { target { ! c++20 } }
-// { dg-do compile }
+// FIXME: This should use { target { c++11 && { ! c++20 } } }
+// { dg-do compile { target { c++11 } } }
#include <memory>
int main()
{
+ int two[] = { 0, 1 };
// any container with non-random access iterators:
- const set<int> source = { 0, 1 };
+ const set<int> source(two, two + 2);
vector<int> dest(1);
copy(source.begin(), ++source.begin(), dest.begin());
}