mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
commit
95f6cfcdd8
|
@ -6361,7 +6361,7 @@ but don't hand-code a well-known algorithm
|
|||
for (int i = 0; i<max; ++i)
|
||||
sum = sum+v[i];
|
||||
|
||||
**Exception**: Large parts of the standard library rely on dynamic allocation (free store). These parts, notably the containers but not the algorithms, are unsuitable for some hard-real time and embedded applications. In such cases, consider providing/using similar facilities, e.g., a standard-libray-style container implemented using a pool allocator.
|
||||
**Exception**: Large parts of the standard library rely on dynamic allocation (free store). These parts, notably the containers but not the algorithms, are unsuitable for some hard-real time and embedded applications. In such cases, consider providing/using similar facilities, e.g., a standard-library-style container implemented using a pool allocator.
|
||||
|
||||
**Enforcement**: Not easy. ??? Look for messy loops, nested loops, long functions, absence of function calls, lack of use of non-built-in types. Cyclomatic complexity?
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user