Why when I write definition of a class member function such as
int returnSize() const noexcept
the code compiles, but when I write
int returnSize() noexcept const
it doesn't compile
That's just the way the language is defined.
Exception specifiers need to come after const/volatile qualification: https://en.cppreference.com/w/cpp/language/function

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With