Lines 92-103
Link Here
|
92 |
friend void deleteAllValues<>(const HashSet&); |
92 |
friend void deleteAllValues<>(const HashSet&); |
93 |
friend void fastDeleteAllValues<>(const HashSet&); |
93 |
friend void fastDeleteAllValues<>(const HashSet&); |
94 |
|
94 |
|
95 |
#if COMPILER(MSVC) && _MSC_VER >= 1700 |
95 |
#if (COMPILER(MSVC) && _MSC_VER >= 1700) || (__cplusplus >= 201402L) |
96 |
// MSVC2012/MSVC2013 has trouble constructing a HashTableConstIteratorAdapter from a |
96 |
// MSVC2012/MSVC2013 has trouble constructing a HashTableConstIteratorAdapter from a |
97 |
// HashTableIterator despite the existence of a const_iterator cast method on the latter class. |
97 |
// HashTableIterator despite the existence of a const_iterator cast method on the latter class. |
98 |
pair<iterator, bool> iterator_const_cast(const pair<typename HashTableType::iterator, bool>& p) |
98 |
pair<iterator, bool> iterator_const_cast(const pair<typename HashTableType::iterator, bool>& p) |
99 |
{ |
99 |
{ |
100 |
return make_pair(iterator(HashTableType::const_iterator(p.first)), p.second); |
100 |
return make_pair(iterator(typename HashTableType::const_iterator(p.first)), p.second); |
101 |
} |
101 |
} |
102 |
#endif |
102 |
#endif |
103 |
HashTableType m_impl; |
103 |
HashTableType m_impl; |
Lines 185-191
Link Here
|
185 |
template<typename T, typename U, typename V> |
185 |
template<typename T, typename U, typename V> |
186 |
inline pair<typename HashSet<T, U, V>::iterator, bool> HashSet<T, U, V>::add(const ValueType& value) |
186 |
inline pair<typename HashSet<T, U, V>::iterator, bool> HashSet<T, U, V>::add(const ValueType& value) |
187 |
{ |
187 |
{ |
188 |
#if COMPILER(MSVC) && _MSC_VER >= 1700 |
188 |
#if (COMPILER(MSVC) && _MSC_VER >= 1700) || (__cplusplus >= 201402L) |
189 |
return iterator_const_cast(m_impl.add(value)); |
189 |
return iterator_const_cast(m_impl.add(value)); |
190 |
#else |
190 |
#else |
191 |
return m_impl.add(value); |
191 |
return m_impl.add(value); |
Lines 198-204
Link Here
|
198 |
HashSet<Value, HashFunctions, Traits>::add(const T& value) |
198 |
HashSet<Value, HashFunctions, Traits>::add(const T& value) |
199 |
{ |
199 |
{ |
200 |
typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter; |
200 |
typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter; |
201 |
#if COMPILER(MSVC) && _MSC_VER >= 1700 |
201 |
#if (COMPILER(MSVC) && _MSC_VER >= 1700) || (__cplusplus >= 201402L) |
202 |
return iterator_const_cast(m_impl.template addPassingHashCode<T, T, Adapter>(value, value)); |
202 |
return iterator_const_cast(m_impl.template addPassingHashCode<T, T, Adapter>(value, value)); |
203 |
#else |
203 |
#else |
204 |
return m_impl.template addPassingHashCode<T, T, Adapter>(value, value); |
204 |
return m_impl.template addPassingHashCode<T, T, Adapter>(value, value); |