...
Code Block | ||||
---|---|---|---|---|
| ||||
// Sometimes generated by configuration tools such as autoconf #define const const // Allowed compilers with semantically equivalent extension behavior #define inline __inline |
DCL32-CPP-EX2: As a compiler vendor or standard library developer, it is acceptable to use identifiers reserved for your implementation. Reserved identifiers may be defined by the compiler, in standard library headers, or headers included by a standard library header, as in this example declaration from the libc++ STL implementation:
Code Block | ||||
---|---|---|---|---|
| ||||
// The following declaration of a reserved identifier exists in the libc++ implementation of
// std::basic_string as a public member. The original source code may be found at:
// http://llvm.org/svn/llvm-project/libcxx/trunk/include/string
template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
class basic_string
{
// ...
bool __invariants() const;
}; |
Risk Assessment
Using reserved identifiers can lead to incorrect program operation.
...