220 4399 <519198C9.6060005@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Reverend Chip <rev.chip@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Rescuing "using namespace std": "using static namespace"
Date: Mon, 13 May 2013 18:52:09 -0700
Lines: 28
Approved: news@gmane.org
Message-ID: <519198C9.6060005@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1368496340 28941 80.91.229.3 (14 May 2013 01:52:20 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 14 May 2013 01:52:20 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCVIJ4NMUIKRBTFRY2GAKGQEG2FHQOA@isocpp.org Tue May 14 03:52:19 2013
Return-path: <std-proposals+bncBCVIJ4NMUIKRBTFRY2GAKGQEG2FHQOA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f197.google.com ([209.85.223.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCVIJ4NMUIKRBTFRY2GAKGQEG2FHQOA@isocpp.org>)
	id 1Uc4PW-0000F1-0o
	for gclcip-std-proposals@m.gmane.org; Tue, 14 May 2013 03:52:14 +0200
Original-Received: by mail-ie0-f197.google.com with SMTP id 16sf25655119iea.0
        for <gclcip-std-proposals@m.gmane.org>; Mon, 13 May 2013 18:52:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:received-spf:x-received
         :message-id:date:from:user-agent:mime-version:to:subject
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-google-group-id:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=ykfUf+qAAx8cycocgZHZyzCzb6Z+oVR7CO3NDmLpC/A=;
        b=RNDm/BO5PT3AzCkpH8/NmpiDatNVAv1DD5DClSOUUeUhy9ToPus7Zl90GbGPs2vr/w
         /gxxRzKhcEqtCYFi6AzQUnNyLb3dDQLzgvZR/W4XYboL2gX09WNd/fu4htbqhash1oFY
         9SY/cg7WKSaCzsLDpHfODJrzOLbVY2ig0Gw96SW117+daXleDqJTTla+MrCOt245PHPR
         Mrc+XV2uLS8ZkYEUphJVNeH20B0Ftv8ABPPIElLwWa5Ie4Ydbg9s3OiBi0bLDf00kEqh
         r/iEDoUyvAw+gEOd4e0UsmmTxwKDSjDpdc3WJ+zJywfgjOEMRLHXdsY328R1wOcOrFHj
         FIhA 
X-Received: by 10.42.79.200 with SMTP id s8mr21882360ick.0.1368496332879;
        Mon, 13 May 2013 18:52:12 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.107.105 with SMTP id hb9ls46113igb.27.gmail; Mon, 13 May
 2013 18:52:11 -0700 (PDT)
X-Received: by 10.68.101.226 with SMTP id fj2mr32006831pbb.6.1368496331482;
        Mon, 13 May 2013 18:52:11 -0700 (PDT)
Original-Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176])
        by mx.google.com with ESMTPS id av8si6529987pbd.9.2013.05.13.18.52.11
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 13 May 2013 18:52:11 -0700 (PDT)
Received-SPF: pass (google.com: domain of rev.chip@gmail.com designates 209.85.192.176 as permitted sender) client-ip=209.85.192.176;
Original-Received: by mail-pd0-f176.google.com with SMTP id x10so4847363pdj.21
        for <std-proposals@isocpp.org>; Mon, 13 May 2013 18:52:11 -0700 (PDT)
X-Received: by 10.68.209.232 with SMTP id mp8mr31453267pbc.44.1368496331319;
        Mon, 13 May 2013 18:52:11 -0700 (PDT)
Original-Received: from ?IPv6:2600:1010:b126:5c16:312b:f012:9aa6:8411? ([2600:1010:b126:5c16:312b:f012:9aa6:8411])
        by mx.google.com with ESMTPSA id qh4sm17070491pac.8.2013.05.13.18.52.10
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 13 May 2013 18:52:10 -0700 (PDT)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
X-Original-Sender: rev.chip@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of rev.chip@gmail.com designates 209.85.192.176 as permitted sender)
 smtp.mail=rev.chip@gmail.com;       dkim=pass header.i=@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4399
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4399>

I would like to add a minor feature to C++1y: "using static namespace". 
It would have exactly the semantics of "using namespace", except:

  (1) It would be non-transitive; it would point to the given namespace
for lookup purposes, but not copy the given namespace into the enclosing
namespace.

  (2) If the given namespace was involved in name lookup, then any
lookup that resulted in a set of names both in and out of the target
namespace would be a fatal error.  In other words, no ambiguity (actual
or potential) could result.

Given these limitations, it seems like an easy proposal to include, as
it is orthogonal with all other proposed changes.  We could go back to
writing "string" instead of "std::string" a thousand times a day.

What say?

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.



.
