
8 Nov
2010
8 Nov
'10
9:55 a.m.
On Sun, 07 Nov 2010 02:00:42 -0600, vicente.botet <vicente.botet@wanadoo.fr> wrote:
Ah, I've forget to ask: How is it that it works for gcc-3.4, gcc-4.3, gcc-4.5? Where is the value_type defined?
It's an implementation artifact: GCC has typeof, and typeof-based vectors use inheritance to build push_back's result: template<> struct push_back_impl< aux::vector_tag > { template< typename Vector, typename T > struct apply { typedef v_item<T,Vector,0> type; }; }; template< typename T , typename Base , int at_front = 0 > struct v_item : Base { ... }; HTH, -- Aleksey Gurtovoy MetaCommunications Engineering