Make the c++ compiler show aliases instead of full type name in error messages

  aliases, c++, error-messaging, template-aliases

Given for example this code:

using FooBar = ns::Foo<Bar<3,5>>;
void fcn(FooBar a) {
  ...
}

normally, in error message the function would be referred to as void fcn(ns::Foo<Bar<3,5>> a). When having a lot of template structure this could be difficult to read in the error message, is there a way to make the compiler show messages with the alias used in the code void fcn(FooBar a)?

Source: Windows Questions C++

LEAVE A COMMENT