Skip to content

Commit 6160b23

Browse files
annotations_of_with_type : アノテーションの文字列リテラルはdefine_static_stringでラップする必要がある
Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
1 parent 9afffee commit 6160b23

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

reference/meta/annotations_of_with_type.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ namespace std::meta {
2626
2727
struct Name { const char* value; };
2828
29-
struct [[=Name{"点"}, =42]] Point {
30-
[[=Name{"x座標"}]] int x;
31-
[[=Name{"y座標"}]] int y;
29+
struct [[=Name{std::define_static_string("点")}, =42]] Point {
30+
[[=Name{std::define_static_string("x座標")}]] int x;
31+
[[=Name{std::define_static_string("y座標")}]] int y;
3232
};
3333
3434
int main() {

0 commit comments

Comments
 (0)