adamdebreceni commented on a change in pull request #865:
URL: https://github.com/apache/nifi-minifi-cpp/pull/865#discussion_r481870424
##########
File path: libminifi/src/utils/Id.cpp
##########
@@ -48,6 +48,8 @@ namespace nifi {
namespace minifi {
namespace utils {
+const char* Identifier::UUID_FORMAT_STRING =
"%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx";
Review comment:
you are right that from `c++17` `inline` comes to the rescue, but even
in `c++11` we may (must) add an initializer to the declaration of a literal
constexpr variable (and it is enough if it is not odr-used) (see
[here](https://en.cppreference.com/w/cpp/language/static) in section `Constant
static members`)
```
#include <stdio.h>
struct A{
static constexpr const char* FORMAT = "%d\n";
};
int main(){
// uncommenting the following will generate a linker error
// auto& ref = A::FORMAT;
printf(A::FORMAT, 5);
}
```
it is not pivotal to move it to the header, I just wanted to share that it
is possible
----------------------------------------------------------------
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]