Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-01-26 17:05:19

Arkadiy Vertleyb wrote:
> "Tobias Schwinger" <tschwinger_at_[hidden]> wrote
>>Well, after reading Dave's post I believe it might be possible to allow
>> REG_SPEC((typename T),(std::set<T,std::less<T>,std::allocator<T> >))
> Considering my previous post... we could probably make it:
> REG_SPEC((typename),(std::set<P0,std::less<P0>,std::allocator<P0> >))
> Where P0 stands for "the first parameter". We already use this techinique
> in dependent template parameters. Then (typename) is free to use for other
> purposes.
> The above syntax is most attractive, but I think there will be a problem
> specializing on a type that was calculated by the means of template
> metaprogramming...

That's not exactly what I meant. It's possible to

   #define REG_SPEC(a,b) \
      ... struct my_traits< a_private_return_type b > { ... }

And then use "my_traits< a_private_return_type(T) >".

However, we can't apply this technique globally because not all types are valid function parameter types (this is what I meant with "extra work" in the sentence below).

>>(with some extra work that is -- by specializing for a function with a special
>>return type).

>> [... code]
>>Anything that works with your taste among it?
> All of them are much better than using ")(" :-)

So what? IIRC my post contained a disclaimer that I was trying to communicate functionality and not designing a pretty user interface :-).

>> [... line breaks in conversation]
> I also switched to 80 (was 50) -- let's see if it works...

Obviously not so really. As another experiment I told my client not to break lines at all (if my posts remain readable it should be a solution).



Boost list run by bdawes at, gregod at, cpdaniel at, john at