Inspectopedia Help

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.


template<class T> concept Foo = true; Foo auto func() { return true; } void bar() { auto f = func(); //warn here to add constraint 'Foo' }

Inspection Details

By default bundled with:

CLion 2024.1,

Can be installed with plugin:

CLion, 2024.1

Last modified: 12 March 2024