Topic: N3854 - Variable Templates For Type Traits and Concept-Lite
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sun, 26 Jan 2014 08:08:59 +0100
Raw View
This is a multi-part message in MIME format.
--------------030907030105010203070003
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi,
In
https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/QOYLLJjH98k
I posted a similar proposal.
Most of the proposed variable templates could be considered as Concepts
Lite constraints. Have you considered to use CamelCase instead of the
suffix _v?
Instead of
template <class T, class... Args> constexpr bool is_constructible_v
= is_constructible<T, Args...>::value;
include
template <class T, class... Args> constexpr bool Constructible
= is_constructible<T, Args...>::value;
In this way we could
template< CopyConstructible T > bool f( T v );
Best,
Vicente
--
---
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/.
--------------030907030105010203070003
Content-Type: text/html; charset=ISO-8859-1
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
In
<a class="moz-txt-link-freetext" href="https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/QOYLLJjH98k">https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/QOYLLJjH98k</a>
I posted a similar proposal. <br>
<br>
Most of the proposed variable templates could be considered as
Concepts Lite constraints. Have you considered to use CamelCase
instead of the suffix _v?<br>
<br>
Instead of<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre>template <class T, class... Args> constexpr bool is_constructible_v
= is_constructible<T, Args...>::value;</pre>
<br>
include<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre>template <class T, class... Args> constexpr bool Constructible
= is_constructible<T, Args...>::value;</pre>
<br>
In this way we could <br>
<pre><tt><big><big><small><font style="font-size: 8pt" size="1"><big>template< CopyConstructible T ></big></font><font style="font-size: 8pt" size="1"><big> bool f( T v );</big></font>
Best,
Vicente </small>
</big></big></tt></pre>
<title></title>
<meta name="GENERATOR" content="OpenOffice.org 3.3 (Unix)">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
</style>
</body>
</html>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br />
--------------030907030105010203070003--
.
Author: Bengt Gustafsson <bengt.gustafsson@beamways.com>
Date: Sun, 2 Feb 2014 20:44:48 -0800 (PST)
Raw View
------=_Part_3778_2133158.1391402688775
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Isn't that already made next to impossible by the new usings for the=20
corresponding type_traits yielding a type, such as std::add_const_t?=20
This sets the example, although to me it is really backwards to have to=20
select between the ugly add_const_t and the worse add_const::type. After=20
all template using and type_traits were introduced in the same standard=20
version...
This deed done, I guess the only way out is to work on a proposal for=20
library versioning so that you can select which version of the library you=
=20
want to use. That's however something completely different.
Den s=C3=B6ndagen den 26:e januari 2014 kl. 08:08:59 UTC+1 skrev Vicente J.=
=20
Botet Escriba:
>
> Hi,
>
> In=20
> https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/QOYLLJ=
jH98kI posted a similar proposal.=20
>
> Most of the proposed variable templates could be considered as Concepts=
=20
> Lite constraints. Have you considered to use CamelCase instead of the=20
> suffix _v?
>
> Instead of
>
> template <class T, class... Args> constexpr bool is_constructible_v
> =3D is_constructible<T, Args...>::value;
>
>
> include
>
> template <class T, class... Args> constexpr bool Constructible
> =3D is_constructible<T, Args...>::value;
>
>
> In this way we could=20
>
> template< CopyConstructible T > bool f( T v );
>
> Best,
> Vicente=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 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_3778_2133158.1391402688775
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Isn't that already made next to impossible by the new usin=
gs for the corresponding type_traits yielding a type, such as std::add_cons=
t_t? <div><br></div><div>This sets the example, although to me it is r=
eally backwards to have to select between the ugly add_const_t and the wors=
e add_const::type. After all template using and type_traits were introduced=
in the same standard version...</div><div><br></div><div>This deed done, I=
guess the only way out is to work on a proposal for library versioning so =
that you can select which version of the library you want to use. That's ho=
wever something completely different.</div><div><br><br>Den s=C3=B6ndagen d=
en 26:e januari 2014 kl. 08:08:59 UTC+1 skrev Vicente J. Botet Escriba:<blo=
ckquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-=
left: 1px #ccc solid;padding-left: 1ex;">
=20
=20
=20
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
Hi,<br>
<br>
In
<a href=3D"https://groups.google.com/a/isocpp.org/forum/#!topic/std-pro=
posals/QOYLLJjH98k" target=3D"_blank" onmousedown=3D"this.href=3D'https://g=
roups.google.com/a/isocpp.org/forum/#!topic/std-proposals/QOYLLJjH98k';retu=
rn true;" onclick=3D"this.href=3D'https://groups.google.com/a/isocpp.org/fo=
rum/#!topic/std-proposals/QOYLLJjH98k';return true;">https://groups.google.=
com/a/<wbr>isocpp.org/forum/#!topic/std-<wbr>proposals/QOYLLJjH98k</a>
I posted a similar proposal. <br>
<br>
Most of the proposed variable templates could be considered as
Concepts Lite constraints. Have you considered to use CamelCase
instead of the suffix _v?<br>
<br>
Instead of<br>
<br>
=20
<pre>template <class T, class... Args> constexpr bool is_construc=
tible_v
=3D is_constructible<T, Args...>::value;</pre>
<br>
include<br>
<br>
=20
<pre>template <class T, class... Args> constexpr bool Constructib=
le
=3D is_constructible<T, Args...>::value;</pre>
<br>
In this way we could <br>
<pre><tt><big><big><small><font style=3D"font-size:8pt" size=3D"1"><big=
>template< CopyConstructible T ></big></font><font style=3D"font-size=
:8pt" size=3D"1"><big> bool f( T v );</big></font>
Best,
Vicente </small>
</big></big></tt></pre>
=20
=20
=20
</div>
</blockquote></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" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<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_3778_2133158.1391402688775--
.