Skip to content

LWG-3561 Issue with internal counter in discard_block_engine #2250

Description

LWG-3561 Issue with internal counter in discard_block_engine

Discussion from the meta-issue #2236:

  • Matt Stephanson (@MattStephanson)

    LWG-3561: This would involving changing discard_block's internal _Nx counter and template arguments from int to size_t, which I think would be an ABI break. I think the most we could do now is add a // TRANSITION, ABI comment, and maybe a static_assert for discard_block_engine that its parameters must be <= INT_MAX.

  • Casey Carter (@CaseyCarter)

    I think we could greatly improve discard_block_engine by divorcing it completely from the TR1-era discard_block. We could even make it tolerate p > INT_MAX, but I agree that r > INT_MAX is not supportable without breaking ABI.

  • timsong-cpp

    Couldn't you change the type of _Nx only if r > INT_MAX?
    Edit: looks like MSVC doesn't check narrowing from size_t to int in the NTTP, hmm...is it an ABI break if the existing thing compiles but totally doesn't work?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    LWGLibrary Working Group issuefixedSomething works now, yay!

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions