Skip to content
  • Dean Moldovan's avatar
    Use semi-constexpr signatures on MSVC · 56613945
    Dean Moldovan authored
    MSCV does not allow `&typeid(T)` in constexpr contexts, but the string
    part of the type signature can still be constexpr. In order to avoid
    `typeid` as long as possible, `descr` is modified to collect type
    information as template parameters instead of constexpr `typeid`.
    The actual `std::type_info` pointers are only collected in the end,
    as a `constexpr` (gcc/clang) or regular (MSVC) function call.
    
    Not only does it significantly reduce binary size on MSVC, gcc/clang
    benefit a little bit as well, since they can skip some intermediate
    `std::type_info*` arrays.
    56613945