Passing invariants and dasserts should be usable in constexpr code

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Fully Compatible
    • ALL
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      uassert is usable because the if is in a macro that expands into the current function. Unfortunately invariant uses a wrapper function that isn't marked constexpr so it is unusable from within a function marked constexpr. We should fix this rather than requiring terrible workarounds like if (cond) invariant(0, "message")

            Assignee:
            Mathias Stearn
            Reporter:
            Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: