Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyone knows what `cimg::exception_mode() = 0;` does?

Tags:

c++

  const unsigned int omode = cimg::exception_mode();
  cimg::exception_mode() = 0;

Never see this kinda syntax before.

like image 434
user198729 Avatar asked Jan 26 '26 11:01

user198729


1 Answers

exception mode might be returning a reference, and it is being set to 0. For example:

unsigned int& exception_mode() { return mode; };

So, the second line would be equivalent to:

void set_exception_mode( uint v ) { mode = v; };

BTW, it is really ugly! I would avoid this kinda syntax as much as I could.

like image 166
Gianni Avatar answered Jan 28 '26 00:01

Gianni



Donate For Us

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