Topic: bool is_a_subset_of( const std::set<T>& superset, const std::set<T>&


Author: hyrosen@mail.com (Hyman Rosen)
Date: Wed, 4 Sep 2002 18:47:31 +0000 (UTC)
Raw View
Ken Alverson wrote:
> Huh...there it is.  Why doesn't it have a "set_" prefix like all the
> other set algorithms?

Because it's applicable to more than sets.
The whole point of STL was to separate algorithms from containers.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: Hyman Rosen <hyrosen@mail.com>
Date: 28 Aug 2002 20:50:15 GMT
Raw View
Ilya Besov wrote:
> It seems to be strange though that a function
> like that does not exist.

It does exist. It's called std::includes.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]