Hi Damien,
You can specify the C++ version using the "AdditionalCompilerFlags" argument as shown below:
clibgen.generateLibraryDefinition("A.hpp","AdditionalCompilerFlags","-std=c++20")
You can find more information about this under the "AdditionalCompilerFlags" section in the clibgen.generateLibraryDefinition documentation: https://www.mathworks.com/help/matlab/ref/clibgen.generatelibrarydefinition.html