On Wed, Mar 18, 2026 at 4:16 PM Jakub Jelinek <[email protected]> wrote:
> On Wed, Mar 18, 2026 at 03:56:17PM +0100, Tomasz Kaminski wrote: > > > Here is a new version of the plugin. > > > As requested, it doesn't diagnose any of the headers outside of > > > <bits/stdc++.h>, for -std=c++26 tests with also -freflection > -fcontracts > > > for now, contains a self test for the plugin to make sure it diagnoses > > > stuff it should diagnose and doesn't what it shouldn't, walks template > > > specializations, walks non-template functions inside of templates, > > > adds GC support to the plugin, whitelists submdspan_mapping manually > > > for C++26, > > > > Why exactly submdspan_mapping needs a special treatment, it should > > be no different from other ADL-only calls in the library, like begin/end? > > The plugin automatically whitelists non-uglified names of declarations > that it > sees in the std namespace and nested namespaces and in classes/class > templates > thereof except for declarations inside of non-inline _ prefixed namespaces, > trying to roughly reconstruct what is in > https://eel.is/c++draft/libraryindex . > The whitelisted ones are reported by the plugin too, but with a different > wording which doesn't make the testcase to fail. > And begin/end are whitelisted that way, submdspan_mapping is not. > E.g. > libstdc++-v3/include/bits/unicode.h:160:7: note: non-uglified whitelisted > name 'begin' > libstdc++-v3/include/bits/unicode.h:738:22: note: non-uglified whitelisted > name 'end' > We have a hidden friend declaration of submdspan_mapping both in the standard and in our implementation for each layout. For example in libstdc++/include/std/mdspan:2780. > > Jakub > >
