Search:

Type: Posts; User: synss

Search: Search took 0.00 seconds.

  1. Yes it does, I have kept my implementation and...

    Yes it does, I have kept my implementation and modified it according to your comments, I also tried to follow your advice on the insert that takes two iterators (not tested, though).
  2. Whatever... I'll use a boost::tuple to hold my...

    Whatever... I'll use a boost::tuple to hold my key and let the boost people figure out the correct boolean arithmetic.

    Thank all for your help!
  3. I think you have missed parenthesis, I think...

    I think you have missed parenthesis, I think (hope) it is

    bool
    Link::Energy_Lookup_Key::operator<(const Link::Energy_Lookup_Key& rhs) const
    {
    return origin_species_ < rhs.origin_species_...
  4. I would never have thought about it, although now...

    I would never have thought about it, although now that I see it, it makes sense. Thank you very much!
  5. I am back! (sorry) I tried to make a release...

    I am back! (sorry) I tried to make a release build and run it to defeat the checked iterators and see the results,
    1. clearly, the order is not correct in the associative vector (either mine or...
  6. Thank you for taking a look, I noticed these bugs...

    Thank you for taking a look, I noticed these bugs while comparing with Loki's implementation. Loki's fails in the same way in my program, though. I guess sorted vectors just cannot be used without...
  7. I could not find these two when I was looking for...

    I could not find these two when I was looking for something like it. Loki's looks very much like what I have done, so I can compare with mine and maybe find my bug --- if I don't, I'll just try using...
  8. Thank you, I also thought somebody would have...

    Thank you, I also thought somebody would have done it, but I could not find anything I would like to use (I found only one and did not like it, actually) so I went with mine. I do not mean to keep...
  9. elements in iterator range [__first, __last) are not partitioned

    I have written an "associative vector" following Matt Austern, http://lafstern.org/matt/col1.pdf and Scott Meyers, Effective STL, Item 24. I have debugged it by comparing its results with...
  10. Replies
    3
    Views
    3,119

    Thank you! I did not think about it and pointers...

    Thank you! I did not think about it and pointers to member functions are not trivial... I'll use this solution with a comment and a good name.

    std::tr1::bind is equivalent to boost::bind, it...
  11. Replies
    3
    Views
    3,119

    bind on member functions of stl containers

    Hi,

    I would like to accomplish


    #include <tr1/functional>
    #include <iostream>
    #include <vector>
    #include <set>
    #include <algorithm>
  12. Thank you all for your input. I would actually...

    Thank you all for your input. I would actually need to define 3 keys for my program, so for now, I just do not use inheritance at all and define all 3 keys independently. It would improve clarity to...
  13. Design problem: std::map, custom key, inheritance

    I would like to derive classes from an ABC, the main difference between the children would be the key (a nested class in the ABC) to access data stored into a std::map member. Here is some test-code...
Results 1 to 13 of 13