Skip to content

Constexpr math (C++23) and arithmetic operators #71

@AbitTheGray

Description

@AbitTheGray

Hi, I've read in #52 about aiming for C++11 support but did you consider supporting constexpr arithmetic operators and math in general?

I don't see any sideeffects fpm::ceil function so it should not be a problem when it is correctly version-checked.

Operators are a little trickier as you have the += implemented but marking it as constexpr won't work. That means static_assert(P{1} + P{2} == P{3}, "Arithmetics failed"); won't compile.

I expect inlining allows the compiler to process it at compile time anyone but it is not possible to use inside explicit constexpr functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions