![[C++] C++11 핵심 문법과 예제-3 ; 초보 개발자 일기 29 (noexcept,using ,std::function, trailing, move, foward) [C++] C++11 핵심 문법과 예제-3 ; 초보 개발자 일기 29 (noexcept,using ,std::function, trailing, move, foward)](https://mblogthumb-phinf.pstatic.net/MjAyMjA2MjJfNzMg/MDAxNjU1OTA1NTgxMTMx.qdSZD636nHsdCzZ-geGfr8WajJ9Vs0FL4f2IsKxwQ6Ig.IKfNLbqCNX5In4Raa1i2Jaqyys-P6W_chXYWjP7VP9Ig.PNG.hodong32/image.png?type=w2)
#noexcept, #using #std::function #trailing #cpp11 #c++11 #핵심 #문법 #예제 noexcept noexcept는 c++98에서 예외 처리를 위해 보완된 명령어 이다. 이는 흑백논리의 구조로 예외를 보내거나, 예외를 보내지 않을 때 사용한다는 것을 핵심으로 기억하면된다.
그러면 예제를 가지고, noexcept가 어떻게 작동하는지 알아보겠습니다. noexcept는 일반 함수 뿐만 아니라, 람다식에도 같이 적용할 수 있습니다. void ex_1() { std::cout << " Learn how to work noexcept specification" << std::endl; // throw exception void func1() noexcept(false); // noexception case void func2() noexcept; // void func2() noexcept(true); auto labmda_func = [] () noe...
#c
#예제
#문법
#using
#trailing
#std
#noexcept
#include
#cpp11
#핵심
원문링크 : [C++] C++11 핵심 문법과 예제-3 ; 초보 개발자 일기 29 (noexcept,using ,std::function, trailing, move, foward)