From -9172107414077589035 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,47ad86575b18887f,start X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 2001-07-17 15:38:00 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!212.74.64.35!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail From: "Paul Mensonides" Newsgroups: comp.std.c++ Subject: unnamed namespace quesion Date: Tue, 17 Jul 2001 22:37:26 GMT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Approved: Fergus Henderson , moderator of comp.std.c++ Message-ID: X-Trace: mail2news.demon.co.uk 995409450 mail2news:19863 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.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Date: Mon, 16 Jul 2001 15:55:37 PDT Lines: 33 Xref: archiver1.google.com comp.std.c++:6577 Is it legal to define a function outside of an unnamed namespace? namespace { void f(); } void f() { return; } If it isn't, it should be. Defining functions in a nested fashion is annoying, and it makes me (and possibly others) prefer 'static' functions: static void f() { return; } // rather than: namespace { void f() { return; } } Paul Mensonides --- [ 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 ]