Boost logo

Boost :

From: Pavol Droba (droba_at_[hidden])
Date: 2003-03-07 09:34:04


Hi Bootsters,

I have a problem that, I think, is worth of discussion.

When developing a library I came to a to a need of a trait class, containing properties
of different containers.

There is a default behavior and a specialization for different stl containers like vector,
basic_string and etc.

To make the specialiazation, I have to include all the headers for specific containers even,
if they are not used by the user code. ( trait class template does not gets instantiated
for the specific container ).

I have tried to make forward declaration of std::vector and alike, but it does not work all the time,
and, I think it is even forbiden by some compilers.

My question is:
        Is there a correct way how to avoid these unwanted inclusions?

Or more specificaly:
   How to define a partial specialization for a specific type, without including its full definition?

Regards,

Pavol


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk