Explorar o código

nullptr->shared_ptr conversion

vjpai %!s(int64=10) %!d(string=hai) anos
pai
achega
178a551b5d
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      include/grpc++/config.h

+ 3 - 0
include/grpc++/config.h

@@ -112,6 +112,9 @@ public:
   template <class T> operator std::unique_ptr<T>() const {
     return std::unique_ptr<T>(static_cast<T *>(0));
   }
+  template <class T> operator std::shared_ptr<T>() const {
+    return std::shared_ptr<T>(static_cast<T *>(0));
+  }
   operator bool() const {return false;}
 private:
   void operator&() const = delete;