Skip to content

Support a runtime clamped_value<float> for C++<20 #1594

Open

Description

@drewr95

Currently the clamped value utility supports runtime specialization of floats similar to the integral type, however, not for versions that are less than version 20 due to the runtime detection behavior of checking Min and Max non-template types.

Activity

  1. drewr95 commented on Sep 8, 2026

    @drewr95
    CollaboratorAuthor

    @jwellbelove @rolandreichweinbmw Any suggestions on what this specialization should be called? I think it should be compiled (ifdef'd out) if >20. I use a lot of floats, especially for control where constantly normalizing on range -1.0F...1.0F or 0...1.0F so this functionality is highly desirable.

  2. rolandreichweinbmw commented on Sep 8, 2026

    @rolandreichweinbmw
    Collaborator

    By C++ overload, the specialization does not need to be called differently?

  3. drewr95 commented on Sep 8, 2026

    @drewr95
    CollaboratorAuthor

    @rolandreichweinbmw hmm that was not obvious to me. I'll double check. Thank you 😁

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions