nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #814: MINIFICPP-1260 make void_t fwd-compatible with C++17
Date Mon, 15 Jun 2020 11:01:59 GMT

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



##########
File path: libminifi/include/utils/GeneralUtils.h
##########
@@ -35,7 +35,7 @@ namespace utils {
 #if __cplusplus < 201402L
 template<typename T, typename... Args>
 std::unique_ptr<T> make_unique(Args&&... args) {
-  return std::unique_ptr<T>{ new T{ std::forward<Args>(args)... } };
+  return std::unique_ptr<T>{ new T(std::forward<Args>(args)...) };

Review comment:
       most significant differences between direct-initialization and direct-list-initialization:
   - direct-list-initialization doesn't allow narrowing conversions
   - direct-list-initialization prefers the initializer-list constructor, and only attempts
regular ctor calls when the initializer-list one does not match, as opposed to doing regular
overload resolution with the initializer-list constructor in the overload set.




----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message