0

I can't find anything on what to replace a throw with in c++ when updating code. Seeing throw will be removed in the next version, c++20.

Also it was deprecated and I can find no information as to what the accepted replacement is. example:

const Vec2 &    normalize ();           // modifies *this
const Vec2 &    normalizeExc () throw (IEX_NAMESPACE::MathExc);
const Vec2 &    normalizeNonNull ();

Vec2<T>     normalized () const;    // does not modify *this
Vec2<T>     normalizedExc () const throw (IEX_NAMESPACE::MathExc);
Vec2<T>     normalizedNonNull () const;
Whitequill Riclo
  • 788
  • 2
  • 8
  • 19
  • 1
    `throw` [exception specifiers](https://en.cppreference.com/w/cpp/language/except_spec) (not function) have been deprecated since the C++11 standard. Use [`noexcept`](https://en.cppreference.com/w/cpp/language/noexcept_spec) instead. – Some programmer dude Nov 12 '19 at 09:55
  • 3
    the usage of `throw` you have in your code never was throwing exceptions, it was just specifiying that the function may throw. `throw` to actually throw exceptions is unlikely to be decrecated (soon) – 463035818_is_not_an_ai Nov 12 '19 at 09:57

0 Answers0