Sure, use decltype
:
auto var_a = bar(t);
decltype(var_a) b;
You can add cv-qualifiers and references to decltype
specifiers as if it were any other type:
const decltype(var_a)* b;
Sure, use decltype
:
auto var_a = bar(t);
decltype(var_a) b;
You can add cv-qualifiers and references to decltype
specifiers as if it were any other type:
const decltype(var_a)* b;