This project is read-only.
1
Vote

Most macro names in "diversPdf.hpp" violate the C++ standard

description

From the C++ standard, since C++98:
17.4.3.1.2 Global names [lib.global.names]

Certain sets of names and function signatures are always reserved to the implementation:
  • Each name that contains a double underscore (_ _) or begins with an underscore followed by an uppercase letter (2.11) is reserved to the implementation for any use.
  • Each name that begins with an underscore is reserved to the implementation for use as a name in the global namespace.
Such names are also reserved in namespace ::std (17.4.3.1).
Most macros in diversPdf.hpp violate these rules. As such, the code fails to compile with GCC-6, with such errors as:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/ext/type_traits.h:152:30: error: ‘__ptr’ was not declared in this scope
     __is_null_pointer(_Type* __ptr)
                              ^~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/include/g++-v6/ext/type_traits.h:153:5: error: expected ‘;’ before ‘{’ token
Although this can be fixed for GCC-6 by changing _Type to something like Type_, for example, it remains undefined behavior in violation of the standard.

See https://bugs.gentoo.org/show_bug.cgi?id=594668

comments