By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,797 Members | 1,848 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,797 IT Pros & Developers. It's quick & easy.

std::vector and operator==

P: n/a
How does operator== work for std::vector (or in fact for any standard
container?). My guess would be that it v == w returns true iff v.size() =
w.size() and v[n]==w[n] for all valid n. Is this true? I've looked in the SGI
documentation (which was mystifying) and in TiC2 (which didn't help).

Thanks!

Tom
Nov 1 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Tom Smith wrote:
How does operator== work for std::vector (or in fact for any standard
container?). My guess would be that it v == w returns true iff v.size()
= w.size() and v[n]==w[n] for all valid n. Is this true? I've looked in
the SGI documentation (which was mystifying) and in TiC2 (which didn't
help).

Thanks!

Tom
The SGI docs seem pretty clear to me:

http://www.sgi.com/tech/stl/ForwardContainer.html
Nov 1 '06 #2

P: n/a
Mark P wrote:
Tom Smith wrote:
>How does operator== work for std::vector (or in fact for any standard
container?). My guess would be that it v == w returns true iff
v.size() = w.size() and v[n]==w[n] for all valid n. Is this true? I've
looked in the SGI documentation (which was mystifying) and in TiC2
(which didn't help).

Thanks!

Tom

The SGI docs seem pretty clear to me:

http://www.sgi.com/tech/stl/ForwardContainer.html
Gosh, you're right. I stopped reading just before the relevant section because I
couldn't make head or tail of it - that'll teach me.

Thanks,
Tom
Nov 1 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.