cmWindowsRegistry: Add missing <cstdint> include
It is needed for std::uint8_t
, but was left out of !7211 (merged).
For some reason the include-what-you-use tool does not think the include
is needed, so add an IWYU pragma
to keep it.
When buidling CMake with gcc13(13.0.0 20220610), the following error occured because std::uint8_t is not defined.
In file included from /CMake/Source/cmFindCommon.h:14,
from /CMake/Source/cmFindBase.h:11,
from /CMake/Source/cmFindPathCommand.h:10,
from /CMake/Source/cmFindFileCommand.h:10,
from /CMake/Source/cmCommands.cxx:33:
/CMake/Source/cmWindowsRegistry.h:30:8: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
30 | enum class ValueType : std::uint8_t
| ~~~~ ^~~~~
| -----
/CMake/Source/cmWindowsRegistry.h:30:14: error: use of enum 'ValueType' without previous declaration
30 | enum class ValueType : std::uint8_t
| ^~~~~~~~~
/CMake/Source/cmWindowsRegistry.h:30:31: error: 'uint8_t' is not a member of 'std'; did you mean 'wint_t'?
30 | enum class ValueType : std::uint8_t
| ^~~~~~~
| wint_t
/CMake/Source/cmWindowsRegistry.h:31:3: error: default member initializer for unnamed bit-field
31 | {
| ^
/CMake/Source/cmWindowsRegistry.h:38:37: error: 'ValueType' was not declared in this scope
38 | using ValueTypeSet = cm::enum_set<ValueType>;
| ^~~~~~~~~
/CMake/Source/cmWindowsRegistry.h:38:46: error: template argument 1 is invalid
38 | using ValueTypeSet = cm::enum_set<ValueType>;
| ^
/CMake/Source/cmWindowsRegistry.h:38:46: note: invalid template non-type parameter
/CMake/Source/cmWindowsRegistry.h:41:16: error: 'ValueTypeSet' does not name a type
41 | static const ValueTypeSet AllTypes;
| ^~~~~~~~~~~~
/CMake/Source/cmWindowsRegistry.h:43:16: error: 'ValueTypeSet' does not name a type
43 | static const ValueTypeSet SimpleTypes;
| ^~~~~~~~~~~~
/CMake/Source/cmWindowsRegistry.h:46:27: error: 'ValueTypeSet' does not name a type
46 | const ValueTypeSet& supportedTypes = AllTypes);
| ^~~~~~~~~~~~
/CMake/Source/cmWindowsRegistry.h:46:58: error: 'AllTypes' was not declared in this scope
46 | const ValueTypeSet& supportedTypes = AllTypes);
Backport: release
Topic-rename: cmWindowsRegistry-cstdint
Edited by Brad King