Topic: Make explicit-ness to be part of the signature


Author: Alexey Mamontov <caracrist@gmail.com>
Date: Mon, 22 Aug 2016 10:42:14 -0700 (PDT)
Raw View
------=_Part_619_933618432.1471887734313
Content-Type: multipart/alternative;
 boundary="----=_Part_620_116444098.1471887734314"

------=_Part_620_116444098.1471887734314
Content-Type: text/plain; charset=UTF-8

The problem:

The following will compile:

struct my_list

{

 typedef std::list<size_t> list_type;

 template<typename T1>

 inline my_list(T1 && p1) : m_pList(new list_type(std::forward<T1>(p1))) {}

 template<typename T1, typename T2>

 inline my_list(T1 && p1, T2 && p2) : m_pList(new list_type(std::forward<T1>(p1), std::forward<T2>(p2))) {}

 list_type * m_pList;

};

my_list factory()

{

 return (size_t)-1;

}



But it will unexpectedly call this constructor:

explicit std::list(size_type _Count)



I would like to write like this:

struct my_list

{

 typedef std::list<size_t> list_type;

 template<typename T1>

 explicit inline my_list(T1 && p1) : m_pList(new list_type({std::forward<T1>(p1)})) {}

 template<typename T1>

 inline my_list(T1 && p1) : m_pList(new list_type(std::forward<T1>(p1))) {}

 template<typename T1, typename T2>

 explicit inline my_list(T1 && p1, T2 && p2) : m_pList(new list_type({std::forward<T1>(p1), std::forward<T2>(p2)})) {}

 template<typename T1, typename T2>

 inline my_list(T1 && p1, T2 && p2) : m_pList(new list_type(std::forward<T1>(p1), std::forward<T2>(p2))) {}

 list_type * m_pList;

};

my_list factory()

{

 return (size_t)-1; // compile error

}



We found some dirty trick for constructors:

template<typename T>

struct TS

{

template<typename T1, typename T2, typename ...F>

explicit TS(T1 && v1, T2 && v2, F && ... v) : m_t(std::forward<T1>(v1),
std::forward<T2>(v2), std::forward<F>(v)...)

{

}

template<typename T1>

explicit TS(T1 && v1) :m_t(std::forward<T1>(v1))

{

}

template<typename T1, typename ...F>

TS(T1 && v1, F && ... v) : m_t({ std::forward<T1>(v1),
std::forward<F>(v)... })

{

}

T m_t;

};

But there is no thinkable solution for explicit type convert operators...

The solution:
Make explicitness to be part of the signature, so we would be able to
declare different constructors / cast operators with all other parameters
being the same. Leave the implicit as default.

--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/829625de-4404-4aeb-b2f7-779c01c7ddea%40isocpp.org.

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

