With gnu++11 or later the string can also be a compile time constant expression
inside parens. The constant expression can return a container with data and size
member functions, following similar rules as C++26 static_assert
message. Any string is converted to the character set of the source code.
When this feature is available the __GXX_CONSTEXPR_ASM__
preprocessor
macro is predefined.
#include <string> constexpr std::string_view genfoo() { return "foo"; } void function() { asm((genfoo())); }