[cxx-abi-dev] mangling for c++17 decomposition declarations

Richard Smith richardsmith at google.com
Fri Aug 12 23:59:54 UTC 2016


C++17 decomposition declarations are (surprisingly) permitted at global
scope. They can't be forward-declared nor made inline (yet...), and it
seems likely that the wording probably didn't *mean* to allow them to be
declared as templates, so we don't appear to need a cross-vendor mangling
for them. However, establishing a convention would be useful for demanglers.

For now, I'm mangling global decomposition declarations as:

  <unqualified-name> ::= DC <source-name>* E

... where the <source-name>s are the names of the bindings. (I'm mangling
the bindings in the obvious way, as if they were reference declarations,
but they get a mangled name even at global scope.)

We could get away with mangling only the name of the first binding, but the
extra information seems useful to people looking at the mangled name.

Thoughts? Is it worth specifying this in the ABI?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20160812/5ffbfb29/attachment.html>


More information about the cxx-abi-dev mailing list