aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-07-25 18:47:52 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2017-07-25 18:47:52 +0100
commita74bc411bce0cdc1801574e5d2b4fa3fb143b0ee (patch)
tree67bf4f92145bf1720f5cc60917a9db7dbd3cd0d3 /libstdc++-v3/include
parent6d20bf1870484e659b3cb744ee627dafc902b491 (diff)
downloadgcc-a74bc411bce0cdc1801574e5d2b4fa3fb143b0ee.zip
gcc-a74bc411bce0cdc1801574e5d2b4fa3fb143b0ee.tar.gz
gcc-a74bc411bce0cdc1801574e5d2b4fa3fb143b0ee.tar.bz2
Remove deprecated iostream members for C++17
* include/bits/ios_base.h (ios_base::io_state, ios_base::open_mode) (ios_base::seek_dir): Remove for C++17. * include/std/streambuf (basic_streambuf::stossc): Remove for C++17. Add deprecated attribute for C++11 and C++14. * testsuite/27_io/types/1.cc: Don't run for C++17 and later. * testsuite/27_io/types/4.cc: New. From-SVN: r250531
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/bits/ios_base.h4
-rw-r--r--libstdc++-v3/include/std/streambuf7
2 files changed, 8 insertions, 3 deletions
diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h
index e5a107d..e68b430 100644
--- a/libstdc++-v3/include/bits/ios_base.h
+++ b/libstdc++-v3/include/bits/ios_base.h
@@ -469,13 +469,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// Request a seek relative to the current end of the sequence.
static const seekdir end = _S_end;
- // Annex D.6
+#if __cplusplus <= 201402L
+ // Annex D.6 (removed in C++17)
typedef int io_state;
typedef int open_mode;
typedef int seek_dir;
typedef std::streampos streampos;
typedef std::streamoff streamoff;
+#endif
// Callbacks;
/**
diff --git a/libstdc++-v3/include/std/streambuf b/libstdc++-v3/include/std/streambuf
index 862c4fd..a05b46e 100644
--- a/libstdc++-v3/include/std/streambuf
+++ b/libstdc++-v3/include/std/streambuf
@@ -768,8 +768,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
overflow(int_type __c = traits_type::eof())
{ return traits_type::eof(); }
-#if _GLIBCXX_USE_DEPRECATED
- // Annex D.6
+#if _GLIBCXX_USE_DEPRECATED && __cplusplus <= 201402L
+ // Annex D.6 (removed in C++17)
public:
/**
* @brief Tosses a character.
@@ -779,6 +779,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*
* See http://gcc.gnu.org/ml/libstdc++/2002-05/msg00168.html
*/
+#if __cplusplus >= 201103L
+ [[__deprecated__("stossc is deprecated, use sbumpc instead")]]
+#endif
void
stossc()
{