Skip to content

Commit 4d2f4d4

Browse files
Fix "Class types in non-type template parameters" example.
1 parent 052c3d8 commit 4d2f4d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CPP20.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ struct foo {
321321
constexpr foo(int) {}
322322
};
323323
324-
template <foo f>
324+
template <foo f = {}>
325325
auto get_foo() {
326326
return f;
327327
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ struct foo {
424424
constexpr foo(int) {}
425425
};
426426
427-
template <foo f>
427+
template <foo f = {}>
428428
auto get_foo() {
429429
return f;
430430
}

0 commit comments

Comments
 (0)