Is there an equivalent of Python’s `pass` in c++ std11?

A null statement (just Semicolon), or empty brackets should work for you

For example Python’s

while some_condition():    # presumably one that eventually turns false
    pass

Could translate to the following C++

while (/* some condition */)
    ;

Or

while (/* some condition */) {}

Perhaps for the ternary operator case, you could do:

x > y ? do_something() : true;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)