• Eike Rathke's avatar
    Correct typed_flags<PivotFunc> mask is 0x1fff · 639a401f
    Eike Rathke yazdı
    This was wrong since
    
        commit 298ee506
        CommitDate: Sun Nov 20 00:14:28 2016 +0100
    
            PivotMedian: Implement median as a new pivot table function
    
    and in fact in a debug build failed an assertion
    
    soffice.bin: include/o3tl/typed_flags_set.hxx:85:
      constexpr o3tl::is_typed_flags<E, M>::Wrap::Wrap(type name std::underlying_type<_Tp>::type)
      [with E = PivotFunc; typename std::underlying_type<_Tp>::type M = 4607; typename std::underlying_type<_Tp>::type = int]:
      Assertion `static_cast<typename std::underlying_type<E>::type>(~0) == M || (value & ~M) == 0' failed.
    
    when one of the functions (e.g. StdVar) not included in the mask
    was chosen as pivot table data function.
    
    Change-Id: I5b9efc7d2cbcf6fece3ef228db8f6e0ffa17b510
    Reviewed-on: https://gerrit.libreoffice.org/64974Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
    Tested-by: Jenkins
    639a401f
dpglobal.hxx 1.7 KB