<div dir=3D"ltr"><div>The problem:</div><div><br></div><div>The following w=
ill compile:</div><div><br></div><pre class=3D"c"><code><p><font color=3D"#=
0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consol=
as" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">struct<=
/font></font></font><font face=3D"Consolas" size=3D"2"><font face=3D"Consol=
as" size=3D"2"> my_list</font></font></p><font face=3D"Consolas" size=3D"2"=
><font face=3D"Consolas" size=3D"2">
<p>{</p>
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">typedef</font></font></font><font fac=
e=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> std::list&lt;=
size_t&gt; list_type;</font></font></p><font face=3D"Consolas" size=3D"2"><=
font face=3D"Consolas" size=3D"2">
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">template</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">&lt;</font></=
font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0=
000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2">typename</font></font></font><font face=3D"Consolas" size=3D"=
2"><font face=3D"Consolas" size=3D"2"> T1&gt;</font></font></p><font face=
=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">inline</font></font></font><font face=
=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> my_list(T1 &am=
p;&amp; p1) : m_pList(</font></font><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font co=
lor=3D"#0000ff" face=3D"Consolas" size=3D"2">new</font></font></font><font =
face=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> list_type(=
std::forward&lt;T1&gt;(p1))) {}</font></font></p><font face=3D"Consolas" si=
ze=3D"2"><font face=3D"Consolas" size=3D"2">

</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">template</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">&lt;</font></=
font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0=
000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2">typename</font></font></font><font face=3D"Consolas" size=3D"=
2"><font face=3D"Consolas" size=3D"2"> T1, </font></font><font color=3D"#00=
00ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas=
" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">typename<=
/font></font></font><font face=3D"Consolas" size=3D"2"><font face=3D"Consol=
as" size=3D"2"> T2&gt;</font></font></p><font face=3D"Consolas" size=3D"2">=
<font face=3D"Consolas" size=3D"2">
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">inline</font></font></font><font face=
=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> my_list(T1 &am=
p;&amp; p1, T2 &amp;&amp; p2) : m_pList(</font></font><font color=3D"#0000f=
f" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" s=
ize=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">new</font></=
font></font><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=
=3D"2"> list_type(std::forward&lt;T1&gt;(p1), std::forward&lt;T2&gt;(p2))) =
{}</font></font></p><font face=3D"Consolas" size=3D"2"><font face=3D"Consol=
as" size=3D"2">

<p> list_type * m_pList;</p>
<p>};</p>
<p>my_list factory()</p>
<p>{</p>
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">return</font></font></font><font face=
=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> (size_t)-1;</f=
ont></font></p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas" s=
ize=3D"2">
<p>}</p></font></font></code></pre><div><br><br>But it will unexpectedly ca=
ll this constructor:</div><div><br></div><pre class=3D"c"><code>explicit st=
d::list(size_type _Count)</code></pre><div><br><br>I would like to write li=
ke this:</div><div><pre class=3D"c"><code><p><font color=3D"#0000ff" face=
=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"=
2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">struct</font></font=
></font><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"=
2"> my_list</font></font></p><font face=3D"Consolas" size=3D"2"><font face=
=3D"Consolas" size=3D"2">
<p>{</p>
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">typedef</font></font></font><font fac=
e=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> std::list&lt;=
size_t&gt; list_type;</font></font></p><font face=3D"Consolas" size=3D"2"><=
font face=3D"Consolas" size=3D"2">
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">template</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">&lt;</font></=
font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0=
000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2">typename</font></font></font><font face=3D"Consolas" size=3D"=
2"><font face=3D"Consolas" size=3D"2"> T1&gt;</font></font></p><font face=
=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">explicit</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> </font></fon=
t><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000=
ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" =
size=3D"2">inline</font></font></font><font face=3D"Consolas" size=3D"2"><f=
ont face=3D"Consolas" size=3D"2"> my_list(T1 &amp;&amp; p1) : m_pList(</fon=
t></font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=
=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"C=
onsolas" size=3D"2">new</font></font></font><font face=3D"Consolas" size=3D=
"2"><font face=3D"Consolas" size=3D"2"> list_type({std::forward&lt;T1&gt;(p=
1)})) {}</font></font></p><font face=3D"Consolas" size=3D"2"><font face=3D"=
Consolas" size=3D"2">

</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">template</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">&lt;</font></=
font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0=
000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2">typename</font></font></font><font face=3D"Consolas" size=3D"=
2"><font face=3D"Consolas" size=3D"2"> T1&gt;</font></font></p><font face=
=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">inline</font></font></font><font face=
=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> my_list(T1 &am=
p;&amp; p1) : m_pList(</font></font><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font co=
lor=3D"#0000ff" face=3D"Consolas" size=3D"2">new</font></font></font><font =
face=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> list_type(=
std::forward&lt;T1&gt;(p1))) {}</font></font></p><font face=3D"Consolas" si=
ze=3D"2"><font face=3D"Consolas" size=3D"2">

</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">template</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">&lt;</font></=
font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0=
000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2">typename</font></font></font><font face=3D"Consolas" size=3D"=
2"><font face=3D"Consolas" size=3D"2"> T1, </font></font><font color=3D"#00=
00ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas=
" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">typename<=
/font></font></font><font face=3D"Consolas" size=3D"2"><font face=3D"Consol=
as" size=3D"2"> T2&gt;</font></font></p><font face=3D"Consolas" size=3D"2">=
<font face=3D"Consolas" size=3D"2">
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">explicit</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> </font></fon=
t><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000=
ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" =
size=3D"2">inline</font></font></font><font face=3D"Consolas" size=3D"2"><f=
ont face=3D"Consolas" size=3D"2"> my_list(T1 &amp;&amp; p1, T2 &amp;&amp; p=
2) : m_pList(</font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">new</font></font></font><font face=3D=
"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> list_type({std::f=
orward&lt;T1&gt;(p1), std::forward&lt;T2&gt;(p2)})) {}</font></font></p><fo=
nt face=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">

</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">template</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">&lt;</font></=
font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0=
000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2">typename</font></font></font><font face=3D"Consolas" size=3D"=
2"><font face=3D"Consolas" size=3D"2"> T1, </font></font><font color=3D"#00=
00ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas=
" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">typename<=
/font></font></font><font face=3D"Consolas" size=3D"2"><font face=3D"Consol=
as" size=3D"2"> T2&gt;</font></font></p><font face=3D"Consolas" size=3D"2">=
<font face=3D"Consolas" size=3D"2">
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">inline</font></font></font><font face=
=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> my_list(T1 &am=
p;&amp; p1, T2 &amp;&amp; p2) : m_pList(</font></font><font color=3D"#0000f=
f" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" s=
ize=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">new</font></=
font></font><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=
=3D"2"> list_type(std::forward&lt;T1&gt;(p1), std::forward&lt;T2&gt;(p2))) =
{}</font></font></p><font face=3D"Consolas" size=3D"2"><font face=3D"Consol=
as" size=3D"2">

