C++ noexcept specifier vs noexcept operator

Publicado em: 30 Março 2019
no canal de: Cpp in Detail
2,214
20

More lectures at https://www.udemy.com/cpp-in-detail-e...

Note that noexcept operator performs a compile-time check and doesn’t evaluate the expression.

Unlike operator, noexcept specifier can take only constant expressions that evaluate to either true or false; noexcept specifier can only be used with functions, methods, lambdas, function pointers.

On the other hand, noexcept operator takes any expression and can be used in other expressions. Call to noexcept operator is itself a constant expression.

Furthermore, noexcept operator doesn’t analyze function definition. If you have throw expression in your function, it won’t affect noexcept operator; noexcept operator will look only at declaration.


Nesta página do site você pode assistir ao vídeo on-line C++ noexcept specifier vs noexcept operator duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Cpp in Detail 30 Março 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 2,214 vezes e gostou 20 espectadores. Boa visualização!