26 #ifndef LBANN_UTILS_MAKE_ABSTRACT_HPP_INCLUDED 27 #define LBANN_UTILS_MAKE_ABSTRACT_HPP_INCLUDED 29 #include <google/protobuf/message.h> 30 #include <type_traits> 49 template <
class BaseClass>
50 std::unique_ptr<BaseClass>
make_abstract(google::protobuf::Message
const& msg)
53 "There is no specialization of make_abstract() for this type.");
61 template <
class ConcreteClass>
62 std::unique_ptr<ConcreteClass>
make(google::protobuf::Message
const& msg)
65 "There is no specialization of make() for this type.");
70 #endif // LBANN_UTILS_MAKE_ABSTRACT_HPP_INCLUDED std::unique_ptr< ltfb::RandomPairwiseExchange > make(google::protobuf::Message const &)
Concrete builder for RandomPairwiseExchange.
Template that always has a 'value' field that evaluates to 'false'.
std::unique_ptr< BaseClass > make_abstract(google::protobuf::Message const &msg)
Fallback implementation of general factory function template.