Closed carloscbl closed 4 years ago
Hi hi! Check this code: https://github.com/carloscbl/prot/blob/master/source/trace_bullet.hpp#L296-L319
As you can see i have an optinal "where" argument, so i have to duplicate the whole statement to branch it. Is there a way to do this without repeating nothing more than the where expresion?
Best regards!
Hi,
There are multiple ways of doing that:
Personally, I would go for either 1 (if there is only one optional value) or 3.
Best,
Roland
I see! I'll give a try! thanks
Hi hi! Check this code: https://github.com/carloscbl/prot/blob/master/source/trace_bullet.hpp#L296-L319
As you can see i have an optinal "where" argument, so i have to duplicate the whole statement to branch it. Is there a way to do this without repeating nothing more than the where expresion?
Best regards!