'Compile error when using QUERY like in documentaion described

I'm following the documentation and got an error during compilation following example: https://oatpp.io/docs/components/api-controller/#query-parameters-mapping Visual Studio 2017 is complaining about C2839:invalid return type 'type' for overloaded 'operator ->' and C2232 '->' : left operand has 'class-key' type, use '.' when I try to use age like mentioned in the example.

ENDPOINT("GET", "/users", getUsers,
QUERY(Int32, age)) 
{
  OATPP_LOGD("Test", "age=%d", age->getValue());
  return createResponse(Status::CODE_200, "OK");
}

What's wrong with the usage/example?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source