<分区>
我正在阅读 HELib 的源代码并遇到以下类 definition :
#define CLONED_PTR_DECLARE(CLONED_PTR_TYPE,CLONED_PTR_INIT) \
\
template <class X, class Cloner = CLONED_PTR_INIT<X> > class CLONED_PTR_TYPE \
{ \
......
const X* get_ptr() const { return ptr; } \
X* get_ptr() { return ptr; } \
......
}; \
\
但据我了解,C++ 没有通过返回值重载函数。那么这两个get_ptr()
函数的作用是什么呢?