Topic: A new modification of the remove_if algorithm


Author: "'Vlad from Moscow' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 1 Feb 2017 05:21:52 -0800 (PST)
Raw View
------=_Part_2775_380254303.1485955312144
Content-Type: multipart/alternative;
 boundary="----=_Part_2776_53254172.1485955312145"

------=_Part_2776_53254172.1485955312145
Content-Type: text/plain; charset=UTF-8

How to remove strings from a two-dimensional character array that is an
array that contains strings?

I am suggesting to append the family of remove algorithms with the
following modification.:)

#include <iostream>
#include <iterator>
#include <cstring>

template<class ForwardIterator, class Predicate, class BinaryOperation>
ForwardIterator remove_if( ForwardIterator first,
                           ForwardIterator last,
                           Predicate predicate,
                           BinaryOperation operation )
{
 ForwardIterator current = first;

 for ( ; first != last; ++first )
 {
  if ( not predicate( *first ) )
  {
   if ( first != current ) operation( *current, *first );
   ++current;
  }
 }

 return current;
}

int main()
{
 char s[][2] = { "A", "B", "A", "C", "A", "A", "D", "A" };

 for ( const char *t : s ) std::cout << t << ' ';
 std::cout << std::endl;

 char ( *last )[2] = remove_if( std::begin( s ), std::end( s ),
                                []( const char *a )
                                {
                                    return std::strcmp( a, "A" ) == 0;
                                },
                                []( char *a, char *b )
                                {
                                 strcpy( a, b );
                                } );

 for ( char ( *first )[2] = s; first != last; ++first ) std::cout << *first
<< ' ';
 std::cout << std::endl;

 return 0;
}


The program output is

A B A C A A D A
B C D

What do you think?

--
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/0a97670d-d0ab-45cb-aea4-ce3a75868e89%40isocpp.org.

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

<div dir=3D"ltr"><div>How to remove strings from a two-dimensional characte=
r array that is an array that contains strings?</div><div><br></div><div>I =
am suggesting to append the family of remove algorithms with the following =
modification.:)</div><div><br></div><div class=3D"prettyprint" style=3D"bor=
der: 1px solid rgb(187, 187, 187); word-wrap: break-word; background-color:=
 rgb(250, 250, 250);"><code class=3D"prettyprint"><div class=3D"subprettypr=
