Skip to content

Commit 5998198

Browse files
reflection_range : ラムダ式化
Co-authored-by: Raclamusi <61970673+Raclamusi@users.noreply.github.com>
1 parent dbaaaf2 commit 5998198

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

reference/meta/reflection_range.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ int main() {
2929
constexpr auto r1 = std::meta::substitute(^^std::vector, {^^int});
3030
3131
// vectorで渡す
32-
constexpr std::vector<std::meta::info> args = {^^int};
33-
constexpr auto r2 = std::meta::substitute(^^std::vector, args);
32+
constexpr auto r2 = [] consteval {
33+
std::vector<std::meta::info> args;
34+
args.push_back(^^int);
35+
return std::meta::substitute(^^std::vector, args);
36+
}();
3437
3538
static_assert(r1 == r2);
3639
}

0 commit comments

Comments
 (0)