任何人都知道`cimg :: exception_mode()= 0;`是什么?

use*_*729 2 c++

  const unsigned int omode = cimg::exception_mode();
  cimg::exception_mode() = 0;
Run Code Online (Sandbox Code Playgroud)

以前从未见过这种语法.

Gia*_*nni 7

异常模式可能正在返回引用,并且它被设置为0.例如:

unsigned int& exception_mode() { return mode; };
Run Code Online (Sandbox Code Playgroud)

所以,第二行相当于:

void set_exception_mode( uint v ) { mode = v; };
Run Code Online (Sandbox Code Playgroud)

顺便说一下,真的很难看!我会尽可能地避免使用这种语法.