diff options
author | Ville Voutilainen <ville.voutilainen@gmail.com> | 2017-03-29 15:05:50 +0300 |
---|---|---|
committer | Ville Voutilainen <ville@gcc.gnu.org> | 2017-03-29 15:05:50 +0300 |
commit | 0000fd8cfd4ec4d053a003dc72d50dc8db553d09 (patch) | |
tree | 27bbbb0a07c7328b52f25fa9039ee6b3814f0e0f /libstdc++-v3/python | |
parent | 5c0a28d4c59e888f67e33cf76cfc855e57a00cc2 (diff) | |
download | gcc-0000fd8cfd4ec4d053a003dc72d50dc8db553d09.zip gcc-0000fd8cfd4ec4d053a003dc72d50dc8db553d09.tar.gz gcc-0000fd8cfd4ec4d053a003dc72d50dc8db553d09.tar.bz2 |
Adjust optional's pretty printer for LWG 2900.
* python/libstdcxx/v6/printers.py (StdExpOptionalPrinter.__init__):
Look at the nested payload in case of non-experimental optional.
From-SVN: r246566
Diffstat (limited to 'libstdc++-v3/python')
-rw-r--r-- | libstdc++-v3/python/libstdcxx/v6/printers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index 14025dd..a67b27a 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -1023,6 +1023,8 @@ class StdExpOptionalPrinter(SingleObjContainerPrinter): valtype = self._recognize (val.type.template_argument(0)) self.typename = re.sub('^std::(experimental::|)(fundamentals_v\d::|)(.*)', r'std::\1\3<%s>' % valtype, typename, 1) self.typename = strip_versioned_namespace(self.typename) + if not self.typename.startswith('std::experimental'): + val = val['_M_payload'] self.val = val contained_value = val['_M_payload'] if self.val['_M_engaged'] else None visualizer = gdb.default_visualizer (val['_M_payload']) |