Thank you very much for your response! I know this reason caused me in trouble. The install function template parameter only one because the compiler will deduce the missing template arguments from the function arguments. reference http://en.cppreference.com/w/cpp/language/template_argument_deduction <http://en.cppreference.com/w/cpp/language/template_argument_deduction>
Thanks very much! > 在 2017年9月14日,下午6:20,Benjamin Bannier <benjamin.bann...@mesosphere.io> 写道: > > Hi, > >> I now read Mesos-1.3.0 sourcecode ,but i am in troubled for Master >> initialize() function。 can you help me? >> >> in Master’s initialize() function : >> install<RegisterSlaveMessage>( >> &Master::registerSlave, >> &RegisterSlaveMessage::slave, >> &RegisterSlaveMessage::checkpointed_resources, >> &RegisterSlaveMessage::version, >> &RegisterSlaveMessage::agent_capabilities); > > It is defined in the header file, e.g., > > > https://github.com/apache/mesos/blob/38cb694f55ec8ab69efa83e1b958eac071fee2d4/3rdparty/libprocess/include/process/protobuf.hpp#L208-L228 > > > Cheers, > > Benjamin