79294872

Date: 2024-12-19 15:55:27
Score: 0.5
Natty:
Report link

Found this as a solution/hack. I was hoping gdb module had a demangler. I'll wait for a better answer.

import subprocess

def demangle(name):
    args = ['c++filt', name]
    pipe = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
    stdout, _ = pipe.communicate()
    return stdout[:-1].decode("utf-8")
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Saitama10000