Annex C (informative) Compatibility [diff]

C.2 C++ and ISO C++ 2003 [diff.cpp03]

C.2.16 Clause [input.output]: input/output library [diff.cpp03.input.output]

[istream::sentry], [ostream::sentry], [iostate.flags]
Change: Specify use of explicit in existing boolean conversion functions.
Rationale: Clarify intentions, avoid workarounds.
Effect on original feature: Valid C++ 2003 code that relies on implicit boolean conversions will fail to compile with this International Standard. Such conversions occur in the following conditions:

[ios::failure]
Change: Change base class of std​::​ios_­base​::​failure.
Rationale: More detailed error messages.
Effect on original feature: std​::​ios_­base​::​failure is no longer derived directly from std​::​exception, but is now derived from std​::​system_­error, which in turn is derived from std​::​runtime_­error. Valid C++ 2003 code that assumes that std​::​ios_­base​::​failure is derived directly from std​::​exception may execute differently in this International Standard.

[ios.base]
Change: Flag types in std​::​ios_­base are now bitmasks with values defined as constexpr static members.
Rationale: Required for new features.
Effect on original feature: Valid C++ 2003 code that relies on std​::​ios_­base flag types being represented as std​::​bitset or as an integer type may fail to compile with this International Standard. For example:

#include <iostream>

int main() {
  int flag = std::ios_base::hex;
  std::cout.setf(flag);         // error: setf does not take argument of type int
}