Changeset 3598


Ignore:
Timestamp:
Jan 22, 2017, 12:17:40 PM (7 years ago)
Author:
Peter
Message:

implement make_segment. closes #834

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/segment.cc

    r3550 r3598  
    3535void test_insert(test::Suite&);
    3636void test_insert_merge(test::Suite&);
     37void test_make_segment(test::Suite&);
    3738void test_segment(test::Suite& suite);
    3839void test_operator(test::Suite& suite);
     
    5253  test_insert(suite);
    5354  test_insert_merge(suite);
     55  test_make_segment(suite);
    5456  test_segment(suite);
    5557  test_set_bound(suite);
     
    211213}
    212214
     215
     216void make_segment_foo(Segment<int> seg)
     217{
     218}
     219
     220
     221void test_make_segment(test::Suite& suite)
     222{
     223  make_segment_foo(make_segment(12, 18));
     224}
     225
     226
    213227void test_set_bound(test::Suite& suite)
    214228{
  • trunk/yat/utility/Segment.h

    r3550 r3598  
    9494    //Segment& operator=(const Segment&);
    9595  };
     96
     97
     98  /**
     99     \return Segment<T>
     100
     101     \since ney in yat 0.15
     102   */
     103  template<typename T>
     104  Segment<T> make_segment(T first, T last)
     105  {
     106    return Segment<T>(first, last);
     107  }
    96108
    97109
Note: See TracChangeset for help on using the changeset viewer.