Re: [eigen] Proposal for STL containers helper templates |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Proposal for STL containers helper templates
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Tue, 23 Nov 2010 21:45:58 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=ADPrUXieNYrxQisTdq7gtxW7HmwftQXmubsLABkfSoU=; b=ZvATxOBaFE/WeZTSOaET64E2P9RyxLIyAhpo62+q6xUDks1FSu2wdDCzTWulYUUJjy dTo8pvPyolSz2hYA0tAKqN8Uakpl88L03fbmTVhpnJhCIAaKhw9mReVUscVxBv2gAqjl 9Ua+NMbVF1//gaAkaSED82NZ1zCkE/jCSRsSw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=rGX5+i0W2TqgX4g6B40PN5F/0dYq/Z8VJo+FirqmROtaycmAK2DqeHvcbzoVc8HD11 IfhGdutG742VdljRZQEZRaI6joFSnkX9ZYHn3voRhQ0PF+3vwFs7z7P1ya+Xsgr8cerm K4DN8ZL0JnqWkZfAcseBcQpZWkR5qJ/hQEd08=
note that we also provide a convenient macro such that you don't have
to specify the allocator for some explicitly given types, e.g.:
declaring:
EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Vector4f)
allows you to simply write:
std::vector<Vector4f> vec;
gael
On Tue, Nov 23, 2010 at 8:21 PM, Jose Luis Blanco
<joseluisblancoc@xxxxxxxxx> wrote:
>> Not quite: you'd still need a typename keyword:
>>
>> typename aligned_containers<int,MatrixXd>::map_t myVar;
>
> Hmm...I *think* "typename" would be needed only within templates when
> either KEY or VALUE in <KEY,VALUE> themselves are template
> arguments...
>
>> I'm not really in favor of having this in Eigen: it's not our job to
>> make the STL's API easier, this is quite orthogonal to Eigen except
>> for the fact that we provide one STL allocator, and different users
>> may prefer different solutions (looks like a matter of taste).
>
> ...but in any case, OK, it's a minor issue not strongly related to
> Eigen. So to my code it goes then!
>
> Benoit, thanks for your quick answer!
>
> JL
>
>
>