소스 검색

Delete default TimePoint constructor to detect error at compile time

Esun Kim 5 년 전
부모
커밋
89908faede
1개의 변경된 파일2개의 추가작업 그리고 8개의 파일을 삭제
  1. 2 8
      include/grpcpp/impl/codegen/time.h

+ 2 - 8
include/grpcpp/impl/codegen/time.h

@@ -39,14 +39,8 @@ namespace grpc {
 template <typename T>
 class TimePoint {
  public:
-  TimePoint(const T& /*time*/) { you_need_a_specialization_of_TimePoint(); }
-  gpr_timespec raw_time() {
-    gpr_timespec t;
-    return t;
-  }
-
- private:
-  void you_need_a_specialization_of_TimePoint();
+  TimePoint(const T& /*time*/) = delete;
+  gpr_timespec raw_time() = delete;
 };
 
 template <>