Topic: Obtaining the number of arguments of a function


Author: NDos Dannyu <ndospark320@naver.com>
Date: Sun, 23 Aug 2015 01:03:57 -0700 (PDT)
Raw View
------=_Part_490_24826131.1440317037667
Content-Type: multipart/alternative;
 boundary="----=_Part_491_1281651848.1440317037668"

------=_Part_491_1281651848.1440317037668
Content-Type: text/plain; charset=UTF-8

Why this function isn't in the stantard library? It's too easy to implement!
*template <class R, class ...Args>*
*constexpr size_t count_args(R (*)(Args...)) noexcept {*
*    return sizeof...(Args);*
*}*

--

---
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_491_1281651848.1440317037668
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Why this function isn&#39;t in the stantard library? =
It&#39;s too easy to implement!</div><div><strong>template &lt;class R, cla=
ss ...Args&gt;</strong></div><div><strong>constexpr size_t count_args(R (*)=
(Args...)) noexcept {</strong></div><div><strong>=C2=A0=C2=A0=C2=A0 return =
sizeof...(Args);</strong></div><div><strong>}</strong></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_491_1281651848.1440317037668--
------=_Part_490_24826131.1440317037667--

.


Author: David Krauss <potswa@gmail.com>
Date: Sun, 23 Aug 2015 16:33:58 +0800
Raw View
--Apple-Mail=_55489AA9-C2EC-4E58-B15A-5FB98C7E1DF0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9308=E2=80=9323, at 4:03 PM, NDos Dannyu <ndospark320@naver=
..com> wrote:
>=20
> Why this function isn't in the stantard library? It's too easy to impleme=
nt!

Is the standard library supposed to do everything that=E2=80=99s easy?

> template <class R, class ...Args>
> constexpr size_t count_args(R (*)(Args...)) noexcept {
>     return sizeof...(Args);
> }

This doesn=E2=80=99t handle member function signatures with cv-qualifiers o=
r ref-qualifiers. Separately, it doesn=E2=80=99t handle member functions (P=
TMFs). It doesn=E2=80=99t handle C-style varargs signatures, or Callable ob=
jects besides function pointers. It doesn=E2=80=99t tell you about default =
arguments.

This is not easy. I don=E2=80=99t see how it=E2=80=99s useful, either.

Usually it=E2=80=99s better to avoid trying to inspect function parameter t=
ypes. Use perfect forwarding instead, with expression SFINAE or std::result=
_of which also does SFINAE. Discrimination should happen at the call site. =
If you need to discriminate against a type before any object gets called, t=
hen fabricate a call in an appropriate context such as static_assert or SFI=
NAE.

--=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=_55489AA9-C2EC-4E58-B15A-5FB98C7E1DF0
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=9308=
=E2=80=9323, at 4:03 PM, NDos Dannyu &lt;<a href=3D"mailto:ndospark320@nave=
r.com" class=3D"">ndospark320@naver.com</a>&gt; wrote:</div><br class=3D"Ap=
ple-interchange-newline"><div class=3D""><div dir=3D"ltr" class=3D""><div c=
lass=3D"">Why this function isn't in the stantard library? It's too easy to=
 implement!</div></div></div></blockquote><div><br class=3D""></div><div>Is=
 the standard library supposed to do everything that=E2=80=99s easy?</div><=
