DORSETRIGS
Home

pass-by-pointer (1 post)


posts by category not found!

Is there any practical reason why std::get_if (std::variant) takes a variant argument by pointer instead of by value/&/const&?

Why Does std get if for std variant Take a Pointer Argument The std get if function in C is designed to safely access a specific type within a std variant Howev

2 min read 05-10-2024 44
Is there any practical reason why std::get_if (std::variant) takes a variant argument by pointer instead of by value/&/const&?
Is there any practical reason why std::get_if (std::variant) takes a variant argument by pointer instead of by value/&/const&?