This broke the build on local Ubuntu 22. I rearranged the include order and disabled clang-format for that code snippet to fix this problem permanently.
Also, added a missing <optional> include.
<optional>
Confirmed successful build on local machine.