Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2006-05-18 07:03:44

"Asger Mangaard" <tmb_at_[hidden]> writes:

> David Gruener wrote:
>>>>I'm not sure what this utility is trying to address.
>>>>The motivation is not to write down constructor, destructor, assignment
>>>>and so on. But, unfortunately, you have to.
>>> Why do you think that? No, you don't have to write a constructor,
>> You have to, and you should read the pointers you are given.
>> (here: The article with the grin pointer.)
>>> Still I don't agree with you. Do you have an example to showcase this?
>> Simple. Just try to use (create, detroy, copy...) a pimpled class
>> with implicit defined functions somewhere else than in the implementation
>> file.
> Could you please provide an example? I don't see your point when I'm
> providing code and examples that does what you claim it can't.
> Maybe I'm missing something?
> Could I add; I'm not in any way trying to be rude, I'm just trying to
> understand your points.

#include "boost/pimpl_ptr.hpp"

class test
    void do_stuff();
    boost::pimpl_ptr<struct test_implementation> pimpl;

#include "test.hpp"

struct test_implementation
    void really_do_stuff(){}

void test::do_stuff()

#include "test.hpp"

int main()
    test x; // Error, test_implementation incomplete.


Anthony Williams
Software Developer
Just Software Solutions Ltd

Boost list run by bdawes at, gregod at, cpdaniel at, john at