fgerlits commented on code in PR #1589:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1589#discussion_r1259777005
##########
libminifi/include/agent/agent_docs.h:
##########
@@ -61,9 +63,12 @@ struct Components {
};
namespace detail {
-template<typename Container>
-auto toVector(const Container& container) {
- return std::vector<typename Container::value_type>(container.begin(),
container.end());
+inline auto toVector(std::span<const core::PropertyReference> properties) {
+ return std::vector<core::Property>(properties.begin(), properties.end());
+}
+
+inline auto toVector(std::span<const core::RelationshipDefinition>
relationships) {
+ return std::vector<core::Relationship>(relationships.begin(),
relationships.end());
Review Comment:
The simpler form doesn't work, because the template argument detection can't
figure out that we want to convert `PropertyReference`s to `Property`s. We
have to tell this to the compiler explicitly as above.
--
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]