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



##########
File path: libminifi/include/properties/Properties.h
##########
@@ -82,6 +84,16 @@ class Properties {
    */
   int getInt(const std::string &key, int default_value) const;
 
+  utils::optional<std::string> get(const std::string& key) const {
+    std::string result;
+    const bool found = get(key, result);

Review comment:
       ```
   /home/szaszm/nifi-minifi-cpp-2/libminifi/include/properties/Properties.h: In 
member function 
‘nonstd::optional_lite::optional<std::__cxx11::basic_string<char> > 
org::apache::nifi::minifi::Properties::get(const string&) const’:
   
/home/szaszm/nifi-minifi-cpp-2/libminifi/include/properties/Properties.h:89:29: 
error: operands to ‘?:’ have different types ‘std::string’ {aka 
‘std::__cxx11::basic_string<char>’} and ‘const nonstd::optional_lite::nullopt_t’
      89 |     return get(key, result) ? result : utils::nullopt;
         |            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
   ```




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