szaszm commented on a change in pull request #865:
URL: https://github.com/apache/nifi-minifi-cpp/pull/865#discussion_r485641505



##########
File path: libminifi/include/utils/Id.h
##########
@@ -107,9 +107,12 @@ class IdentifierBase {
 typedef uint8_t UUID_FIELD[16];
 
 class Identifier : public IdentifierBase<UUID_FIELD, std::string> {
+  static constexpr const char* UUID_FORMAT_STRING = 
"%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx";

Review comment:
       Pre-C++17, this is only a declaration that requires a definition if 
odr-used (it is odr-used). After C++17, this is redefined to be a definition 
and the namespace-scope one is a deprecated but accepted declaration.
   See the bottom is this page: 
https://en.cppreference.com/w/cpp/language/static
   
   Put this in the .cpp file: `constexpr const char* 
Identifier::UUID_FORMAT_STRING;`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to