Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99528

QMetaTypeForType::name: msvc constexpr limitation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 6.2.2
    • Core: Object Model
    • None

      i'm not sure if there's an easy way around this: i'm using some very long `std::variant`s as signal arguments. the types are registered to the meta type system, but when compiling
      ```static constexpr decltype(typenameHelper<S>()) name = typenameHelper<S>();```, msvc bails out with "error C2131: expression did not evaluate to a constant"

      include\QtCore/qmetatype.h(1798): note: failure was caused by evaluation exceeding step limit of 1048576 (/constexpr:steps<NUMBER>)
      

      while i've been able to work around by increasing the `/constexpr:steps` count, i wonder if there's something that can be done in the constexpr computation

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes