Gromacs
2018.8
|
Compatibility aliases for standard library features.
Provide consistent naming for standard library features that must be back-ported on some platforms. gmx::compat::some_feature may map to back-ported code or to a feature provided by the STL available on a given build platform, but by including the compatibility header and using the gmx::compat namespace, forward and backward compatible code is cleaner and clearer. In the future, when a feature is determined to be provided by the system on all supported platforms, references to gmx::compat::some_feature can be replaced, e.g. with std::some_feature, and gmx::compat::some_feature deprecated.
Since compatibility headers are likely to be included by other headers, there is a risk of ambiguity if code in the gmx namespace refers to an unqualified name in the std namespace. To reduce ambiguity, symbol names from gmx::compat should not be imported into scopes that are shared between multiple translation units (e.g. via using
statements in header files).