Tech Off Post

Single Post Permalink

View Thread: What's the reasoning behind the behavior of c++ "std::equal"?
  • User profile image
    McMaiersen

    Hi all,

    I was just watching the C9 lecture from Stephan about STL algorithms and functors, and I can't really wrap my head around std::equal!

    I mean, for me the semantics is a bit strange, since what it does is IMHO more like "isPrefixOf(...)" than an equality check. What was the idea behind implementing std::equal as it is? Is the functionname "equal" not a bit misleading for what it really does?

     

     

    Regards,

    Chris