# C++ Name mangling **[Name mangling](https://en.wikipedia.org/wiki/Name_mangling)** is how C++ compilers encode function and variable names to support overloading and namespaces. The mangled symbol encodes the namespace, class, function name, and parameter types—e.g., `Hello::World::add(int, int)` becomes `_ZN5Hello5World3addIiEET_S2_S2_` following the Itanium ABI. Mangling rules follow the Itanium C++ ABI standard. You can demangle names with `c++filt` to see the original signature. ## Example This example shows how template instantiations generate distinct mangled symbols. ```cpp // compile: g++ -o mangling mangling.cpp // run: ./mangling // description: template instantiations produce distinct mangled symbols namespace Math { template T add(T x, T y) { return x + y; } } int main() { int i = Math::add(1, 2); double d = Math::add(1.5, 2.5); return 0; } ```