Any preference on using braces to restrict scope?

Jean-Marc Lasgouttes lasgouttes at lyx.org
Mon Nov 21 09:14:36 UTC 2022


Le 18/11/2022 à 18:43, Thibaut Cuvelier a écrit :
> You can avoid this level of indentation by defining the variable within 
> the if:
> 
> if (const vector<docstring> potential_terms = 
> getSubentriesAsText(runparams); !potential_terms.empty()) {
> 
> I don't really like this syntax, because it makes extremely long lines, 
> but it has strong advantages.

I think this is C++17-only syntax.

JMarc



More information about the lyx-devel mailing list