Автор: Tobias Schwinger <tschwin...@isonews2.com>
Дата: Thu, 10 Jan 2008 20:41:55 +0100
Местное время: Чт. 10 янв 2008 21:41
Тема: Re: [Boost-users] formal review of Switch library ends tomorrow (Wednesday, January 9th) - reviews needed
It makes sense to answer this one in LIFO order.
Joel de Guzman wrote: > > template <typename Cases> > void foo(Cases cases) { > switch_<void>(n)(cases); > } Aha! Then 'switch_<void>(n)' is a fused function and 'cases' a sequence of > The number of cases *can* vary at compile time. I have a guess that Yes, obviously -- I think because of a pair of parentheses. This code switch_<result>(n) would've told me more easily what you're up to :-). >>> For the purpose of clarification, let me call the original We lose the index and the chance to easily use a single function for all > You must be seeing a use-case that I don't. Yes, see below. [...] > 1. As a thought experiment to figure out which of the two variants is 2. for parameterizing a single function with compile time information Now that I have figured out that your interface accepts sequences, we A ---> B: function := L(I): functions[I]() // Notation: I don't expect us to a reach consensus, but hopefully we do understand Regards, _______________________________________________ Чтобы отправлять сообщения, сначала необходимо Войти.
Чтобы отправлять сообщения, сначала необходимо присоединиться к группе.
Перед отправкой сообщения обновите свой псевдоним на странице Настройки подписки.
У вас нет разрешения на отправку сообщений.
| ||||||||||||||