br class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""><div dir=
=3D"ltr" class=3D""><div class=3D""><strong class=3D"">template &lt;class R=
, class ...Args&gt;</strong></div><div class=3D""><strong class=3D"">conste=
xpr size_t count_args(R (*)(Args...)) noexcept {</strong></div><div class=
=3D""><strong class=3D"">&nbsp;&nbsp;&nbsp; return sizeof...(Args);</strong=
></div><div class=3D""><strong class=3D"">}</strong></div></div></div></blo=
ckquote><br class=3D""></div><div>This doesn=E2=80=99t handle member functi=
on signatures with cv-qualifiers or ref-qualifiers. Separately, it doesn=E2=
=80=99t handle member functions (PTMFs). It doesn=E2=80=99t handle C-style =
varargs signatures, or Callable objects besides function pointers. It doesn=
=E2=80=99t tell you about default arguments.</div><div><br class=3D""></div=
><div>This is <i class=3D"">not</i>&nbsp;easy. I don=E2=80=99t see how it=
=E2=80=99s useful, either.</div><div><br class=3D""></div><div>Usually it=
=E2=80=99s better to avoid trying to inspect function parameter types. Use =
perfect forwarding instead, with expression SFINAE or <font face=3D"Courier=
" class=3D"">std::result_of</font>&nbsp;which also does SFINAE. Discriminat=
ion should happen at the call site. If you need to discriminate against a t=
ype before any object gets called, then fabricate a call in an appropriate =
context such as <font face=3D"Courier" class=3D"">static_assert</font> or S=
FINAE.</div><div><br class=3D""></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=_55489AA9-C2EC-4E58-B15A-5FB98C7E1DF0--

.


Author: Sean Middleditch <sean.middleditch@gmail.com>
Date: Tue, 25 Aug 2015 16:21:52 -0700 (PDT)
Raw View
------=_Part_1668_1981265978.1440544912905
Content-Type: multipart/alternative;
 boundary="----=_Part_1669_424219494.1440544912906"

------=_Part_1669_424219494.1440544912906
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Sunday, August 23, 2015 at 1:34:09 AM UTC-7, David Krauss wrote:
>
>
> On 2015=E2=80=9308=E2=80=9323, at 4:03 PM, NDos Dannyu <ndosp...@naver.co=
m <javascript:>>=20
> wrote:
>
> Why this function isn't in the stantard library? It's too easy to=20
> implement!
>
>
> Is the standard library supposed to do everything that=E2=80=99s easy?
>
> *template <class R, class ...Args>*
> *constexpr size_t count_args(R (*)(Args...)) noexcept {*
> *    return sizeof...(Args);*
> *}*
>
>
> This doesn=E2=80=99t handle member function signatures with cv-qualifiers=
 or=20
> ref-qualifiers. Separately, it doesn=E2=80=99t handle member functions (P=
TMFs). It=20
> doesn=E2=80=99t handle C-style varargs signatures, or Callable objects be=
sides=20
> function pointers. It doesn=E2=80=99t tell you about default arguments.
>
> This is *not* easy. I don=E2=80=99t see how it=E2=80=99s useful, either.
>

