lordgamez commented on code in PR #1661:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1661#discussion_r1338795626


##########
libminifi/src/core/extension/ExtensionManager.cpp:
##########
@@ -31,9 +31,13 @@ namespace org::apache::nifi::minifi::core::extension {
 
 const std::shared_ptr<logging::Logger> ExtensionManager::logger_ = 
logging::LoggerFactory<ExtensionManager>::getLogger();
 
-ExtensionManager::ExtensionManager() {
-  modules_.push_back(std::make_unique<Executable>());
-  active_module_ = modules_[0].get();
+ExtensionManager::ExtensionManager()
+    : modules_([] {
+        std::vector<std::unique_ptr<Module>> modules;
+        modules.push_back(std::make_unique<Executable>());
+        return modules;
+      }()),

Review Comment:
   Unfortunately that does not compile:
   ```
   In file included from /usr/lib/llvm-16/bin/../include/c++/v1/memory:884:
   In file included from 
/usr/lib/llvm-16/bin/../include/c++/v1/__memory/allocate_at_least.h:13:
   /usr/lib/llvm-16/bin/../include/c++/v1/__memory/allocator_traits.h:304:9: 
error: no matching function for call to 'construct_at'
           _VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...);
           ^~~~~~~~~~~~~~~~~~~
   ```



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