aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2018-08-23 16:23:31 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2018-08-23 16:23:31 +0100
commit568d5ee44d1d6897a9b7750a3934d4539e1a7ded (patch)
treec08400dec0f48c6a99e26616c2f9e128d3197370 /libstdc++-v3
parentc07870270a7b271c549534345db46fd8fe5ad801 (diff)
downloadgcc-568d5ee44d1d6897a9b7750a3934d4539e1a7ded.zip
gcc-568d5ee44d1d6897a9b7750a3934d4539e1a7ded.tar.gz
gcc-568d5ee44d1d6897a9b7750a3934d4539e1a7ded.tar.bz2
Define debug mode function for C++98
This function is declared unconditionally but was only defined for C++11 and later, leading to linker errors when the testsuite was run with -std=gnu++98 -D_GLIBCXX_DEBUG added to the flags. * include/debug/vector (__niter_base): Define for C++98. From-SVN: r263816
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog2
-rw-r--r--libstdc++-v3/include/debug/vector5
2 files changed, 4 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9d579ba..c74cee2 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,7 @@
2018-08-23 Jonathan Wakely <jwakely@redhat.com>
+ * include/debug/vector (__niter_base): Define for C++98.
+
* testsuite/25_algorithms/partial_sort_copy/debug/irreflexive_neg.cc:
Fix C++98 test to not use C++11 features.
* testsuite/25_algorithms/fill_n/2.cc: Likewise.
diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector
index bd09b24..e8d0928 100644
--- a/libstdc++-v3/include/debug/vector
+++ b/libstdc++-v3/include/debug/vector
@@ -774,9 +774,9 @@ namespace __debug
} // namespace __debug
-#if __cplusplus >= 201103L
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+#if __cplusplus >= 201103L
// DR 1182.
/// std::hash specialization for vector<bool>.
template<typename _Alloc>
@@ -787,6 +787,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
operator()(const __debug::vector<bool, _Alloc>& __b) const noexcept
{ return std::hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>()(__b); }
};
+#endif
template<typename _Iterator, typename _Container, typename _Sequence>
_Iterator
@@ -796,8 +797,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return std::__niter_base(__it.base()); }
_GLIBCXX_END_NAMESPACE_VERSION
-#endif
-
} // namespace std
namespace __gnu_debug