Skip to content

[BUG] Improve cpp2::in (restore old behavior, exclude problem cases only) #317

Closed
@JohelEGP

Description

@JohelEGP

Describe the bug

#248 (comment) finally pushed to comment on this. This formulation:

  • Passes fundamental types of size greater than 2 object pointers, like some 256-bit extended integer type.
  • Introduces a regression. Types that are not fundamental due to ABI issues, like GCC's 128-bit integer types (-pedantic), are passed by const&.

I suggest reverting the deletion of prefer_pass_by_value and enhancing it to exclude the problematic incomplete types that can affect cpp2::in.

-- a89af8f#r107115865

Also fix < to <= to consider types exactly the size of 2 object pointers. See https://compiler-explorer.com/z/8EKPMrhee.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions