🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #2035

Re: variadic min and max, (any some and none, cat and more)

#2035
From: Bonita Montero
Date: Mon, 30 Nov 2026 19:47
18 lines
2012 bytes
Am 30.11.2026 um 19:49 schrieb Lawrence D’Oliveiro:

> On Mon, 30 Nov 2026 19:44:50 +0100, Bonita Montero wrote:

>> It's for sure more flexible since it can handle more variations of
>> compatible types and it's for sure much fasger.

> You betcha:
> 
>      >>> max("red", "green", "blue")
>      'red'
>      >>> max(["red"], ["red", "green"], ["blue"])
>      ['red', 'green']
> 
> Anything that has an ordering defined will work.

In C++ you can write your own conversion to supply compatible types.
Technical Details
Message-ID: <11ekjsp$pmch$2@raubtier-asyl.eternal-september.org>
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
References: <11bes8b$1gncr$1@dont-email.me> <11ek7b2$j8f6$1@raubtier-asyl.eternal-september.org> <11ekfu0$mq5n$4@dont-email.me> <11ekg71$n5p7$1@raubtier-asyl.eternal-september.org> <11ekgf8$mq5n$8@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita Montero <Bonita.Montero@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: variadic min and max, (any some and none, cat and more)
Date: Mon, 30 Nov 2026 20:47:38 +0100
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <11ekjsp$pmch$2@raubtier-asyl.eternal-september.org>
References: <11bes8b$1gncr$1@dont-email.me>
 <11ek7b2$j8f6$1@raubtier-asyl.eternal-september.org>
 <11ekfu0$mq5n$4@dont-email.me>
 <11ekg71$n5p7$1@raubtier-asyl.eternal-september.org>
 <11ekgf8$mq5n$8@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 30 Nov 2026 19:47:38 +0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org;
	logging-data="842129"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+1OIcwuCNa8cgYIAV3b1O/A7WofwUWBng="; posting-host="74af7535fe23a1fc2eebd3fb26edb9d1"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:UQQSTnyeD5875g2N7s3moCQgoQU= sha256:A0f1qF1XZudP6puLwgVqPKehaoVCsGsSMAWEWeddJBo=
	sha1:rJX6EsAIJW5KlkHi0sslVq3HS9M= sha256:ZvMl+vNsSi9TvrEhZzVth0XxTMyTJWuHx2Yi4ktdXD4=
In-Reply-To: <11ekgf8$mq5n$8@dont-email.me>
Content-Language: de-DE