Changeset 4028 for branches/0.18-stable


Ignore:
Timestamp:
Jan 18, 2021, 1:46:27 PM (2 years ago)
Author:
Peter
Message:

fixes #970

Location:
branches/0.18-stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/0.18-stable/NEWS

    r4020 r4028  
    66
    77version 0.18.1 (released NOT YET)
     8  - SegmentTree::key_comp() and ::value_comp() now compile (bug #970).
    89
    910  A complete list of closed tickets can be found here [[br]]
  • branches/0.18-stable/test/segment.cc

    r3661 r4028  
    3030using namespace theplu::yat;
    3131using namespace utility;
     32void test_comp(test::Suite& suite);
    3233void test_compare(test::Suite& suite);
    3334void test_count(test::Suite&);
     
    5152  test::Suite suite(argc, argv);
    5253
     54  test_comp(suite);
    5355  test_compare(suite);
    5456  test_count(suite);
     
    6668
    6769  return suite.return_value();
     70}
     71
     72
     73void test_comp(test::Suite& suite)
     74{
     75  {
     76    SegmentSet<double> set;
     77    SegmentSet<double>::key_compare kcompare = set.key_comp();
     78    test::avoid_compiler_warning(kcompare);
     79    SegmentSet<double>::value_compare vcompare = set.value_comp();
     80    test::avoid_compiler_warning(vcompare);
     81  }
     82
     83  {
     84    SegmentMap<double, std::string> map;
     85    SegmentMap<double, std::string>::key_compare kcompare = map.key_comp();
     86    test::avoid_compiler_warning(kcompare);
     87    SegmentMap<double, std::string>::value_compare vcompare = map.value_comp();
     88    test::avoid_compiler_warning(vcompare);
     89  }
    6890}
    6991
  • branches/0.18-stable/yat/utility/SegmentTree.h

    r3114 r4028  
    184184    key_compare key_comp(void) const
    185185    {
    186       return key_compare(compare);
     186      return container_.key_comp();
    187187    }
    188188
     
    226226       \c values
    227227     */
    228     value_compare value_comp(void) const { return key_comp(); }
     228    value_compare value_comp(void) const { return container_.value_comp(); }
    229229
    230230  protected:
Note: See TracChangeset for help on using the changeset viewer.