c++11 - Are the implicit move ctor/assignmet operations noexcept? What about implicit copy operations? -


the question titles says all. need know if default copy/move assignment/ctors implemented implicitly compiler declared noexcept.

the standard says:

an inheriting constructor (12.9) , implicitly declared special member function (clause 12) have exception-specification. if f inheriting constructor or implicitly declared default constructor, copy constructor, move constructor, destructor, copy assignment operator, or move assignment operator, implicit exception-specification specifies type-id t if , if t allowed exception-specification of function directly invoked f’s implicit definition; f allows exceptions if function directly invokes allows exceptions, , f has exception-specification noexcept(true) if every function directly invokes allows no exceptions.

so if implicitly declared copy/move assignment/ctors of class not need call marked noexcept(false) have noexcept(true) specifier. functions need called copy/move assignment/ctors of base class , non-static data members.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -