From 15134259788174644 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,51be5305f0d11752 X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 2001-02-26 15:02:02 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail From: "Greg Brewer" Newsgroups: comp.std.c++ Subject: Re: Proposal: change to condition ? value1 : value2 Date: Mon, 26 Feb 2001 22:58:56 GMT Organization: Houston Area League of PC Users, Inc. Approved: Fergus Henderson , moderator of comp.std.c++ Message-ID: <976feu$nk$1@news.hal-pc.org> References: <973sk5$2c06$1@news.hal-pc.org> <9742oh$lgd$1@news-int.gatech.edu> X-Trace: mail2news.demon.co.uk 983228340 mail2news:27438 mail2news mail2news.demon.co.uk X-Complaints-To: abuse@demon.net X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Lines: 18 Xref: supernews.google.com comp.std.c++:3779 > Does something like this suffice? > > template > T ifElseDefault( T value, T def) { > return value ? value : def ; > } > > const char *comma = ifElseDefault( strchr(input, ','), ""); No. --- [ comp.std.c++ is moderated. To submit articles, try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.research.att.com/~austern/csc/faq.html ] [ Note that the FAQ URL has changed! Please update your bookmarks. ]