Single-parameter constructors should be marked explicit.

This commit is contained in:
Nicolas "Pixel" Noble 2015-04-28 08:38:40 +02:00
parent 04a1bebeb0
commit 68095aab7d
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ using helloworld::Greeter;
class GreeterClient { class GreeterClient {
public: public:
GreeterClient(std::shared_ptr<ChannelInterface> channel) explicit GreeterClient(std::shared_ptr<ChannelInterface> channel)
: stub_(Greeter::NewStub(channel)) {} : stub_(Greeter::NewStub(channel)) {}
std::string SayHello(const std::string& user) { std::string SayHello(const std::string& user) {