$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Pimpl Again?
From: Peter Dimov (lists_at_[hidden])
Date: 2016-05-31 21:52:59
Howard Hinnant wrote:
> It has to be outlined, in the source.cpp:
>
> #include <memory>
>
> class Book
> {
> struct implementation;
> std::unique_ptr<implementation> impl_;
> public:
> ~Book();
> Book();
> };
You could probably do
// hpp
class Book
{
struct implementation;
std::unique_ptr<implementation, void(*)(implementation*)> impl_;
public:
Book();
};
// cpp
Book::Book(): impl_( new implementation, checked_delete<implementation> ) {}