This is just one piece of boost function_traits=20
(http://www.boost.org/doc/libs/1_57_0/libs/type_traits/doc/html/boost_typet=
raits/reference/function_traits.html)=20
combined with the utility to convert various forms of function pointer into=
=20
the "function type" needed by function_traits=20
(e.g. https://functionalcpp.wordpress.com/2013/08/05/function-traits/)

Very useful for script binding and general runtime reflection systems,=20
among other things. Take a look at libraries like luabind or one of its=20
umpteen bazillion alternatives for examples of where it can be useful.

Suuuper common need in games at the very least, and I'm sure many other=20
places.

Would be nice to have function_traits in the standard.

--=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_1669_424219494.1440544912906
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Sunday, August 23, 2015 at 1:34:09 AM UTC-7, David Krauss wrote:<blockqu=
ote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left=
: 1px #ccc solid;padding-left: 1ex;"><div style=3D"word-wrap:break-word"><b=
r><div><blockquote type=3D"cite"><div>On 2015=E2=80=9308=E2=80=9323, at 4:0=
3 PM, NDos Dannyu &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfusca=
ted-mailto=3D"x3egsdlZBQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#3=
9;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#3=
9;;return true;">ndosp...@naver.com</a>&gt; wrote:</div><br><div><div dir=
=3D"ltr"><div>Why this function isn&#39;t in the stantard library? It&#39;s=
 too easy to implement!</div></div></div></blockquote><div><br></div><div>I=
s the standard library supposed to do everything that=E2=80=99s easy?</div>=
<br><blockquote type=3D"cite"><div><div dir=3D"ltr"><div><strong>template &=
lt;class R, class ...Args&gt;</strong></div><div><strong>constexpr size_t c=
ount_args(R (*)(Args...)) noexcept {</strong></div><div><strong>=C2=A0=C2=
=A0=C2=A0 return sizeof...(Args);</strong></div><div><strong>}</strong></di=
v></div></div></blockquote><br></div><div>This doesn=E2=80=99t handle membe=
r function signatures with cv-qualifiers or ref-qualifiers. Separately, it =
doesn=E2=80=99t handle member functions (PTMFs). It doesn=E2=80=99t handle =
C-style varargs signatures, or Callable objects besides function pointers. =
It doesn=E2=80=99t tell you about default arguments.</div><div><br></div><d=
iv>This is <i>not</i>=C2=A0easy. I don=E2=80=99t see how it=E2=80=99s usefu=
l, either.</div></div></blockquote><div><br></div><div>This is just one pie=
ce of boost function_traits (http://www.boost.org/doc/libs/1_57_0/libs/type=
_traits/doc/html/boost_typetraits/reference/function_traits.html) combined =
with the utility to convert various forms of function pointer into the &quo=
t;function type&quot; needed by function_traits (e.g.=C2=A0https://function=
alcpp.wordpress.com/2013/08/05/function-traits/)</div><div><br></div><div>V=
ery useful for script binding and general runtime reflection systems, among=
 other things. Take a look at libraries like luabind or one of its umpteen =
bazillion alternatives for examples of where it can be useful.</div><div><b=
r></div><div>Suuuper common need in games at the very least, and I&#39;m su=
re many other places.<br></div><div><br></div><div>Would be nice to have fu=
nction_traits in the standard.</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_1669_424219494.1440544912906--
------=_Part_1668_1981265978.1440544912905--

.


Author: David Krauss <potswa@gmail.com>
Date: Wed, 26 Aug 2015 07:49:24 +0800
Raw View
--Apple-Mail=_68552155-0FEC-4B5C-B48F-CCCBA3FD05F5
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2015=E2=80=9308=E2=80=9326, at 7:21 AM, Sean Middleditch <sean.middled=
itch@gmail.com> wrote:
>=20
> This is just one piece of boost function_traits (http://www.boost.org/doc=
/libs/1_57_0/libs/type_traits/doc/html/boost_typetraits/reference/function_=
traits.html) combined with the utility to convert various forms of function=
 pointer into the "function type" needed by function_traits (e.g. https://f=
unctionalcpp.wordpress.com/2013/08/05/function-traits/)
>=20
> Very useful for script binding and general runtime reflection systems, am=
ong other things. Take a look at libraries like luabind or one of its umpte=
en bazillion alternatives for examples of where it can be useful.
>=20
> Suuuper common need in games at the very least, and I'm sure many other p=
laces.
>=20
> Would be nice to have function_traits in the standard.

The standard should be self-consistent. All the features should support the=
 other features.

If you=E2=80=99re only interested in function signature types of the form R=
et(Arg1, <=E2=80=A6>, ArgN), then as the blog post says, the signatures eas=
ily map to and from tuples. Perhaps there should be a facility for doing th=
at mapping. But it shouldn=E2=80=99t be called function_traits because such=
 a name would suggest much broader functionality.

--=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=_68552155-0FEC-4B5C-B48F-CCCBA3FD05F5
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=9308=
=E2=80=9326, at 7:21 AM, Sean Middleditch &lt;<a href=3D"mailto:sean.middle=
ditch@gmail.com" class=3D"">sean.middleditch@gmail.com</a>&gt; wrote:</div>=
<br class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">Thi=
s is just one piece of boost function_traits (<a href=3D"http://www.boost.o=
rg/doc/libs/1_57_0/libs/type_traits/doc/html/boost_typetraits/reference/fun=
ction_traits.html" class=3D"">http://www.boost.org/doc/libs/1_57_0/libs/typ=
e_traits/doc/html/boost_typetraits/reference/function_traits.html</a>) comb=
ined with the utility to convert various forms of function pointer into the=
 "function type" needed by function_traits (e.g.&nbsp;<a href=3D"https://fu=
nctionalcpp.wordpress.com/2013/08/05/function-traits/" class=3D"">https://f=
unctionalcpp.wordpress.com/2013/08/05/function-traits/</a>)</div><div class=
=3D""><br class=3D""></div><div class=3D"">Very useful for script binding a=
nd general runtime reflection systems, among other things. Take a look at l=
ibraries like luabind or one of its umpteen bazillion alternatives for exam=
ples of where it can be useful.</div><div class=3D""><br class=3D""></div><=
div class=3D"">Suuuper common need in games at the very least, and I'm sure=
 many other places.<br class=3D""></div><div class=3D""><br class=3D""></di=
v><div class=3D"">Would be nice to have function_traits in the standard.</d=
iv></div></blockquote><br class=3D""></div><div>The standard should be self=
-consistent. All the features should support the other features.</div><div>=
<br class=3D""></div><div>If you=E2=80=99re only interested in function sig=
nature types of the form <font face=3D"Courier" class=3D"">Ret(Arg1, &lt;=
=E2=80=A6&gt;, ArgN)</font>, then as the blog post says, the signatures eas=
ily map to and from tuples. Perhaps there should be a facility for doing th=
at mapping. But it shouldn=E2=80=99t be called <font face=3D"Courier" class=
=3D"">function_traits</font> because such a name would suggest much broader=
 functionality.</div><div><br class=3D""></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=_68552155-0FEC-4B5C-B48F-CCCBA3FD05F5--

.


Author: Sean Middleditch <sean@middleditch.us>
Date: Tue, 25 Aug 2015 18:06:53 -0700
Raw View
--001a113ec2f2657d90051e2c77f4
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

So let's get that functionality.

Yes, it would be hard. That's why it should be in the standard rather than
something every user has to reimplement, IMO. :)
On Aug 25, 2015 4:49 PM, "David Krauss" <potswa@gmail.com> wrote:

