Single-parameter constructors should be marked explicit.

pull/3109/head
Nicolas "Pixel" Noble 10 years ago
parent 04a1bebeb0
commit 68095aab7d
  1. 2
      cpp/helloworld/greeter_async_client.cc

@ -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) {

Loading…
Cancel
Save