You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/04/20 13:38:25 UTC
[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1271: MINIFICPP-1763 - Move extension inclusion logic into the extensions
szaszm commented on code in PR #1271:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1271#discussion_r854106305
##########
extensions/http-curl/CMakeLists.txt:
##########
@@ -17,6 +17,12 @@
# under the License.
#
+if (NOT ((DISABLE_CURL STREQUAL "OFF" OR NOT DISABLE_CURL) AND NOT DISABLE_CIVET))
Review Comment:
```suggestion
if (NOT ((NOT DISABLE_CURL OR NOT DISABLE_CURL) AND NOT DISABLE_CIVET))
```
This should be about the same, expect for accepting "no" and 0 as well.
##########
libminifi/include/core/ConfigurableComponent.h:
##########
@@ -56,6 +56,9 @@ class ConfigurableComponent {
ConfigurableComponent& operator=(const ConfigurableComponent &other) = delete;
ConfigurableComponent& operator=(ConfigurableComponent &&other) = delete;
+ template<typename T = std::string, typename = std::enable_if_t<std::is_default_constructible_v<T>>>
+ std::optional<T> getProperty(const Property& property) const;
Review Comment:
Please use `requires` instead of `enable_if`. We can't yet use standard library concepts (like [`std::default_initializable`](https://en.cppreference.com/w/cpp/concepts/default_initializable)) because of xcode, but we can use requires declarations with type traits.
And I think T should be movable, too, so that we can move the value to the result object.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org