by everslick · 5y ago · 0 comments
T get_t(int how, char **error);
int get_val(T *v);
One could rewrite these as struct get_t_res {T; char *};
struct get_t_res get_t(int);
struct get_val_res {int; T};
struct get_val_res get_val();
But what do you think of it?For the use cases that are too expensive to use functions, macros can be used instead.
However that is only if C++ cannot be used at all, otherwise don't bother.
that's latest GCC, at -O3