CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: laserlight

Search: Search took 0.48 seconds.

  1. Re: std::set and struct - can they work together?

    Strictly speaking, operator== can be implemented in terms of operator< so that is not absolutely true, but if you intend to make use of the convenience provided using namespace std::rel_ops; then...
  2. Re: std::set and struct - can they work together?

    Personally, I would dispense with the ternary operator as I think that it would suffice to write:

    bool operator< (const pthread_t& lhs, const pthread_t& rhs)
    {
    return memcmp(lhs.p, rhs.p,...
  3. Re: std::set and struct - can they work together?

    You don't seem to have overloaded operator< for your struct type in the first place, but yes, you can indeed use another comparator besides operator< if you desire as the second template parameter...
Results 1 to 3 of 3





Click Here to Expand Forum to Full Width

Featured