Boost logo

Boost Users :

Subject: Re: [Boost-users] Dynamically creating new units
From: Ray Burkholder (ray_at_[hidden])
Date: 2009-12-25 21:25:55

> Ah, but you can, depends on how you can abstract your system. Think
> of how C works with void pointers and such and you can start to see
> patterns for your classes. Think of this.


> And the implementation is in a cpp file, but now everything that uses
> this has to include all the nasty and slow instancing for the
> someSuperHeavyTemplate<int> type. Now think of this in a C way...
> class myStuff;


> And the implementation contains the implementation of myStuff and the
> function definitions. Only that cpp file includes the heavy template
> instancing, and all other accesses are fast. You can only do this on
> classes/struct that you normally use as pointers in the first place,
> but if you can then you can see how you can vastly simplify access to
> only what is needed in the public interface, rather then *everything*
> that is in the interface.

I think this falls under the PIMPL idiom, which is described by Herb Sutter at:

with more generically useful articles at:

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at