@@ -30,21 +30,21 @@ class ordered
3030{
3131public:
3232 typedef std::list<T> container_type;
33- typedef typename container_type::value_type value_type;
34- typedef typename container_type::size_type size_type;
35- typedef typename container_type::difference_type difference_type;
33+ using value_type = typename container_type::value_type;
34+ using size_type = typename container_type::size_type;
35+ using difference_type = typename container_type::difference_type;
3636
37- typedef typename container_type::reference reference;
38- typedef typename container_type::const_reference const_reference;
37+ using reference = typename container_type::reference;
38+ using const_reference = typename container_type::const_reference;
3939
40- typedef typename container_type::pointer pointer;
41- typedef typename container_type::const_pointer const_pointer;
40+ using pointer = typename container_type::pointer;
41+ using const_pointer = typename container_type::const_pointer;
4242
43- typedef typename container_type::iterator iterator;
44- typedef typename container_type::const_iterator const_iterator;
43+ using iterator = typename container_type::iterator;
44+ using const_iterator = typename container_type::const_iterator;
4545
46- typedef typename container_type::reverse_iterator reverse_iterator;
47- typedef typename container_type::const_reverse_iterator const_reverse_iterator;
46+ using reverse_iterator = typename container_type::reverse_iterator;
47+ using const_reverse_iterator = typename container_type::const_reverse_iterator;
4848
4949protected:
5050 container_type c;
@@ -133,7 +133,7 @@ namespace detail {
133133template <typename ValueType, typename CostType>
134134struct ItemCostPair : std::pair<ValueType, CostType>
135135{
136- typedef CostType cost_type;
136+ using cost_type = CostType ;
137137
138138 ItemCostPair (const std::pair<ValueType, CostType>& other) : std::pair<ValueType, CostType>(other) {}
139139 ItemCostPair (std::pair<ValueType, CostType>&& other) : std::pair<ValueType, CostType>(std::move(other)) {}
@@ -153,7 +153,7 @@ template <typename ValueType, typename CostType = double,
153153 typename Compare = std::less<detail::ItemCostPair<ValueType, CostType>>>
154154class cost_ordered : public ordered <detail::ItemCostPair<ValueType, CostType>, Compare>
155155{
156- typedef ordered<detail::ItemCostPair<ValueType, CostType>, Compare> base_type ;
156+ using base_type = ordered<detail::ItemCostPair<ValueType, CostType>, Compare>;
157157
158158public:
159159 auto insert (const ValueType& value, const CostType cost) { return base_type::insert (std::make_pair (value, cost)); }
0 commit comments