Skip to content

Commit

Permalink
Fix 'meta' for '^int' syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
katzdm committed Nov 4, 2024
1 parent cfdc5e2 commit 8ef4185
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libcxx/include/experimental/meta
Original file line number Diff line number Diff line change
Expand Up @@ -1636,12 +1636,12 @@ consteval span<const ValTy> impl(const span<const ValTy> &in) {
if (in.size() == 0)
return {};

vector Args = {^^ValTy};
vector Args = {LIFT(ValTy)};
for (const auto &V : in)
Args.push_back(reflect_value(V));

return extract<span<const ValTy>>(
substitute(^^StaticSpan, { substitute(^^FixedArray, Args) }));
substitute(LIFT(StaticSpan), { substitute(LIFT(FixedArray), Args) }));
}
} // namespace __define_static

Expand All @@ -1652,7 +1652,8 @@ consteval auto define_static_array(R &&elems)
-> span<const ranges::range_value_t<R>> {
using ValTy = ranges::range_value_t<R>;
using ImplTy = span<const ValTy>(*)(const span<const ValTy> &);
auto impl = extract<ImplTy>(substitute(^^__define_static::impl, {^^ValTy}));
auto impl = extract<ImplTy>(substitute(LIFT(__define_static::impl),
{LIFT(ValTy)}));

vector<ValTy> vals(from_range, elems);
return impl(vals);
Expand Down

0 comments on commit 8ef4185

Please sign in to comment.