Re: [Boost-users] passing variable into template parameters.

2 May
2006
2 May
'06
1:56 p.m.
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of chun ping wang Sent: Tuesday, May 02, 2006 12:54 AM To: boost-users@lists.boost.org Subject: [Boost-users] passing variable into template parameters. Its more of a c++ question but i wonder how would I pass constant variables into template parameters such as nth_index_iterator. Example: void func(const int& var) { nth_index_iterator<var>::type; } Is this possible whats the work around this limitation? [Nat] Could you just make func() a template function, and have 'var' be a template parameter rather than a runtime function parameter?
6871
Age (days ago)
6871
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nat Goodspeed