1.. title:: clang-tidy - cert-mem57-cpp
2
3cert-mem57-cpp
4==============
5
6This check flags uses of default ``operator new`` where the type has extended
7alignment (an alignment greater than the fundamental alignment). (The default
8``operator new`` is guaranteed to provide the correct alignment if the
9requested alignment is less or equal to the fundamental alignment).
10Only cases are detected (by design) where the ``operator new`` is not
11user-defined and is not a placement new (the reason is that in these cases we
12assume that the user provided the correct memory allocation).
13
14This check corresponds to the CERT C++ Coding Standard rule
15`MEM57-CPP. Avoid using default operator new for over-aligned types
16<https://wiki.sei.cmu.edu/confluence/display/cplusplus/MEM57-CPP.+Avoid+using+default+operator+new+for+over-aligned+types>`_.
17