int"><span class=3D"styled-by-prettify" style=3D"color: #800;">#include</sp=
an><span class=3D"styled-by-prettify" style=3D"color: #000;"> </span><span =
class=3D"styled-by-prettify" style=3D"color: #080;">&lt;iostream&gt;</span>=
<span class=3D"styled-by-prettify" style=3D"color: #000;"><br></span><span =
class=3D"styled-by-prettify" style=3D"color: #800;">#include</span><span cl=
ass=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=3D"st=
yled-by-prettify" style=3D"color: #080;">&lt;iterator&gt;</span><span class=
=3D"styled-by-prettify" style=3D"color: #000;"><br></span><span class=3D"st=
yled-by-prettify" style=3D"color: #800;">#include</span><span class=3D"styl=
ed-by-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by-pre=
ttify" style=3D"color: #080;">&lt;cstring&gt;</span><span class=3D"styled-b=
y-prettify" style=3D"color: #000;"><br><br></span><span class=3D"styled-by-=
prettify" style=3D"color: #008;">template</span><span class=3D"styled-by-pr=
ettify" style=3D"color: #660;">&lt;</span><span class=3D"styled-by-prettify=
" style=3D"color: #008;">class</span><span class=3D"styled-by-prettify" sty=
le=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"col=
or: #606;">ForwardIterator</span><span class=3D"styled-by-prettify" style=
=3D"color: #660;">,</span><span class=3D"styled-by-prettify" style=3D"color=
: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #008;">=
class</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> </sp=
an><span class=3D"styled-by-prettify" style=3D"color: #606;">Predicate</spa=
n><span class=3D"styled-by-prettify" style=3D"color: #660;">,</span><span c=
lass=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=3D"s=
tyled-by-prettify" style=3D"color: #008;">class</span><span class=3D"styled=
-by-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by-prett=
ify" style=3D"color: #606;">BinaryOperation</span><span class=3D"styled-by-=
prettify" style=3D"color: #660;">&gt;</span><span class=3D"styled-by-pretti=
fy" style=3D"color: #000;"> <br></span><span class=3D"styled-by-prettify" s=
tyle=3D"color: #606;">ForwardIterator</span><span class=3D"styled-by-pretti=
fy" style=3D"color: #000;"> remove_if</span><span class=3D"styled-by-pretti=
fy" style=3D"color: #660;">(</span><span class=3D"styled-by-prettify" style=
=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color=
: #606;">ForwardIterator</span><span class=3D"styled-by-prettify" style=3D"=
color: #000;"> first</span><span class=3D"styled-by-prettify" style=3D"colo=
r: #660;">,</span><span class=3D"styled-by-prettify" style=3D"color: #000;"=
> <br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0</span><span class=3D"styled-by-prettify" style=
=3D"color: #606;">ForwardIterator</span><span class=3D"styled-by-prettify" =
style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"=
color: #008;">last</span><span class=3D"styled-by-prettify" style=3D"color:=
 #660;">,</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> =
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0</span><span class=3D"styled-by-prettify" style=
=3D"color: #606;">Predicate</span><span class=3D"styled-by-prettify" style=
=3D"color: #000;"> predicate</span><span class=3D"styled-by-prettify" style=
=3D"color: #660;">,</span><span class=3D"styled-by-prettify" style=3D"color=
: #000;"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</span><span class=3D"styled-by-prettify=
" style=3D"color: #606;">BinaryOperation</span><span class=3D"styled-by-pre=
ttify" style=3D"color: #000;"> operation </span><span class=3D"styled-by-pr=
ettify" style=3D"color: #660;">)</span><span class=3D"styled-by-prettify" s=
tyle=3D"color: #000;"><br></span><span class=3D"styled-by-prettify" style=
=3D"color: #660;">{</span><span class=3D"styled-by-prettify" style=3D"color=
: #000;"><br>=C2=A0</span><span class=3D"styled-by-prettify" style=3D"color=
: #606;">ForwardIterator</span><span class=3D"styled-by-prettify" style=3D"=
color: #000;"> current </span><span class=3D"styled-by-prettify" style=3D"c=
olor: #660;">=3D</span><span class=3D"styled-by-prettify" style=3D"color: #=
000;"> first</span><span class=3D"styled-by-prettify" style=3D"color: #660;=
">;</span><span class=3D"styled-by-prettify" style=3D"color: #000;"><br>=C2=
=A0<br>=C2=A0</span><span class=3D"styled-by-prettify" style=3D"color: #008=
;">for</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> </s=
pan><span class=3D"styled-by-prettify" style=3D"color: #660;">(</span><span=
 class=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=3D=
"styled-by-prettify" style=3D"color: #660;">;</span><span class=3D"styled-b=
y-prettify" style=3D"color: #000;"> first </span><span class=3D"styled-by-p=
rettify" style=3D"color: #660;">!=3D</span><span class=3D"styled-by-prettif=
y" style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=
=3D"color: #008;">last</span><span class=3D"styled-by-prettify" style=3D"co=
lor: #660;">;</span><span class=3D"styled-by-prettify" style=3D"color: #000=
;"> </span><span class=3D"styled-by-prettify" style=3D"color: #660;">++</sp=
an><span class=3D"styled-by-prettify" style=3D"color: #000;">first </span><=
span class=3D"styled-by-prettify" style=3D"color: #660;">)</span><span clas=
s=3D"styled-by-prettify" style=3D"color: #000;"><br>=C2=A0</span><span clas=
s=3D"styled-by-prettify" style=3D"color: #660;">{</span><span class=3D"styl=
ed-by-prettify" style=3D"color: #000;"><br>=C2=A0 </span><span class=3D"sty=
led-by-prettify" style=3D"color: #008;">if</span><span class=3D"styled-by-p=
rettify" style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" =
style=3D"color: #660;">(</span><span class=3D"styled-by-prettify" style=3D"=
color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #0=
08;">not</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> p=
redicate</span><span class=3D"styled-by-prettify" style=3D"color: #660;">(<=
/span><span class=3D"styled-by-prettify" style=3D"color: #000;"> </span><sp=
an class=3D"styled-by-prettify" style=3D"color: #660;">*</span><span class=
=3D"styled-by-prettify" style=3D"color: #000;">first </span><span class=3D"=
styled-by-prettify" style=3D"color: #660;">)</span><span class=3D"styled-by=
-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by-prettify=
" style=3D"color: #660;">)</span><span class=3D"styled-by-prettify" style=
=3D"color: #000;"><br>=C2=A0 </span><span class=3D"styled-by-prettify" styl=
e=3D"color: #660;">{</span><span class=3D"styled-by-prettify" style=3D"colo=
r: #000;"><br>=C2=A0 =C2=A0</span><span class=3D"styled-by-prettify" style=
=3D"color: #008;">if</span><span class=3D"styled-by-prettify" style=3D"colo=
r: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #660;"=
>(</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> first <=
/span><span class=3D"styled-by-prettify" style=3D"color: #660;">!=3D</span>=
<span class=3D"styled-by-prettify" style=3D"color: #000;"> current </span><=
span class=3D"styled-by-prettify" style=3D"color: #660;">)</span><span clas=
s=3D"styled-by-prettify" style=3D"color: #000;"> operation</span><span clas=
s=3D"styled-by-prettify" style=3D"color: #660;">(</span><span class=3D"styl=
ed-by-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by-pre=
ttify" style=3D"color: #660;">*</span><span class=3D"styled-by-prettify" st=
yle=3D"color: #000;">current</span><span class=3D"styled-by-prettify" style=
=3D"color: #660;">,</span><span class=3D"styled-by-prettify" style=3D"color=
: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #660;">=
*</span><span class=3D"styled-by-prettify" style=3D"color: #000;">first </s=
pan><span class=3D"styled-by-prettify" style=3D"color: #660;">);</span><spa=
n class=3D"styled-by-prettify" style=3D"color: #000;"><br>=C2=A0 =C2=A0</sp=
an><span class=3D"styled-by-prettify" style=3D"color: #660;">++</span><span=
 class=3D"styled-by-prettify" style=3D"color: #000;">current</span><span cl=
ass=3D"styled-by-prettify" style=3D"color: #660;">;</span><span class=3D"st=
yled-by-prettify" style=3D"color: #000;"><br>=C2=A0 </span><span class=3D"s=
tyled-by-prettify" style=3D"color: #660;">}</span><span class=3D"styled-by-=
prettify" style=3D"color: #000;"><br>=C2=A0</span><span class=3D"styled-by-=
prettify" style=3D"color: #660;">}</span><span class=3D"styled-by-prettify"=
 style=3D"color: #000;"><br>=C2=A0<br>=C2=A0</span><span class=3D"styled-by=
-prettify" style=3D"color: #008;">return</span><span class=3D"styled-by-pre=
ttify" style=3D"color: #000;"> current</span><span class=3D"styled-by-prett=
ify" style=3D"color: #660;">;</span><span class=3D"styled-by-prettify" styl=
e=3D"color: #000;"><br></span><span class=3D"styled-by-prettify" style=3D"c=
olor: #660;">}</span><span class=3D"styled-by-prettify" style=3D"color: #00=
0;"> <br>=C2=A0 <br></span><span class=3D"styled-by-prettify" style=3D"colo=
r: #008;">int</span><span class=3D"styled-by-prettify" style=3D"color: #000=
;"> main</span><span class=3D"styled-by-prettify" style=3D"color: #660;">()=
</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> <br></spa=
n><span class=3D"styled-by-prettify" style=3D"color: #660;">{</span><span c=
lass=3D"styled-by-prettify" style=3D"color: #000;"><br>=C2=A0</span><span c=
lass=3D"styled-by-prettify" style=3D"color: #008;">char</span><span class=
=3D"styled-by-prettify" style=3D"color: #000;"> s</span><span class=3D"styl=
ed-by-prettify" style=3D"color: #660;">[][</span><span class=3D"styled-by-p=
rettify" style=3D"color: #066;">2</span><span class=3D"styled-by-prettify" =
style=3D"color: #660;">]</span><span class=3D"styled-by-prettify" style=3D"=
color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #6=
60;">=3D</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> <=
/span><span class=3D"styled-by-prettify" style=3D"color: #660;">{</span><sp=
an class=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=
=3D"styled-by-prettify" style=3D"color: #080;">&quot;A&quot;</span><span cl=
ass=3D"styled-by-prettify" style=3D"color: #660;">,</span><span class=3D"st=
yled-by-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by-p=
rettify" style=3D"color: #080;">&quot;B&quot;</span><span class=3D"styled-b=
y-prettify" style=3D"color: #660;">,</span><span class=3D"styled-by-prettif=
y" style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=
=3D"color: #080;">&quot;A&quot;</span><span class=3D"styled-by-prettify" st=
yle=3D"color: #660;">,</span><span class=3D"styled-by-prettify" style=3D"co=
lor: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #080=
;">&quot;C&quot;</span><span class=3D"styled-by-prettify" style=3D"color: #=
660;">,</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> </=
span><span class=3D"styled-by-prettify" style=3D"color: #080;">&quot;A&quot=
;</span><span class=3D"styled-by-prettify" style=3D"color: #660;">,</span><=
span class=3D"styled-by-prettify" style=3D"color: #000;"> </span><span clas=
s=3D"styled-by-prettify" style=3D"color: #080;">&quot;A&quot;</span><span c=
lass=3D"styled-by-prettify" style=3D"color: #660;">,</span><span class=3D"s=
tyled-by-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by-=
prettify" style=3D"color: #080;">&quot;D&quot;</span><span class=3D"styled-=
by-prettify" style=3D"color: #660;">,</span><span class=3D"styled-by-pretti=
fy" style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=
=3D"color: #080;">&quot;A&quot;</span><span class=3D"styled-by-prettify" st=
yle=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"co=
lor: #660;">};</span><span class=3D"styled-by-prettify" style=3D"color: #00=
0;"><br>=C2=A0<br>=C2=A0</span><span class=3D"styled-by-prettify" style=3D"=
color: #008;">for</span><span class=3D"styled-by-prettify" style=3D"color: =
#000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #660;">(<=
/span><span class=3D"styled-by-prettify" style=3D"color: #000;"> </span><sp=
an class=3D"styled-by-prettify" style=3D"color: #008;">const</span><span cl=
ass=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=3D"st=
yled-by-prettify" style=3D"color: #008;">char</span><span class=3D"styled-b=
y-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by-prettif=
y" style=3D"color: #660;">*</span><span class=3D"styled-by-prettify" style=
=3D"color: #000;">t </span><span class=3D"styled-by-prettify" style=3D"colo=
r: #660;">:</span><span class=3D"styled-by-prettify" style=3D"color: #000;"=
> s </span><span class=3D"styled-by-prettify" style=3D"color: #660;">)</spa=
n><span class=3D"styled-by-prettify" style=3D"color: #000;"> std</span><spa=
n class=3D"styled-by-prettify" style=3D"color: #660;">::</span><span class=
=3D"styled-by-prettify" style=3D"color: #000;">cout </span><span class=3D"s=
tyled-by-prettify" style=3D"color: #660;">&lt;&lt;</span><span class=3D"sty=
led-by-prettify" style=3D"color: #000;"> t </span><span class=3D"styled-by-=
prettify" style=3D"color: #660;">&lt;&lt;</span><span class=3D"styled-by-pr=
ettify" style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" s=
tyle=3D"color: #080;">&#39; &#39;</span><span class=3D"styled-by-prettify" =
style=3D"color: #660;">;</span><span class=3D"styled-by-prettify" style=3D"=
color: #000;"><br>=C2=A0std</span><span class=3D"styled-by-prettify" style=
=3D"color: #660;">::</span><span class=3D"styled-by-prettify" style=3D"colo=
r: #000;">cout </span><span class=3D"styled-by-prettify" style=3D"color: #6=
60;">&lt;&lt;</span><span class=3D"styled-by-prettify" style=3D"color: #000=
;"> std</span><span class=3D"styled-by-prettify" style=3D"color: #660;">::<=
/span><span class=3D"styled-by-prettify" style=3D"color: #000;">endl</span>=
<span class=3D"styled-by-prettify" style=3D"color: #660;">;</span><span cla=
ss=3D"styled-by-prettify" style=3D"color: #000;"><br>=C2=A0<br>=C2=A0</span=
><span class=3D"styled-by-prettify" style=3D"color: #008;">char</span><span=
 class=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=3D=
"styled-by-prettify" style=3D"color: #660;">(</span><span class=3D"styled-b=
y-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by-prettif=
y" style=3D"color: #660;">*</span><span class=3D"styled-by-prettify" style=
=3D"color: #008;">last</span><span class=3D"styled-by-prettify" style=3D"co=
lor: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #660=
;">)[</span><span class=3D"styled-by-prettify" style=3D"color: #066;">2</sp=
an><span class=3D"styled-by-prettify" style=3D"color: #660;">]</span><span =
class=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=3D"=
styled-by-prettify" style=3D"color: #660;">=3D</span><span class=3D"styled-=
by-prettify" style=3D"color: #000;"> remove_if</span><span class=3D"styled-=
by-prettify" style=3D"color: #660;">(</span><span class=3D"styled-by-pretti=
fy" style=3D"color: #000;"> std</span><span class=3D"styled-by-prettify" st=
yle=3D"color: #660;">::</span><span class=3D"styled-by-prettify" style=3D"c=
olor: #008;">begin</span><span class=3D"styled-by-prettify" style=3D"color:=
 #660;">(</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> =
s </span><span class=3D"styled-by-prettify" style=3D"color: #660;">),</span=
><span class=3D"styled-by-prettify" style=3D"color: #000;"> std</span><span=
 class=3D"styled-by-prettify" style=3D"color: #660;">::</span><span class=
=3D"styled-by-prettify" style=3D"color: #008;">end</span><span class=3D"sty=
led-by-prettify" style=3D"color: #660;">(</span><span class=3D"styled-by-pr=
ettify" style=3D"color: #000;"> s </span><span class=3D"styled-by-prettify"=
 style=3D"color: #660;">),</span><span class=3D"styled-by-prettify" style=
=3D"color: #000;"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span cl=
ass=3D"styled-by-prettify" style=3D"color: #660;">[](</span><span class=3D"=
styled-by-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by=
-prettify" style=3D"color: #008;">const</span><span class=3D"styled-by-pret=
tify" style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" sty=
le=3D"color: #008;">char</span><span class=3D"styled-by-prettify" style=3D"=
color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #6=
60;">*</span><span class=3D"styled-by-prettify" style=3D"color: #000;">a </=
span><span class=3D"styled-by-prettify" style=3D"color: #660;">)</span><spa=
n class=3D"styled-by-prettify" style=3D"color: #000;"> <br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 </span><span class=3D"styled-by-prettify" style=3D=
"color: #660;">{</span><span class=3D"styled-by-prettify" style=3D"color: #=
000;"> <br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span=
 class=3D"styled-by-prettify" style=3D"color: #008;">return</span><span cla=
ss=3D"styled-by-prettify" style=3D"color: #000;"> std</span><span class=3D"=
styled-by-prettify" style=3D"color: #660;">::</span><span class=3D"styled-b=
y-prettify" style=3D"color: #000;">strcmp</span><span class=3D"styled-by-pr=
ettify" style=3D"color: #660;">(</span><span class=3D"styled-by-prettify" s=
tyle=3D"color: #000;"> a</span><span class=3D"styled-by-prettify" style=3D"=
color: #660;">,</span><span class=3D"styled-by-prettify" style=3D"color: #0=
00;"> </span><span class=3D"styled-by-prettify" style=3D"color: #080;">&quo=
t;A&quot;</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> =
</span><span class=3D"styled-by-prettify" style=3D"color: #660;">)</span><s=
pan class=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=
=3D"styled-by-prettify" style=3D"color: #660;">=3D=3D</span><span class=3D"=
styled-by-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by=
-prettify" style=3D"color: #066;">0</span><span class=3D"styled-by-prettify=
" style=3D"color: #660;">;</span><span class=3D"styled-by-prettify" style=
=3D"color: #000;"> <br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span cl=
ass=3D"styled-by-prettify" style=3D"color: #660;">},</span><span class=3D"s=
tyled-by-prettify" style=3D"color: #000;"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 </span><span class=3D"styled-by-prettify" style=3D"color: #660;"=
>[](</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> </spa=
n><span class=3D"styled-by-prettify" style=3D"color: #008;">char</span><spa=
n class=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=
=3D"styled-by-prettify" style=3D"color: #660;">*</span><span class=3D"style=
d-by-prettify" style=3D"color: #000;">a</span><span class=3D"styled-by-pret=
tify" style=3D"color: #660;">,</span><span class=3D"styled-by-prettify" sty=
le=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"col=
or: #008;">char</span><span class=3D"styled-by-prettify" style=3D"color: #0=
00;"> </span><span class=3D"styled-by-prettify" style=3D"color: #660;">*</s=
pan><span class=3D"styled-by-prettify" style=3D"color: #000;">b </span><spa=
n class=3D"styled-by-prettify" style=3D"color: #660;">)</span><span class=
=3D"styled-by-prettify" style=3D"color: #000;"><br>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 </span><span class=3D"styled-by-prettify" style=3D"color: #66=
0;">{</span><span class=3D"styled-by-prettify" style=3D"color: #000;"><br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0strcpy</span><span class=3D"st=
yled-by-prettify" style=3D"color: #660;">(</span><span class=3D"styled-by-p=
rettify" style=3D"color: #000;"> a</span><span class=3D"styled-by-prettify"=
 style=3D"color: #660;">,</span><span class=3D"styled-by-prettify" style=3D=
"color: #000;"> b </span><span class=3D"styled-by-prettify" style=3D"color:=
 #660;">);</span><span class=3D"styled-by-prettify" style=3D"color: #000;">=
<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span class=3D"styled-by-p=
rettify" style=3D"color: #660;">}</span><span class=3D"styled-by-prettify" =
style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"=
color: #660;">);</span><span class=3D"styled-by-prettify" style=3D"color: #=
000;"> <br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<br>=C2=A0</span><span class=3D"st=
yled-by-prettify" style=3D"color: #008;">for</span><span class=3D"styled-by=
-prettify" style=3D"color: #000;"> </span><span class=3D"styled-by-prettify=
" style=3D"color: #660;">(</span><span class=3D"styled-by-prettify" style=
=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color=
: #008;">char</span><span class=3D"styled-by-prettify" style=3D"color: #000=
;"> </span><span class=3D"styled-by-prettify" style=3D"color: #660;">(</spa=
n><span class=3D"styled-by-prettify" style=3D"color: #000;"> </span><span c=
lass=3D"styled-by-prettify" style=3D"color: #660;">*</span><span class=3D"s=
tyled-by-prettify" style=3D"color: #000;">first </span><span class=3D"style=
d-by-prettify" style=3D"color: #660;">)[</span><span class=3D"styled-by-pre=
ttify" style=3D"color: #066;">2</span><span class=3D"styled-by-prettify" st=
yle=3D"color: #660;">]</span><span class=3D"styled-by-prettify" style=3D"co=
lor: #000;"> </span><span class=3D"styled-by-prettify" style=3D"color: #660=
;">=3D</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> s</=
span><span class=3D"styled-by-prettify" style=3D"color: #660;">;</span><spa=
n class=3D"styled-by-prettify" style=3D"color: #000;"> first </span><span c=
lass=3D"styled-by-prettify" style=3D"color: #660;">!=3D</span><span class=
=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=3D"style=
d-by-prettify" style=3D"color: #008;">last</span><span class=3D"styled-by-p=
rettify" style=3D"color: #660;">;</span><span class=3D"styled-by-prettify" =
style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"=
color: #660;">++</span><span class=3D"styled-by-prettify" style=3D"color: #=
000;">first </span><span class=3D"styled-by-prettify" style=3D"color: #660;=
">)</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> std</s=
pan><span class=3D"styled-by-prettify" style=3D"color: #660;">::</span><spa=
n class=3D"styled-by-prettify" style=3D"color: #000;">cout </span><span cla=
ss=3D"styled-by-prettify" style=3D"color: #660;">&lt;&lt;</span><span class=
=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=3D"style=
d-by-prettify" style=3D"color: #660;">*</span><span class=3D"styled-by-pret=
tify" style=3D"color: #000;">first </span><span class=3D"styled-by-prettify=
" style=3D"color: #660;">&lt;&lt;</span><span class=3D"styled-by-prettify" =
style=3D"color: #000;"> </span><span class=3D"styled-by-prettify" style=3D"=
color: #080;">&#39; &#39;</span><span class=3D"styled-by-prettify" style=3D=
"color: #660;">;</span><span class=3D"styled-by-prettify" style=3D"color: #=
000;"><br>=C2=A0std</span><span class=3D"styled-by-prettify" style=3D"color=
: #660;">::</span><span class=3D"styled-by-prettify" style=3D"color: #000;"=
>cout </span><span class=3D"styled-by-prettify" style=3D"color: #660;">&lt;=
&lt;</span><span class=3D"styled-by-prettify" style=3D"color: #000;"> std</=
span><span class=3D"styled-by-prettify" style=3D"color: #660;">::</span><sp=
an class=3D"styled-by-prettify" style=3D"color: #000;">endl</span><span cla=
ss=3D"styled-by-prettify" style=3D"color: #660;">;</span><span class=3D"sty=
led-by-prettify" style=3D"color: #000;"><br>=C2=A0<br>=C2=A0</span><span cl=
ass=3D"styled-by-prettify" style=3D"color: #008;">return</span><span class=
=3D"styled-by-prettify" style=3D"color: #000;"> </span><span class=3D"style=
d-by-prettify" style=3D"color: #066;">0</span><span class=3D"styled-by-pret=
tify" style=3D"color: #660;">;</span><span class=3D"styled-by-prettify" sty=
le=3D"color: #000;"><br></span><span class=3D"styled-by-prettify" style=3D"=
color: #660;">}</span><span class=3D"styled-by-prettify" style=3D"color: #0=
00;"><br><br></span></div></code></div><div><br></div><div>The program outp=
ut is</div><div><br></div><div>A B A C A A D A <br>B C D </div><div><br></d=
iv><div>What do you think?<br><b></b><i></i><u></u><sub></sub><sup></sup><s=
trike></strike><br></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/0a97670d-d0ab-45cb-aea4-ce3a75868e89%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/0a97670d-d0ab-45cb-aea4-ce3a75868e89=
%40isocpp.org</a>.<br />

------=_Part_2776_53254172.1485955312145--

------=_Part_2775_380254303.1485955312144--

.


Author: =?UTF-8?Q?Jonathan_M=c3=bcller?= <jonathanmueller.dev@gmail.com>
Date: Wed, 1 Feb 2017 15:27:45 +0100
Raw View
Why not use `std::string` or `std::string_view`?

--
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/a9722443-a786-52b8-71e5-3b8736323845%40gmail.com.

.


Author: "'Vlad from Moscow' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 1 Feb 2017 06:35:58 -0800 (PST)
Raw View
------=_Part_2669_556297608.1485959758404
Content-Type: multipart/alternative;
 boundary="----=_Part_2670_1765119508.1485959758404"

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



=D1=81=D1=80=D0=B5=D0=B4=D0=B0, 1 =D1=84=D0=B5=D0=B2=D1=80=D0=B0=D0=BB=D1=
=8F 2017 =D0=B3., 17:27:49 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=
=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Jonathan M=C3=BCller=20
=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> Why not use `std::string` or `std::string_view`?



Character arrays and objects of the type std::string are=20
different entities. =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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/db0d7f20-1aec-4fe1-ac60-434367a3fff2%40isocpp.or=
g.

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

<div dir=3D"ltr"><br><br>=D1=81=D1=80=D0=B5=D0=B4=D0=B0, 1 =D1=84=D0=B5=D0=
=B2=D1=80=D0=B0=D0=BB=D1=8F 2017 =D0=B3., 17:27:49 UTC+3 =D0=BF=D0=BE=D0=BB=
=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Jonathan M=C3=BCller=
 =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<blockquote class=3D"gmail_quot=
e" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;paddin=
g-left: 1ex;">Why not use `std::string` or `std::string_view`?</blockquote>=
<div><br></div><div><br></div><div>Character arrays and objects of the type=
 std::string are different=C2=A0entities. =C2=A0</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/db0d7f20-1aec-4fe1-ac60-434367a3fff2%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/db0d7f20-1aec-4fe1-ac60-434367a3fff2=
%40isocpp.org</a>.<br />

------=_Part_2670_1765119508.1485959758404--

------=_Part_2669_556297608.1485959758404--

.


Author: =?UTF-8?Q?Jonathan_M=c3=bcller?= <jonathanmueller.dev@gmail.com>
Date: Wed, 1 Feb 2017 15:38:02 +0100
Raw View
On 01.02.2017 15:35, 'Vlad from Moscow' via ISO C++ Standard - Future
Proposals wrote:
> Character arrays and objects of the type std::string are
> different entities.

Yes, I'm aware, but what's your point?

--
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/1e14c722-c731-e55f-c96e-ddffbd21c182%40gmail.com.

.


Author: "'Vlad from Moscow' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 1 Feb 2017 06:56:16 -0800 (PST)
Raw View
------=_Part_2612_916706631.1485960976371
Content-Type: multipart/alternative;
 boundary="----=_Part_2613_2026776353.1485960976371"

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



=D1=81=D1=80=D0=B5=D0=B4=D0=B0, 1 =D1=84=D0=B5=D0=B2=D1=80=D0=B0=D0=BB=D1=
=8F 2017 =D0=B3., 17:38:06 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=
=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Jonathan M=C3=BCller=20
=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> On 01.02.2017 15:35, 'Vlad from Moscow' via ISO C++ Standard - Future=20
> Proposals wrote:=20
> > Character arrays and objects of the type std::string are=20
> > different entities.=20
>
> Yes, I'm aware, but what's your point?=20
>

My point is to allow to use algorithms remove(s) with arrays.independently=
=20
whether an array is an integer array or a character array. By the way how=
=20
are you going to apply the class std::string to an integer two-dimensional=
=20
array?

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/22c13d97-8f9e-48ea-a6b7-63c0eda6fd8c%40isocpp.or=
g.

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

<div dir=3D"ltr"><br><br>=D1=81=D1=80=D0=B5=D0=B4=D0=B0, 1 =D1=84=D0=B5=D0=
=B2=D1=80=D0=B0=D0=BB=D1=8F 2017 =D0=B3., 17:38:06 UTC+3 =D0=BF=D0=BE=D0=BB=
=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Jonathan M=C3=BCller=
 =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<blockquote class=3D"gmail_quot=
e" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;paddin=
g-left: 1ex;">On 01.02.2017 15:35, &#39;Vlad from Moscow&#39; via ISO C++ S=
tandard - Future=20
<br>Proposals wrote:
<br>&gt; Character arrays and objects of the type std::string are=20
<br>&gt; different entities.
<br>
<br>Yes, I&#39;m aware, but what&#39;s your point?
<br></blockquote><div><br></div><div>My point is to=C2=A0allow to use algor=
ithms remove(s) with arrays.independently whether an array is an integer ar=
ray or a character array.=C2=A0By the way=C2=A0how are you going to apply t=
he class std::string to an integer two-dimensional array?</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/22c13d97-8f9e-48ea-a6b7-63c0eda6fd8c%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/22c13d97-8f9e-48ea-a6b7-63c0eda6fd8c=
%40isocpp.org</a>.<br />

------=_Part_2613_2026776353.1485960976371--

------=_Part_2612_916706631.1485960976371--

.


Author: =?UTF-8?Q?Jonathan_M=c3=bcller?= <jonathanmueller.dev@gmail.com>
Date: Wed, 1 Feb 2017 18:34:01 +0100
Raw View
On 01.02.2017 15:56, 'Vlad from Moscow' via ISO C++ Standard - Future
Proposals wrote:
> My point is to allow to use algorithms remove(s) with
> arrays.independently whether an array is an integer array or a
> character array. By the way how are you going to apply the class
> std::string to an integer two-dimensional array?

I'll use `std::array` as C arrays are weird, as you noticed.

--
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/3609e56f-b3cc-79bc-a7a1-10a7eacc8ef7%40gmail.com.

.


Author: "'Vlad from Moscow' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 1 Feb 2017 09:48:49 -0800 (PST)
Raw View
------=_Part_2899_689817794.1485971329687
Content-Type: multipart/alternative;
 boundary="----=_Part_2900_1770366878.1485971329687"

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



=D1=81=D1=80=D0=B5=D0=B4=D0=B0, 1 =D1=84=D0=B5=D0=B2=D1=80=D0=B0=D0=BB=D1=
=8F 2017 =D0=B3., 20:34:07 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=
=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Jonathan M=C3=BCller=20
=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> On 01.02.2017 15:56, 'Vlad from Moscow' via ISO C++ Standard - Future=20
> Proposals wrote:=20
> > My point is to allow to use algorithms remove(s) with=20
> > arrays.independently whether an array is an integer array or a=20
> > character array. By the way how are you going to apply the class=20
> > std::string to an integer two-dimensional array?=20
>
> I'll use `std::array` as C arrays are weird, as you noticed.=20
>


There are no implicit conversions from an array to an object of the class=
=20
std::array and vice versa. =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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/61568f1e-d50b-491c-a51e-9403c6ecd681%40isocpp.or=
g.

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

<div dir=3D"ltr"><br><br>=D1=81=D1=80=D0=B5=D0=B4=D0=B0, 1 =D1=84=D0=B5=D0=
=B2=D1=80=D0=B0=D0=BB=D1=8F 2017 =D0=B3., 20:34:07 UTC+3 =D0=BF=D0=BE=D0=BB=
=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Jonathan M=C3=BCller=
 =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<blockquote class=3D"gmail_quot=
e" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;paddin=
g-left: 1ex;">On 01.02.2017 15:56, &#39;Vlad from Moscow&#39; via ISO C++ S=
tandard - Future=20
<br>Proposals wrote:
<br>&gt; My point is to allow to use algorithms remove(s) with=20
<br>&gt; arrays.independently whether an array is an integer array or a=20
<br>&gt; character array. By the way how are you going to apply the class=
=20
<br>&gt; std::string to an integer two-dimensional array?
<br>
<br>I&#39;ll use `std::array` as C arrays are weird, as you noticed.
<br></blockquote><div><br></div><div><br></div><div>There=C2=A0are no impli=
cit conversions from an array to=C2=A0an object of the class std::array and=
 vice versa.=C2=A0 </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/61568f1e-d50b-491c-a51e-9403c6ecd681%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/61568f1e-d50b-491c-a51e-9403c6ecd681=
%40isocpp.org</a>.<br />

------=_Part_2900_1770366878.1485971329687--

------=_Part_2899_689817794.1485971329687--

.


Author: =?UTF-8?Q?Jonathan_M=c3=bcller?= <jonathanmueller.dev@gmail.com>
Date: Wed, 1 Feb 2017 19:26:24 +0100
Raw View
On 01.02.2017 18:48, 'Vlad from Moscow' via ISO C++ Standard - Future
Proposals wrote:
>
> There are no implicit conversions from an array to an object of the
> class std::array and vice versa.

Just use them throughout the code base.

--
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/0b5a6d42-3107-fe7f-df2b-b63de2834f49%40gmail.com.

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Wed, 1 Feb 2017 10:47:24 -0800 (PST)
Raw View
------=_Part_2981_664679932.1485974844569
Content-Type: multipart/alternative;
 boundary="----=_Part_2982_245394764.1485974844569"

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

On Wednesday, February 1, 2017 at 1:26:27 PM UTC-5, Jonathan M=C3=BCller wr=
ote:
>
> On 01.02.2017 18:48, 'Vlad from Moscow' via ISO C++ Standard - Future=20
> Proposals wrote:=20
> >=20
> > There are no implicit conversions from an array to an object of the=20
> > class std::array and vice versa.=20
>
> Just use them throughout the code base.=20
>

While I understand and agree that it would be better if you could just use=
=20
a reasonable type for these things, it's not reasonable to expect people to=
=20
radically restructure all of their code.

At the same time, I just don't see this being a worthwhile addition to the=
=20
standard. `remove_if` moves the elements around. This overload does not; it=
=20
simply calls an arbitrary operation which may or may not move elements=20
around.

The only use for it is operations on things which cannot be copied or=20
moved. And the only type I can think of with that property is a language=20
array. And standard library containers cannot deal in such things, so this=
=20
`remove_if` would only ever be applied to multi-dimensional arrays.

Ranges seem like they'd be a more effective way to handle this case.

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/37b37305-bd87-42c9-b6eb-f29d3092d157%40isocpp.or=
g.

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

<div dir=3D"ltr">On Wednesday, February 1, 2017 at 1:26:27 PM UTC-5, Jonath=
an M=C3=BCller wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 01.02.=
2017 18:48, &#39;Vlad from Moscow&#39; via ISO C++ Standard - Future=20
<br>Proposals wrote:
<br>&gt;
<br>&gt; There are no implicit conversions from an array to an object of th=
e
<br>&gt; class std::array and vice versa.
<br>
<br>Just use them throughout the code base.
<br></blockquote><div><br>While I understand and agree that it would be bet=
ter if you could just use a reasonable type for these things, it&#39;s not =
reasonable to expect people to radically restructure all of their code.<br>=
<br>At the same time, I just don&#39;t see this being a worthwhile addition=
 to the standard. `remove_if` moves the elements around. This overload does=
 not; it simply calls an arbitrary operation which may or may not move elem=
ents around.<br><br>The only use for it is operations on things which canno=
t be copied or moved. And the only type I can think of with that property i=
s a language array. And standard library containers cannot deal in such thi=
ngs, so this `remove_if` would only ever be applied to multi-dimensional ar=
rays.<br><br>Ranges seem like they&#39;d be a more effective way to handle =
this case.<br></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/37b37305-bd87-42c9-b6eb-f29d3092d157%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/37b37305-bd87-42c9-b6eb-f29d3092d157=
%40isocpp.org</a>.<br />

------=_Part_2982_245394764.1485974844569--

------=_Part_2981_664679932.1485974844569--

.