Unconstrained variable type
Reports cases where an expression constrained by a concept is assigned to a variable declared as auto
and suggests adding a type constraint.
Example:
template<class T>
concept Foo = true;
Foo auto func() { return true; }
void bar() {
auto f = func(); //warn here to add constraint 'Foo'
}
Inspection Details | |
---|---|
Available in: | AppCode 2023.3, CLion 2023.3 |
Plugin: | CLion, 2023.3 |
Last modified: 13 July 2023