LINUX.ORG.RU

История изменений

Исправление PRN, (текущая версия) :

Учи матчасть, читай что такое пимпл идиома - https://en.cppreference.com/w/cpp/language/pimpl

// --------------------
// interface (widget.h)
struct widget
{
    // public members
private:
    struct impl; // forward declaration of the implementation class
    // One implementation example: see below for other design options and trade-offs
    std::experimental::propagate_const< // const-forwarding pointer wrapper
        std::unique_ptr<                // unique-ownership opaque pointer
            impl>> pImpl;               // to the forward-declared implementation class
};
 
// ---------------------------
// implementation (widget.cpp)
struct widget::impl
{
    // implementation details
};

И все хидера буста помещать только в cpp файле. Тогда ничего не «протечет».

Исходная версия PRN, :

Учи матчасть, читай что такое пимпл идиома - https://en.cppreference.com/w/cpp/language/pimpl