$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2003-10-03 23:06:17
From: "David Abrahams" <dave_at_[hidden]>
> Pavol Droba <droba_at_[hidden]> writes:
>
> > Given this structure, "new" interface is just a part of layer
> > 2. This is the presentation layer, but it should be documented
> > so. Core should be always the layer 1 ( and the "old" interface
> > ). It is very importatn due to extensibility reasons.
>
> You've got it upside-down, if you care about compile-time efficiency.
> Using any one of the nested declarations of the "old" interface causes
> them all to be instantiated.
I don't understand this. Basically we use 4 helper classes to determine
which type we're dealing
with; when the right it found, we propagate the typedefs and functions. So
you're saying its cheaper to
instantiate X than Y
template< typename C >
struct X
{
typedef ...::iterator iterator;
};
template< typename C >
struct Y
{
typedef ...::size_type size_type;
typedef ....::iterator iterator;
};
both wat if more than one declaration is needed? Won't many compilers reuse
the old intantiations instead of using all the decision logic again?
Thorsten