home.social

#cpp29 — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #cpp29, aggregated by home.social.

  1. @mhoemmen mdspan feature request 😉:
    Allow mdspan::operator[] with one argument less than rank.
    Mandates/Constraints: The resulting range is contiguous in memory.
    Returns: A span (of static extent, if possible).

    Then I can use std::simd CTAD from range:
    simd::basic_vec(B[k], simd::flag_aligned);

    instead of:
    simd::unchecked_load<simd::vec<T, N>>(&B[k, 0], &B[k, N-1], simd::flag_aligned);

    The former is not only simpler but also safer.

    #WG21 #cpp29

  2. Can we fix the following inconsistency in #CPlusPlus: compiler-explorer.com/z/qsYeTn? A conversion operator is sufficient to call wrapped function pointers. But it does not work for wrapped callable objects. And that's even though `wrapper` in the above example has the callable type in its associated namespaces (ADL). ADL was introduced to make operators work. I patched my #GCC to make it work and I like it.

    #WG21 #cpp29 #cpp