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



##########
File path: libminifi/include/utils/Id.h
##########
@@ -65,10 +67,11 @@ class Identifier {
 
   bool operator!=(const Identifier& other) const;
   bool operator==(const Identifier& other) const;
+  bool operator<(const Identifier& other) const;
 
   bool isNil() const;
 
-  std::string to_string() const;
+  SmallString<36> to_string() const;

Review comment:
       My point is that if we follow this pattern and say we define 
`MySpecialMD5HashString` in the format of 
`"[[0123456789abcdef0123456789abcdef]]"`, with `using MySpecialMD5HashString = 
SmallString<36>;`, then `MySpecialMD5HashString` and `UUIDString` will be the 
same type and we get no errors or warnings when mixing them up.
   
   Not a very practical example, but that's why I have a preference for 
avoiding such type aliases.




----------------------------------------------------------------
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