Topic: namespace aliases syntax consistency


Author: Sean Middleditch <sean.middleditch@gmail.com>
Date: Sun, 4 Jan 2015 15:12:47 -0800 (PST)
Raw View
------=_Part_2530_2113419571.1420413167253
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

C++ and onward have made 'using' the way to define aliases for types, templ=
ates, and variables. Like 'auto', it keeps the shoes declaration on the lef=
t and the category of alias (when necessary) on the right.

Namespace aliases are not consistent with this. Declaring a namespace alias=
 uses the 'namespace' keyword on the left instead of 'using'.

This is one of those little inconstancies that trips me up whenever I run i=
nto it. I try to alias a namespace, get a compiler error, have a "doh!" mom=
ent, then fix it.


I think it might make sense to use 'using' for namespace aliases, too:

    // today
    namespace exp =3D std::experimental;

    // proposed
    using exp =3D namespace std::experimental;

In this case it's not an issue of terseness (proposed is more verbose y ove=
r keyword) but rather consistency and the principle of least surprise. I'm =
assuming that the 'namespace' keyword would still be required on the right =
to avoid ambiguities, but if not then it would also be slightly terser as a=
 very small bonus.

And as I'm somewhat sure that someone will mention namespace templates agai=
n, I'm not proposing those. This is just a small grammar addition for an ex=
isting feature, not a whole new language mechanism.

--=20

---=20
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 e=
mail 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-proposa=
ls/.

------=_Part_2530_2113419571.1420413167253--

.


Author: Jonathan <jonathanbcoe@gmail.com>
Date: Sun, 4 Jan 2015 23:57:41 +0000
Raw View
+1


> On 4 Jan 2015, at 23:12, Sean Middleditch <sean.middleditch@gmail.com> wr=
ote:
>=20
> C++ and onward have made 'using' the way to define aliases for types, tem=
plates, and variables. Like 'auto', it keeps the shoes declaration on the l=
eft and the category of alias (when necessary) on the right.
>=20
> Namespace aliases are not consistent with this. Declaring a namespace ali=
as uses the 'namespace' keyword on the left instead of 'using'.
>=20
> This is one of those little inconstancies that trips me up whenever I run=
 into it. I try to alias a namespace, get a compiler error, have a "doh!" m=
oment, then fix it.
>=20
>=20
> I think it might make sense to use 'using' for namespace aliases, too:
>=20
>    // today
>    namespace exp =3D std::experimental;
>=20
>    // proposed
>    using exp =3D namespace std::experimental;
>=20
> In this case it's not an issue of terseness (proposed is more verbose y o=
ver keyword) but rather consistency and the principle of least surprise. I'=
m assuming that the 'namespace' keyword would still be required on the righ=
t to avoid ambiguities, but if not then it would also be slightly terser as=
 a very small bonus.
>=20
> And as I'm somewhat sure that someone will mention namespace templates ag=
ain, I'm not proposing those. This is just a small grammar addition for an =
existing feature, not a whole new language mechanism.
>=20
> --=20
>=20
> ---=20
> 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-propo=
sals/.

--=20

---=20
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 e=
mail 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-proposa=
ls/.

.


Author: Gabriel Dos Reis <gdr@axiomatics.org>
Date: Wed, 07 Jan 2015 06:31:35 -0800
Raw View
Sean Middleditch <sean.middleditch@gmail.com> writes:

| C++ and onward have made 'using' the way to define aliases for types,
| templates, and variables. Like 'auto', it keeps the shoes declaration
| on the left and the category of alias (when necessary) on the right.
|
| Namespace aliases are not consistent with this. Declaring a namespace
| alias uses the 'namespace' keyword on the left instead of 'using'.
|
| This is one of those little inconstancies that trips me up whenever I
| run into it. I try to alias a namespace, get a compiler error, have a
| "doh!" moment, then fix it.
|
|
| I think it might make sense to use 'using' for namespace aliases, too:
|
|     // today
|     namespace exp = std::experimental;
|
|     // proposed
|     using exp = namespace std::experimental;

That is a bit too verbose; why not
      using expr = std::experimental;
?

:-)

There is no possible ambiguity as to what that can possibly mean.
See section 2 (in particular section 2.2) of
  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1489.pdf

-- Gaby




|
| In this case it's not an issue of terseness (proposed is more verbose
| y over keyword) but rather consistency and the principle of least
| surprise. I'm assuming that the 'namespace' keyword would still be
| required on the right to avoid ambiguities, but if not then it would
| also be slightly terser as a very small bonus.
|
| And as I'm somewhat sure that someone will mention namespace templates
| again, I'm not proposing those. This is just a small grammar addition
| for an existing feature, not a whole new language mechanism.
|
| --
|
| ---
| 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/.

