This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] c++0x variadic min, max and minmax.



On Jul 11, 2008, at 11:48 AM, Chris Fairles wrote:
N2696 ( http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2696.pdf
) in section 25.7.3 there are notes that they currently cannot specify
requirements in concept syntax for the variadic min/max with custom
comparer so I'm not sure if the implementations will be any easier
with concepts given the current specification. Then again, I can't see
the committee leaving the custom-compare versions unconstrained or use
template meta-programming for those overloads and concept requirements
for the others.

We'll see :)


Most likely, our (= the concepts group's) recommendation will be to remove the version that can't be specified with concepts. I don't know which way the LWG will go.


The min/max versions w/o custom comparer seems like it will be trivial to implement

template<LessThanComparable T, LessThanComparable... Args>
 requires SameType<T, Args>...
const T& min(const T& t, const T&... args) ... etc.

No need for std::is_same variadic or not. (I tried in conceptgcc with
no luck, I dont think variadic concepts are supported).

No, variadic concepts aren't supported yet in ConceptGCC.


- Doug


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]