bakaid commented on a change in pull request #713: MINIFICPP-1119
MINIFICPP-1154 unify win/posix sockets + fix bugs
URL: https://github.com/apache/nifi-minifi-cpp/pull/713#discussion_r377558824
##########
File path: libminifi/src/io/StreamFactory.cpp
##########
@@ -38,35 +39,21 @@ namespace io {
template<typename T, typename V>
class SocketCreator : public AbstractStreamFactory {
- template<bool cond, typename U>
- using TypeCheck = typename std::enable_if< cond, U >::type;
-
- template<bool cond, typename Q>
- using ContextTypeCheck = typename std::enable_if< cond, Q >::type;
-
public:
template<typename Q = V>
- ContextTypeCheck<true, std::shared_ptr<Q>> create(const
std::shared_ptr<Configure> &configure) {
+ std::shared_ptr<Q> create(const std::shared_ptr<Configure> &configure) {
return std::make_shared<V>(configure);
}
- template<typename Q = V>
- ContextTypeCheck<false, std::shared_ptr<Q>> create(const
std::shared_ptr<Configure> &configure) {
- return std::make_shared<SocketContext>(configure);
- }
- SocketCreator<T, V>(const std::shared_ptr<Configure> &configuration)
+ explicit SocketCreator<T, V>(const std::shared_ptr<Configure> &configuration)
Review comment:
This breaks API.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services