--

---
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/.

.


Author: Sean Middleditch <sean.middleditch@gmail.com>
Date: Wed, 7 Jan 2015 14:05:26 -0800 (PST)
Raw View
------=_Part_808_904132900.1420668326102
Content-Type: multipart/alternative;
 boundary="----=_Part_809_167364128.1420668326102"

------=_Part_809_167364128.1420668326102
Content-Type: text/plain; charset=UTF-8

On Wednesday, January 7, 2015 6:31:37 AM UTC-8, Gabriel Dos Reis wrote:
>
> Sean Middleditch <sean.mid...@gmail.com <javascript:>> writes:
> | I think it might make sense to use 'using' for namespace aliases, too:
> |
> |     // today
> |     namespace exp = std::experimental;
> |
> |     // proposed
> |     using exp = namespace std::experimental;
>
> That is a bit too verbose; why not
>       using expr = std::experimental;
> ?
>
> :-)
>
> There is no possible ambiguity as to what that can possibly mean.
> See section 2 (in particular section 2.2) of
>   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1489.pdf


I had no idea the namespace `using` alias was already proposed. Any
particular reason it didn't make it into the language in the last 12 years
(or is it there but just not in my compiler) ?

--

---
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/.

------=_Part_809_167364128.1420668326102
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, January 7, 2015 6:31:37 AM UTC-8, Gabriel Do=
s Reis wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-le=
ft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Sean Middleditch =
&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"BBEP=
aPvoxoUJ" onmousedown=3D"this.href=3D'javascript:';return true;" onclick=3D=
"this.href=3D'javascript:';return true;">sean.mid...@gmail.com</a>&gt; writ=
es:
<br>| I think it might make sense to use 'using' for namespace aliases, too=
:
<br>|=20
<br>| &nbsp; &nbsp; // today
<br>| &nbsp; &nbsp; namespace exp =3D std::experimental;
<br>|=20
<br>| &nbsp; &nbsp; // proposed
<br>| &nbsp; &nbsp; using exp =3D namespace std::experimental;
<br>
<br>That is a bit too verbose; why not
<br>&nbsp; &nbsp; &nbsp; using expr =3D std::experimental;
<br>?
<br>
<br>:-)
<br>
<br>There is no possible ambiguity as to what that can possibly mean.
<br>See section 2 (in particular section 2.2) of
<br>&nbsp; <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/20=
03/n1489.pdf" target=3D"_blank" onmousedown=3D"this.href=3D'http://www.goog=
le.com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2F=
papers%2F2003%2Fn1489.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNG6tD5uEl_d1Wha=
BLAjns3uCOfE9g';return true;" onclick=3D"this.href=3D'http://www.google.com=
/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers=
%2F2003%2Fn1489.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNG6tD5uEl_d1WhaBLAjns=
3uCOfE9g';return true;">http://www.open-std.org/jtc1/<wbr>sc22/wg21/docs/pa=
pers/2003/<wbr>n1489.pdf</a> </blockquote><div><br></div><div>I had no idea=
 the namespace `using` alias was already proposed. Any particular reason it=
 didn't make it into the language in the last 12 years (or is it there but =
just not in my compiler) ?</div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_809_167364128.1420668326102--
------=_Part_808_904132900.1420668326102--

.


Author: Zhihao Yuan <zy@miator.net>
Date: Wed, 7 Jan 2015 17:50:17 -0500
Raw View
On Wed, Jan 7, 2015 at 5:05 PM, Sean Middleditch
<sean.middleditch@gmail.com> wrote:
> On Wednesday, January 7, 2015 6:31:37 AM UTC-8, Gabriel Dos Reis wrote:
>>
>> Sean Middleditch <sean.mid...@gmail.com> writes:
>> | I think it might make sense to use 'using' for namespace aliases, too:
>> |
>> |     // today
>> |     namespace exp = std::experimental;
>> |
>> |     // proposed
>> |     using exp = namespace std::experimental;
>>
>> That is a bit too verbose; why not
>>       using expr = std::experimental;
>> ?
>>
>> :-)
>>
>> There is no possible ambiguity as to what that can possibly mean.
>> See section 2 (in particular section 2.2) of
>>   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1489.pdf
>
>
> I had no idea the namespace `using` alias was already proposed. Any
> particular reason it didn't make it into the language in the last 12 years
> (or is it there but just not in my compiler) ?
>

Thanks for referencing the original paper.  I'm also curious,
since I *always* writing code like

  using std::chrono;

, found that it does not compile, then try

  using chrono = std::chrono;

, found that it still does not compile.

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://bit.ly/blog4bsd

--

---
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/.

.


