Topic: Minor correction proposals to N1771


Author: dsp@bdal.de (=?ISO-8859-1?Q?Daniel_Kr=FCgler?=)
Date: Mon, 5 Sep 2005 06:22:56 GMT
Raw View
Hello,

I would like to add some correction proposals to the nice document N1771:

1) 20.2 contains two syntactically invalid function declarations due to
wrong position of "inline", namely

template <class T> T&& inline forward(typename identity<T>::type&&
t)      {return t;}
template <class T> typename remove_reference<T>::type&& inline move(T&& t=
)
{return t;}

which should be written as

template <class T> inline T&& forward(typename identity<T>::type&&
t)      {return t;}
template <class T> inline typename remove_reference<T>::type&& move(T&& t=
)
{return t;}

Similar some lines below. Replace:

template <class T>
      T& inline forward(typename identity<T>::type& t) {return t;}
template <class T>
      T& inline move(T& t) {return t;}
template <class T>
      const T& inline move(const T& t) {return t;}

by:

template <class T>
      inline T& forward(typename identity<T>::type& t) {return t;}
template <class T>
      inline T& move(T& t) {return t;}
template <class T>
      inline const T& move(const T& t) {return t;}

2) move_iterator: I propose to provide additional (are even better:
replacing) templated versions of all global functions (i.e. all
comparing functions and operator-()). This would properly match the
proposed resolution of

http://www2.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#280

Greetings from Bremen,

Daniel Kr=FCgler

---
[ 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.jamesd.demon.co.uk/csc/faq.html                       ]





Author: hinnant@metrowerks.com (Howard Hinnant)
Date: Mon, 5 Sep 2005 21:43:17 GMT
Raw View
In article <431be2c1$0$7306$4d4ebb8e@businessnews.de.uu.net>,
 dsp@bdal.de (Daniel Kr=FCgler) wrote:

> Hello,
>=20
> I would like to add some correction proposals to the nice document N177=
1:
>=20
> 1) 20.2 contains two syntactically invalid function declarations due to
> wrong position of "inline", namely
>=20
> template <class T> T&& inline forward(typename identity<T>::type&&
> t)      {return t;}
> template <class T> typename remove reference<T>::type&& inline move(T&&=
 t)
> {return t;}
>=20
> which should be written as
>=20
> template <class T> inline T&& forward(typename identity<T>::type&&
> t)      {return t;}
> template <class T> inline typename remove reference<T>::type&& move(T&&=
 t)
> {return t;}
>=20
> Similar some lines below. Replace:
>=20
> template <class T>
>       T& inline forward(typename identity<T>::type& t) {return t;}
> template <class T>
>       T& inline move(T& t) {return t;}
> template <class T>
>       const T& inline move(const T& t) {return t;}
>=20
> by:
>=20
> template <class T>
>       inline T& forward(typename identity<T>::type& t) {return t;}
> template <class T>
>       inline T& move(T& t) {return t;}
> template <class T>
>       inline const T& move(const T& t) {return t;}

<blush>  Remind me to ask you to review the next paper I'm an author of=20
_before_ I submit it! :-)

> 2) move iterator: I propose to provide additional (are even better:
> replacing) templated versions of all global functions (i.e. all
> comparing functions and operator-()). This would properly match the
> proposed resolution of
>=20
> http://www2.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#280

<nod> How's this:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1859.html#24.4.3
.2.5%20-%20move_iterator%20comparison

Thanks,
Howard

---
[ 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.jamesd.demon.co.uk/csc/faq.html                       ]





Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <dsp@bdal.de>
Date: Tue, 6 Sep 2005 08:49:40 CST
Raw View
Howard Hinnant wrote:
> <blush>  Remind me to ask you to review the next paper I'm an author of
> _before_ I submit it! :-)

No reason to blush! If I haven't stumbled about this myself some months
ago I probably wouldn't have seen it ;-))


>>2) move iterator: I propose to provide additional (are even better:
>>replacing) templated versions of all global functions (i.e. all
>>comparing functions and operator-()). This would properly match the
>>proposed resolution of
>>
>>http://www2.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#280
>
>
> <nod> How's this:
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1859.html#24.4.3
> .2.5%20-%20move_iterator%20comparison

Oh yes, that's fine!

Greetings,

Daniel

---
[ 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.jamesd.demon.co.uk/csc/faq.html                       ]