2023-01-31 15:08:20 +01:00
|
|
|
auto func()
|
|
|
|
|
{
|
|
|
|
|
return R"(foo
|
2023-05-24 16:21:17 +02:00
|
|
|
|
2023-01-31 15:08:20 +01:00
|
|
|
R"notaprefix!(
|
|
|
|
|
barfoobar)" R"(second)" /* comment */ R"(third)";
|
|
|
|
|
}
|
2023-01-31 18:02:08 +01:00
|
|
|
|
|
|
|
|
void keywords()
|
|
|
|
|
{
|
|
|
|
|
bool b1 = true;
|
|
|
|
|
bool b2 = false;
|
|
|
|
|
void *p = nullptr;
|
|
|
|
|
}
|
2023-01-31 18:13:42 +01:00
|
|
|
|
|
|
|
|
void numberLiterals()
|
|
|
|
|
{
|
|
|
|
|
auto integer = 1;
|
|
|
|
|
auto numFloat1 = 1.2f;
|
|
|
|
|
auto numFloat2 = 1.2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template<int n = 5> class C;
|
2023-01-31 18:26:34 +01:00
|
|
|
|
|
|
|
|
struct ConversionFunction {
|
|
|
|
|
operator int();
|
|
|
|
|
};
|
2023-03-14 09:53:03 +01:00
|
|
|
|
|
|
|
|
template<typename T> concept NoConstraint = true;
|
2023-04-12 12:15:12 +02:00
|
|
|
|
|
|
|
|
const char16_t *operator ""_w(const char16_t *s, size_t) { return s; }
|
|
|
|
|
const auto s = u"one"_w;
|
|
|
|
|
const auto s2 = L"hello";
|
|
|
|
|
const auto s3 = u8"hello";
|
|
|
|
|
const auto s4 = U"hello";
|
|
|
|
|
const auto s5 = uR"("o
|
|
|
|
|
ne")"_w;
|
|
|
|
|
const auto s6 = u"o\
|
|
|
|
|
ne"_w;
|
2023-07-05 17:09:52 +02:00
|
|
|
|
|
|
|
|
static void parenTest()
|
|
|
|
|
{
|
|
|
|
|
do {
|
|
|
|
|
/* comment */ \
|
|
|
|
|
} while (false);
|
|
|
|
|
}
|
2023-11-21 16:07:53 +01:00
|
|
|
|
|
|
|
|
const char* s7 = R"(
|
|
|
|
|
))";
|