Skip to content

Commit

Permalink
fix reinterpret_cast error
Browse files Browse the repository at this point in the history
  • Loading branch information
MacroModel committed Nov 26, 2024
1 parent 2c1554b commit 1111a27
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/fast_io_hosted/process/process/arg_env.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,13 @@ struct posix_process_args

inline constexpr char const *const *get() const noexcept
{
return (char const *const *)(arg_envs.data());
using char_const_p_const_p_may_alias_ptr
#if __has_cpp_attribute(__gnu__::__may_alias__)
[[__gnu__::__may_alias__]]
#endif
= char const *const *;

return reinterpret_cast<char_const_p_const_p_may_alias_ptr>(arg_envs.data());
}

inline constexpr void append(posix_process_args const &others) noexcept
Expand Down

0 comments on commit 1111a27

Please sign in to comment.