aplus: fix C++ syntax errors

Allows compilation with clang.

Fixes #23026.