>
> On 2015=E2=80=9308=E2=80=9326, at 7:21 AM, Sean Middleditch <sean.middled=
itch@gmail.com>
> wrote:
>
> This is just one piece of boost function_traits (
> http://www.boost.org/doc/libs/1_57_0/libs/type_traits/doc/html/boost_type=
traits/reference/function_traits.html)
> combined with the utility to convert various forms of function pointer in=
to
> the "function type" needed by function_traits (e.g.
> https://functionalcpp.wordpress.com/2013/08/05/function-traits/)
>
> Very useful for script binding and general runtime reflection systems,
> among other things. Take a look at libraries like luabind or one of its
> umpteen bazillion alternatives for examples of where it can be useful.
>
> Suuuper common need in games at the very least, and I'm sure many other
> places.
>
> Would be nice to have function_traits in the standard.
>
>
> The standard should be self-consistent. All the features should support
> the other features.
>
> If you=E2=80=99re only interested in function signature types of the form=
 Ret(Arg1,
> <=E2=80=A6>, ArgN), then as the blog post says, the signatures easily map=
 to and
> from tuples. Perhaps there should be a facility for doing that mapping. B=
ut
> it shouldn=E2=80=99t be called function_traits because such a name would =
suggest
> much broader functionality.
>
> --
>
> ---
> 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/109YssGCxWw/=
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

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

--001a113ec2f2657d90051e2c77f4
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">So let&#39;s get that functionality.</p>
<p dir=3D"ltr">Yes, it would be hard. That&#39;s why it should be in the st=
andard rather than something every user has to reimplement, IMO. :)</p>
<div class=3D"gmail_quote">On Aug 25, 2015 4:49 PM, &quot;David Krauss&quot=
; &lt;<a href=3D"mailto:potswa@gmail.com">potswa@gmail.com</a>&gt; wrote:<b=
r type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style=3D"word-wr=
ap:break-word"><br><div><blockquote type=3D"cite"><div>On 2015=E2=80=9308=
=E2=80=9326, at 7:21 AM, Sean Middleditch &lt;<a href=3D"mailto:sean.middle=
ditch@gmail.com" target=3D"_blank">sean.middleditch@gmail.com</a>&gt; wrote=
:</div><br><div><div>This is just one piece of boost function_traits (<a hr=
ef=3D"http://www.boost.org/doc/libs/1_57_0/libs/type_traits/doc/html/boost_=
typetraits/reference/function_traits.html" target=3D"_blank">http://www.boo=
st.org/doc/libs/1_57_0/libs/type_traits/doc/html/boost_typetraits/reference=
/function_traits.html</a>) combined with the utility to convert various for=
ms of function pointer into the &quot;function type&quot; needed by functio=
n_traits (e.g.=C2=A0<a href=3D"https://functionalcpp.wordpress.com/2013/08/=
05/function-traits/" target=3D"_blank">https://functionalcpp.wordpress.com/=
2013/08/05/function-traits/</a>)</div><div><br></div><div>Very useful for s=
cript binding and general runtime reflection systems, among other things. T=
ake a look at libraries like luabind or one of its umpteen bazillion altern=
atives for examples of where it can be useful.</div><div><br></div><div>Suu=
uper common need in games at the very least, and I&#39;m sure many other pl=
aces.<br></div><div><br></div><div>Would be nice to have function_traits in=
 the standard.</div></div></blockquote><br></div><div>The standard should b=