<p> list_type * m_pList;</p>
<p>};</p>
<p>my_list factory()</p>
<p>{</p>
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">return</font></font></font><font face=
=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> (size_t)-1; </=
font></font><font color=3D"#008000" face=3D"Consolas" size=3D"2"><font colo=
r=3D"#008000" face=3D"Consolas" size=3D"2"><font color=3D"#008000" face=3D"=
Consolas" size=3D"2">// compile error</font></font></font></p><font color=
=3D"#008000" face=3D"Consolas" size=3D"2"><font color=3D"#008000" face=3D"C=
onsolas" size=3D"2"><font color=3D"#008000" face=3D"Consolas" size=3D"2">
</font></font></font><font face=3D"Consolas" size=3D"2"><font face=3D"Conso=
las" size=3D"2"><p>}</p></font></font></code></pre></div><div><br></div><di=
v class=3D"c"><br></div><div class=3D"c">We found some dirty trick for cons=
tructors:</div><div class=3D"c"><br></div><div class=3D"c"><p><font color=
=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"C=
onsolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">te=
mplate</font></font></font><font face=3D"Consolas" size=3D"2"><font face=3D=
"Consolas" size=3D"2">&lt;</font></font><font color=3D"#0000ff" face=3D"Con=
solas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><fon=
t color=3D"#0000ff" face=3D"Consolas" size=3D"2">typename</font></font></fo=
nt><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> T=
&gt;</font></font></p><font face=3D"Consolas" size=3D"2"><font face=3D"Cons=
olas" size=3D"2">
</font></font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font co=
lor=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=
=3D"Consolas" size=3D"2"></font></font></font><p><font color=3D"#0000ff" fa=
ce=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">struct</font></=
font></font><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=
=3D"2"> TS</font></font></p><font face=3D"Consolas" size=3D"2"><font face=
=3D"Consolas" size=3D"2">
<p>{</p>
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">template</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">&lt;</font></=
font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0=
000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2">typename</font></font></font><font face=3D"Consolas" size=3D"=
2"><font face=3D"Consolas" size=3D"2"> T1, </font></font><font color=3D"#00=
00ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas=
" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">typename<=
/font></font></font><font face=3D"Consolas" size=3D"2"><font face=3D"Consol=
as" size=3D"2"> T2, </font></font><font color=3D"#0000ff" face=3D"Consolas"=
 size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font colo=
r=3D"#0000ff" face=3D"Consolas" size=3D"2">typename</font></font></font><fo=
nt face=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> ...F&gt=
;</font></font></p><font face=3D"Consolas" size=3D"2"><font face=3D"Consola=
s" size=3D"2">
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">explicit</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> TS(T1 &amp;&=
amp; v1, T2 &amp;&amp; v2, F &amp;&amp;  ... v) : m_t(std::forward&lt;T1&gt=
;(v1), std::forward&lt;T2&gt;(v2), std::forward&lt;F&gt;(v)...)</font></fon=
t></p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"=
>
<p> {</p>
<p> }</p>
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">template</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">&lt;</font></=
font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0=
000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2">typename</font></font></font><font face=3D"Consolas" size=3D"=
2"><font face=3D"Consolas" size=3D"2"> T1&gt;</font></font></p><font face=
=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">
</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">explicit</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2"> TS(T1 &amp;&=
amp; v1) :m_t(std::forward&lt;T1&gt;(v1))</font></font></p><font face=3D"Co=
nsolas" size=3D"2"><font face=3D"Consolas" size=3D"2">
<p> {</p>
<p> }</p>

</font></font><p><font face=3D"Consolas" size=3D"2"><font face=3D"Consolas"=
 size=3D"2"> </font></font><font color=3D"#0000ff" face=3D"Consolas" size=
=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"=
#0000ff" face=3D"Consolas" size=3D"2">template</font></font></font><font fa=
ce=3D"Consolas" size=3D"2"><font face=3D"Consolas" size=3D"2">&lt;</font></=
font><font color=3D"#0000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0=
000ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consola=
s" size=3D"2">typename</font></font></font><font face=3D"Consolas" size=3D"=
2"><font face=3D"Consolas" size=3D"2"> T1, </font></font><font color=3D"#00=
00ff" face=3D"Consolas" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas=
" size=3D"2"><font color=3D"#0000ff" face=3D"Consolas" size=3D"2">typename<=
/font></font></font><font face=3D"Consolas" size=3D"2"><font face=3D"Consol=
as" size=3D"2"> ...F&gt;</font></font></p><font face=3D"Consolas" size=3D"2=
"><font face=3D"Consolas" size=3D"2">
<p> TS(T1 &amp;&amp; v1, F &amp;&amp;  ... v) : m_t({ std::forward&lt;T1&gt=
;(v1), std::forward&lt;F&gt;(v)... })</p>
<p> {</p>
<p> }</p>
<p> T m_t;</p>
<p>};</p></font></font></div><div class=3D"c"><br></div><div class=3D"c">Bu=
t there is no=C2=A0thinkable solution for explicit type convert operators..=
..</div><div class=3D"c"><br></div><div class=3D"c">The solution:</div><div =
class=3D"c">Make explicitness to be part of the signature, so we would be a=
ble to declare different constructors / cast operators with all other param=
eters being the same. Leave the implicit=C2=A0as default.</div></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/829625de-4404-4aeb-b2f7-779c01c7ddea%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/829625de-4404-4aeb-b2f7-779c01c7ddea=
%40isocpp.org</a>.<br />

------=_Part_620_116444098.1471887734314--

------=_Part_619_933618432.1471887734313--

.