From 06ea541ed955e931668a032fc5d9ac096d37e088 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 15 Jun 2016 10:57:50 -0700 Subject: Provide nullptr->std::function cast --- include/grpc++/impl/codegen/config.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/grpc++') diff --git a/include/grpc++/impl/codegen/config.h b/include/grpc++/impl/codegen/config.h index d782d5f571..cf88efa1d1 100644 --- a/include/grpc++/impl/codegen/config.h +++ b/include/grpc++/impl/codegen/config.h @@ -78,6 +78,7 @@ #endif #ifdef GRPC_CXX0X_NO_NULLPTR +#include #include namespace grpc { const class { @@ -95,6 +96,10 @@ const class { return std::shared_ptr(static_cast(0)); } operator bool() const { return false; } + template + operator std::function() const { + return std::function(); + } private: void operator&() const = delete; -- cgit v1.2.3