e self-consistent. All the features should support the other features.</div=
><div><br></div><div>If you=E2=80=99re only interested in function signatur=
e types of the form <font face=3D"Courier">Ret(Arg1, &lt;=E2=80=A6&gt;, Arg=
N)</font>, then as the blog post says, the signatures easily map to and fro=
m tuples. Perhaps there should be a facility for doing that mapping. But it=
 shouldn=E2=80=99t be called <font face=3D"Courier">function_traits</font> =
because such a name would suggest much broader functionality.</div><div><br=
></div></div>

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/109YssGCxWw/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/109YssGCxWw=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_blank">std-prop=
osals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</blockquote></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 />

--001a113ec2f2657d90051e2c77f4--

.


Author: David Krauss <potswa@gmail.com>
Date: Wed, 26 Aug 2015 09:17:51 +0800
Raw View
--Apple-Mail=_77CF9202-C3C0-4A99-877E-1AF29B8E2029
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8

Who wants the hard functionality? You only gave easy examples. It would be =
wasted effort, and it would lead users astray.

When generality is needed, stick to forwarding wrappers and std::function. =
I=E2=80=99ve implemented <https://github.com/potswa/cxx_function> some impr=
ovements to the latter and I=E2=80=99m writing up the proposals now.


> On 2015=E2=80=9308=E2=80=9326, at 9:06 AM, Sean Middleditch <sean@middled=
itch.us> wrote:
>=20
> So let's get that functionality.
>=20
> Yes, it would be hard. That's why it should be in the standard rather tha=
n something every user has to reimplement, IMO. :)
>=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/.

--Apple-Mail=_77CF9202-C3C0-4A99-877E-1AF29B8E2029
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""><div class=3D"">Wh=
o wants the hard functionality? You only gave easy examples. It would be wa=
sted effort, and it would lead users astray.</div><div class=3D""><br class=
=3D""></div><div class=3D"">When generality is needed, stick to forwarding =
wrappers and <font face=3D"Courier" class=3D"">std::function</font>. I=E2=
=80=99ve&nbsp;<a href=3D"https://github.com/potswa/cxx_function" class=3D""=
>implemented</a>&nbsp;some improvements to the latter and I=E2=80=99m writi=
ng up the proposals now.</div><div class=3D""><br class=3D""></div><br clas=
s=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">On 2015=E2=
=80=9308=E2=80=9326, at 9:06 AM, Sean Middleditch &lt;<a href=3D"mailto:sea=
n@middleditch.us" class=3D"">sean@middleditch.us</a>&gt; wrote:</div><br cl=
ass=3D"Apple-interchange-newline"><div class=3D""><p dir=3D"ltr" class=3D""=
>So let's get that functionality.</p><p dir=3D"ltr" class=3D"">Yes, it woul=
d be hard. That's why it should be in the standard rather than something ev=
ery user has to reimplement, IMO. :)</p>
</div></blockquote></div><br class=3D""></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=_77CF9202-C3C0-4A99-877E-1AF29B8E2029--

.