我在有效的现代cpp中学习pimpl,经过一番搜索,没有人谈论pimpl成语的impl类的析构函数,是不是没有必要?
//in widget.h
#include <memory>
class Widget{
public:
Widget();
private:
struct Impl;
std::unique_ptr<Impl> pImpl;
};
//in widget.cpp
........
struct Widget::Impl{
std::string name; // Widget::Impl
std::vector<double> data;
};
struct Widget::~Impl() //error!!!,how can we implement it
{
};