
"Tobias Schwinger" <tschwinger@neoscientists.org> wrote
Arkadiy Vertleyb wrote:
"Tobias Schwinger" <tschwinger@neoscientists.org> wrote
Arkadiy Vertleyb wrote:
"Tobias Schwinger" <tschwinger@neoscientists.org>
Would it be possible to allow Typeof registration of partially specialized templates?
It seems that it would be very hard to achieve any decent syntax :-(
Without thinking about the macro interface for a moment it would be technically possible, wouldn't it?
Yes, I think it would.
It's hot ;-).
Right now I am skeptical about the possibility to implement anything readable, but you are welcome to convince me otherwise ;-)
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...
(with some extra work that is -- by specializing for a function with a
special
return type).
Here are some more straightforward versions which do not seem that hard to read to me (although they involve counting commas):
REG_SPEC((typename T),2,(std::set<T,std::less<T>,std::allocator<T> )) // ^--- comma count
or
REG_SPEC((typename T),3,(std::set<T,std::less<T>,std::allocator<T> )) // ^--- tuple arity
or
REG_SPEC((typename T),(3,(std::set<T,std::less<T>,std::allocator<T> )) ) // \--- pp-array used as a string -----------------/
Anything that works with your taste among it?
<by the way> Our list correspondence is often hard to read because our clients seem to disagree on where to break lines. I set the line width down to 80 characters (which I figure should be acceptable -- it used to be 82 for quotes plus code) but the problem seems to
All of them are much better than using ")(" :-) persist. Is
there anything that you can do about it, perhabs? </by the way>
I also switched to 80 (was 50) -- let's see if it works... Regards, Arkadiy