Author: David Krauss <potswa@gmail.com>
Date: Thu, 8 Jan 2015 09:34:39 +0800
Raw View
--Apple-Mail=_FCF877CD-DE02-49F8-927A-8CAE5EED8797
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9301=E2=80=9308, at 6:50 AM, Zhihao Yuan <zy@miator.net> wr=
ote:
>=20
>  using std::chrono;
>=20
> , found that it does not compile, then try
>=20
>  using chrono =3D std::chrono;
>=20
> , found that it still does not compile.

I=E2=80=99m surprised to learn just now that namespace chrono =3D std::chro=
no; even works at block scope.

The using keyword would be way more appropriate.

--=20

---=20
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 e=
mail 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-proposa=
ls/.

--Apple-Mail=_FCF877CD-DE02-49F8-927A-8CAE5EED8797
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=80=9301=
=E2=80=9308, at 6:50 AM, Zhihao Yuan &lt;<a href=3D"mailto:zy@miator.net" c=
lass=3D"">zy@miator.net</a>&gt; wrote:</div><br class=3D"Apple-interchange-=
newline"><div class=3D""><span style=3D"font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant: normal; font-weight: normal; letter=
-spacing: normal; line-height: normal; orphans: auto; text-align: start; te=
xt-indent: 0px; text-transform: none; white-space: normal; widows: auto; wo=
rd-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inli=
ne !important;" class=3D"">&nbsp;using std::chrono;</span><br style=3D"font=
-family: Helvetica; font-size: 12px; font-style: normal; font-variant: norm=
al; font-weight: normal; letter-spacing: normal; line-height: normal; orpha=
ns: auto; text-align: start; text-indent: 0px; text-transform: none; white-=
space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: =
0px;" class=3D""><br style=3D"font-family: Helvetica; font-size: 12px; font=
-style: normal; font-variant: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; orphans: auto; text-align: start; text-indent:=
 0px; text-transform: none; white-space: normal; widows: auto; word-spacing=
: 0px; -webkit-text-stroke-width: 0px;" class=3D""><span style=3D"font-fami=
ly: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; f=
ont-weight: normal; letter-spacing: normal; line-height: normal; orphans: a=
uto; text-align: start; text-indent: 0px; text-transform: none; white-space=
: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
float: none; display: inline !important;" class=3D"">, found that it does n=
ot compile, then try</span><br style=3D"font-family: Helvetica; font-size: =
12px; font-style: normal; font-variant: normal; font-weight: normal; letter=
-spacing: normal; line-height: normal; orphans: auto; text-align: start; te=
xt-indent: 0px; text-transform: none; white-space: normal; widows: auto; wo=
rd-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><br style=3D"f=
ont-family: Helvetica; font-size: 12px; font-style: normal; font-variant: n=
ormal; font-weight: normal; letter-spacing: normal; line-height: normal; or=
phans: auto; text-align: start; text-indent: 0px; text-transform: none; whi=
te-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-widt=
h: 0px;" class=3D""><span style=3D"font-family: Helvetica; font-size: 12px;=
 font-style: normal; font-variant: normal; font-weight: normal; letter-spac=
ing: normal; line-height: normal; orphans: auto; text-align: start; text-in=
dent: 0px; text-transform: none; white-space: normal; widows: auto; word-sp=
acing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !i=
mportant;" class=3D"">&nbsp;using chrono =3D std::chrono;</span><br style=
=3D"font-family: Helvetica; font-size: 12px; font-style: normal; font-varia=
nt: normal; font-weight: normal; letter-spacing: normal; line-height: norma=
l; orphans: auto; text-align: start; text-indent: 0px; text-transform: none=
; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke=
-width: 0px;" class=3D""><br style=3D"font-family: Helvetica; font-size: 12=
px; font-style: normal; font-variant: normal; font-weight: normal; letter-s=
pacing: normal; line-height: normal; orphans: auto; text-align: start; text=
-indent: 0px; text-transform: none; white-space: normal; widows: auto; word=
-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><span style=3D"f=
ont-family: Helvetica; font-size: 12px; font-style: normal; font-variant: n=
ormal; font-weight: normal; letter-spacing: normal; line-height: normal; or=
phans: auto; text-align: start; text-indent: 0px; text-transform: none; whi=
te-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-widt=
h: 0px; float: none; display: inline !important;" class=3D"">, found that i=
t still does not compile.</span><br style=3D"font-family: Helvetica; font-s=
ize: 12px; font-style: normal; font-variant: normal; font-weight: normal; l=
etter-spacing: normal; line-height: normal; orphans: auto; text-align: star=
t; text-indent: 0px; text-transform: none; white-space: normal; widows: aut=
o; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""></div></b=
lockquote></div><br class=3D""><div class=3D"">I=E2=80=99m surprised to lea=
rn just now that <font face=3D"Courier" class=3D"">namespace chrono =3D std=
::chrono;</font> even works at block scope.</div><div class=3D""><br class=
=3D""></div><div class=3D"">The <font face=3D"Courier" class=3D"">using</fo=
nt> keyword would be way more appropriate.</div></body></html>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--Apple-Mail=_FCF877CD-DE02-49F8-927A-8CAE5EED8797--

