martinzink commented on code in PR #1612:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1612#discussion_r1273248697


##########
libminifi/include/utils/FlatMap.h:
##########
@@ -282,20 +290,18 @@ class FlatMap{
     return data_.max_size();
   }
 
-  bool empty() const noexcept {
+  [[nodiscard]] bool empty() const noexcept {
     return data_.empty();
   }
 
-  bool contains(const K& key) const {
+  template<typename T>
+  requires std::equality_comparable_with<K, T>
+  bool contains(const T& key) const {

Review Comment:
   it looks like MSVC doesnt like constraint auto, Im getting
   ```
   C:\nifi-minifi-cpp\libminifi\test\unit\FlatMapTests.cpp(51): fatal error 
C1001: Internal compiler error.
   (compiler file 'D:\a\_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\trees.c', 
line 24533)
    To work around this problem, try simplifying or changing the program near 
the locations listed above.
   If possible please provide a repro here: 
https://developercommunity.visualstudio.com/
   ```
   I've found some reported issues with constraint auto and MSVC but those 
issues should be solved, ours is a bit more complex. I will try to create an 
MRE about this issue and file a bug with microsoft, in the meantime should I 
revert to explicit templates?



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to