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 2020/06/15 11:01:59 UTC

[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #814: MINIFICPP-1260 make void_t fwd-compatible with C++17

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