.


Author: Sean Middleditch <sean@middleditch.us>
Date: Wed, 7 Jan 2015 18:04:41 -0800
Raw View
If I write a short paper (and it might be some time before I can -
we're in crunch mode right now), is someone willing to champion it?
There's no way I can attend a meeting unless it's in the
Seattle/Bellevue area, and even then it'll depend heavily on when and
how crazy work is getting. And for something seemingly so simple,
would it be worth it to figure out the standard wording for the first
version of the paper?

On Wed, Jan 7, 2015 at 5:34 PM, David Krauss <potswa@gmail.com> wrote:
>
> On 2015=E2=80=9301=E2=80=9308, at 6:50 AM, Zhihao Yuan <zy@miator.net> wr=
ote:
>
>  using std::chrono;
>
> , found that it does not compile, then try
>
>  using chrono =3D std::chrono;
>
> , found that it still does not compile.
>
>
> I=E2=80=99m surprised to learn just now that namespace chrono =3D std::ch=
rono; even
> works at block scope.
>
> The using keyword would be way more appropriate.
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/xErw8Zwg2so/=
unsubscribe.
> To unsubscribe from this group and all its topics, 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/.



--=20
Sean Middleditch
http://seanmiddleditch.com

--=20

---=20
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 e=
mail 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-proposa=
ls/.

.


Author: Gabriel Dos Reis <gdr@axiomatics.org>
Date: Thu, 08 Jan 2015 06:28:16 -0800
Raw View
Sean Middleditch <sean.middleditch@gmail.com> writes:

| On Wednesday, January 7, 2015 6:31:37 AM UTC-8, Gabriel Dos Reis
| wrote:
|=20
|     Sean Middleditch <sean.mid...@gmail.com> writes:=20
|     | I think it might make sense to use 'using' for namespace
|     aliases, too:=20
|     |=20
|     | =C2=A0 =C2=A0 // today=20
|     | =C2=A0 =C2=A0 namespace exp =3D std::experimental;=20
|     |=20
|     | =C2=A0 =C2=A0 // proposed=20
|     | =C2=A0 =C2=A0 using exp =3D namespace std::experimental;=20
|    =20
|     That is a bit too verbose; why not=20
|     =C2=A0 =C2=A0 =C2=A0 using expr =3D std::experimental;=20
|     ?=20
|    =20
|     :-)=20
|    =20
|     There is no possible ambiguity as to what that can possibly mean.=20
|     See section 2 (in particular section 2.2) of=20
|     =C2=A0
|     http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1489.pdf=20
|=20
|=20
| I had no idea the namespace `using` alias was already proposed. Any
| particular reason it didn't make it into the language in the last 12
| years (or is it there but just not in my compiler) ?

Several factors including me getting a bit busy.  In the early 2000s, we
just got out of a self-imposed "bug fixing, no innovation" period to
stabilize C++98, leading to C++03.  We were just gearing up, and
attention was focused on things we could not do well in C++98.  I wanted
a uniform syntax to create aliases (including overload sets), but I had
to settle for template aliases.  Then, we got busy with concepts and
other stuff; the next thing you know we had C++11, then C++14.  Maybe
now is time to resuscitate the rest of the original proposal.

-- Gaby

--=20

---=20
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 e=
mail 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-proposa=
ls/.

.


Author: Gabriel Dos Reis <gdr@axiomatics.org>
Date: Thu, 08 Jan 2015 06:30:19 -0800
Raw View
David Krauss <potswa@gmail.com> writes:

|     On 2015=E2=80=9301=E2=80=9308, at 6:50 AM, Zhihao Yuan <zy@miator.net=
> wrote:
|=20
|    =20
|     =C2=A0using std::chrono;
|    =20
|     , found that it does not compile, then try
|    =20
|     =C2=A0using chrono =3D std::chrono;
|    =20
|     , found that it still does not compile.
|    =20
|=20
| I=E2=80=99m surprised to learn just now that namespace chrono =3D std::ch=
rono;
| even works at block scope.

Well, aliases are useful at local scope too.  It would have been both
surprising and disappointing if it didn't work.

| The using keyword would be way more appropriate.

-- Gaby

--=20

---=20
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 e=
mail 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-proposa=
ls/.

.