Skip to content

Commit

Permalink
Remove workaround for libstdc++4.8 in linear_map
Browse files Browse the repository at this point in the history
The minimum version for the library is upgraded to 4.9.
Issue #142.
  • Loading branch information
rakhimov committed Aug 4, 2016
1 parent 030920d commit 62cbd13
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/linear_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,10 @@ struct DefaultEraser {
/// @returns The iterator as the result of call to the container's ``erase``.
///
/// @{
template <class T>
static typename T::iterator erase(typename T::iterator it, T* container) {
template <class T, class Iterator>
static typename T::iterator erase(Iterator it, T* container) {
return container->erase(it);
}
template <class T> // Workaround for the C++11 bug in libstdc++ 4.8.
static typename T::iterator erase(typename T::const_iterator it,
T* container) {
return DefaultEraser::erase(
std::next(container->begin(), std::distance(container->cbegin(), it)),
container);
}
/// @}
};

Expand Down

0 comments on commit 62cbd13

Please sign in to comment.