1

According to this answer, exception specifications will become part of the function type in C++17. Does this mean that exception specifications for many functions will also change, e.g. functions in the C compatibility headers getting noexcept specifications? Which standard functions will have their exception specifications changed to noexcept in C++17?

EDIT: Apparently P0488R0, the 2016-10-19 National Body Comments on the standard working draft, includes proposed changes to mark several C compatibility functions noexcept (see US 172-178). I guess we'll have to wait for a reaction from the WG21 on these.

Community
  • 1
  • 1
jotik
  • 17,044
  • 13
  • 58
  • 123
  • The proposal says that exception specification will become part of the function type, but nothing about changing the standard library. – Gonmator Nov 21 '16 at 09:31
  • 1
    @Gonmator It just seems awkward if stuff like `std::sqrt` would not become `noexcept` as a natural consequence to this change in the type system. – jotik Nov 21 '16 at 09:35
  • Related: http://stackoverflow.com/a/30225086/1938163 – Marco A. Nov 21 '16 at 09:44
  • 1
    @jotik: "*as a natural consequence to this change in the type system.*" Why would that be "a natural consequence" of this change? – Nicol Bolas Nov 21 '16 at 14:30

1 Answers1

1

C++17 change to noexcept is permitting function pointers to have the noexcept type.

C++17 change to noexcept has nothing to do with what functions in the standard library are marked noexcept.

Neither depends on the other.

I am aware of no changes in C++17 to mark every function from the C library noexcept.

Yakk - Adam Nevraumont
  • 262,606
  • 27
  • 330
  • 524