Boost C++ Libraries: Ticket #4643: Does array operator== behave as excpected https://svn.boost.org/trac10/ticket/4643 <p> this is the body of method operator==: </p> <p> return std::equal(x.begin(), x.end(), y.begin()); </p> <p> If x is of size n doesn't this just compare if y's first n elements are equal to n. What if y is bigger than x? Is this really the expected behavior? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4643 Trac 1.4.3 anonymous Fri, 10 Sep 2010 19:54:29 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4643#comment:1 https://svn.boost.org/trac10/ticket/4643#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> Ticket Marshall Clow Fri, 10 Sep 2010 20:44:46 GMT <link>https://svn.boost.org/trac10/ticket/4643#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4643#comment:2</guid> <description> <p> Just adding a comment here (in case someone is wondering down the road): The operator == compares two arrays of the same size. </p> <pre class="wiki"> template&lt;class T, std::size_t N&gt; bool operator== (const array&lt;T,N&gt;&amp; x, const array&lt;T,N&gt;&amp; y) { return std::equal(x.begin(), x.end(), y.begin()); } </pre> </description> <category>Ticket</category> </item> </channel> </rss>