| Home | Libraries | People | FAQ | More

## Macro BOOST_DLL_AUTO_ALIAS

BOOST_DLL_AUTO_ALIAS — Exports variable or function with unmangled alias name.

## Synopsis

    // In header: <boost/dll/alias.hpp>

    BOOST_DLL_AUTO_ALIAS(FunctionOrVar)

## Description

This macro is useful in cases of long mangled C++ names. For example some `void boost::foo(std::string)` function name will change to something like `N5boostN3foosE` after mangling. Importing function by `N5boostN3foosE` name does not looks user friendly, especially assuming the fact that different compilers have different mangling schemes.*

Must be used in scope where FunctionOrVar declared. FunctionOrVar must be a valid C name, which means that it must not contain `::`.

Functions or variables in global namespace must not have names same as FunctionOrVar.

Puts all the aliases into the "boostdll" read only section of the binary. Almost same as BOOST_DLL_ALIAS(FunctionOrVar, FunctionOrVar).

Example:

    namespace foo {
      void bar(std::string&);
      BOOST_DLL_AUTO_ALIAS(bar)
    }

See: BOOST_DLL_ALIAS for making an alias with different names.

Parameters: |
`FunctionOrVar` | Function or variable for which an unmangled alias must be made.