Reviewer feedback

pull/13288/head
ncteisen 7 years ago
parent b8ec238211
commit 264560ff4a
  1. 2
      src/core/lib/support/abstract.h
  2. 20
      src/core/lib/support/manual_constructor.h

@ -21,7 +21,7 @@
// This is needed to support abstract base classes in the c core. Since gRPC
// doesn't have a c++ runtime, it will hit a linker error on delete unless
// a we define a virtual operator delete. See this blog for more info:
// we define a virtual operator delete. See this blog for more info:
// https://eli.thegreenplace.net/2015/c-deleting-destructors-and-virtual-operator-delete/
#define GRPC_ABSTRACT_BASE_CLASS \
static void operator delete(void* p) { abort(); }

@ -35,25 +35,25 @@ namespace grpc_core {
// in this file.
namespace manual_ctor_impl {
// is_one_of returns true it a class, Needle, is present in a variadic list of
// classes, Haystack.
template <class Needle, class... Haystack>
// is_one_of returns true it a class, Member, is present in a variadic list of
// classes, List.
template <class Member, class... List>
class is_one_of;
template <class Needle, class... Haystack>
class is_one_of<Needle, Needle, Haystack...> {
template <class Member, class... List>
class is_one_of<Member, Member, List...> {
public:
static constexpr const bool value = true;
};
template <class Needle, class A, class... Haystack>
class is_one_of<Needle, A, Haystack...> {
template <class Member, class A, class... List>
class is_one_of<Member, A, List...> {
public:
static constexpr const bool value = is_one_of<Needle, Haystack...>::value;
static constexpr const bool value = is_one_of<Member, List...>::value;
};
template <class Needle>
class is_one_of<Needle> {
template <class Member>
class is_one_of<Member> {
public:
static constexpr const bool value = false;
};

Loading…
Cancel
Save