From 498137413920804837 X-Google-Thread: 109fba,4a997c219a86e9e9 X-Google-Thread: f78e5,4a997c219a86e9e9 X-Google-Attributes: gid109fba,gidf78e5,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull From: ricecake@gehennom.invalid (Marcus Kwok) Newsgroups: comp.lang.c++,comp.std.c++ Subject: Re: Boost algorithm ll::accumulate question Date: Mon, 29 Jan 2007 21:00:43 GMT Organization: The Letsgit Highway Lines: 29 Sender: mail2news@demon.net Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++) Message-ID: References: <1169906041.610594.260620@k78g2000cwa.googlegroups.com> NNTP-Posting-Host: news.news.demon.net X-Trace: news.demon.co.uk 1170104448 1425 158.152.254.254 (29 Jan 2007 21:00:48 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Mon, 29 Jan 2007 21:00:48 +0000 (UTC) X-Original-To: std-c++@mailman.ucar.edu X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-User-Agent: tin/1.9.2-20061021 ("Benmore") (UNIX) (Linux/2.6.17-2-k7 (i686)) X-Virus-Scanned: amavisd-new at csse.unimelb.edu.au X-Received: (from fjh@localhost) by mulga.csse.unimelb.edu.au (8.13.8+Sun/8.13.8/Submit) id l0TL0hOi011514; Tue, 30 Jan 2007 08:00:43 +1100 (EST) X-Path: comp-std-cpp-robomod!not-for-mail X-NNTP-Posting-Date: Mon, 29 Jan 2007 18:31:55 +0000 (UTC) X-Delivered-To: std-c++@mailman.ucar.edu X-Authentication-Warning: mulga.csse.unimelb.edu.au: fjh set sender to devnull@stump.algebra.com using -f X-Newsgroups: comp.lang.c++,comp.std.c++ Xref: g2news2.google.com comp.lang.c++:76393 comp.std.c++:5488 In comp.lang.c++ Henrique A. Menarin wrote: > I want to create a function _and so that I could write > > vector asserts; > //... > bool b = _and(asserts); > > and it "anded" all the elements in the vector. It sounds like you got the solution to your problem, but be aware that you should avoid names that start with an underscore ("_and"). Certain names that begin with an underscore are reserved for the implementation, and using them makes the behavior of your program undefined. There are exceptions to this rule (I think maybe using them as a member of a class is OK, as long as it doesn't start with an underscore followed by a capital letter, or contain a double-underscore anywhere in the name...), but I find these rules hard to remember, so I just don't ever use them at the beginning of names. -- Marcus Kwok Replace 'invalid' with 'net' to reply --- [ 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.comeaucomputing.com/csc/faq.html ]