Ignore:
Timestamp:
Apr 30, 2012, 7:58:27 AM (10 years ago)
Author:
Peter
Message:

avoid obscure code example

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/stl_utility.h

    r2730 r2731  
    110110     ...
    111111     Dereferencer<MyClass*> dereferencer;
    112      std::sort(boost::make_transform_iterator(vec.begin(), dereferencer),
    113                boost::make_transform_iterator(vec.end(), dereferencer))
     112     std::set<MyClass> s;
     113     s.insert(boost::make_transform_iterator(vec.begin(), dereferencer),
     114              boost::make_transform_iterator(vec.end(), dereferencer))
    114115     \endcode
    115116
    116      where elements in vec is sorted using MyClass::operator<
     117     where elements in vec<MyClass*> are copied in to set<MyClass>.
    117118
    118119     \since New in yat 0.7
Note: See TracChangeset for help on using the changeset viewer.