remove gsl namespace qualification within the gsl namespace

This commit is contained in:
Jordan Maples 2020-07-15 13:11:57 -07:00
parent 301030310e
commit 4c66cea06c
2 changed files with 23 additions and 23 deletions

View File

@ -100,7 +100,7 @@ namespace details
template <std::size_t From, std::size_t To>
struct is_allowed_extent_conversion
: std::integral_constant<bool, From == To || To == gsl::dynamic_extent>
: std::integral_constant<bool, From == To || To == dynamic_extent>
{
};
@ -421,24 +421,24 @@ public:
constexpr span() noexcept : storage_(nullptr, details::extent_type<0>())
{}
template <std::size_t MyExtent = Extent, std::enable_if_t<MyExtent != gsl::dynamic_extent, int> = 0>
template <std::size_t MyExtent = Extent, std::enable_if_t<MyExtent != dynamic_extent, int> = 0>
constexpr explicit span(pointer ptr, size_type count) noexcept : storage_(ptr, count)
{
Expects(count == Extent);
}
template <std::size_t MyExtent = Extent, std::enable_if_t<MyExtent == gsl::dynamic_extent, int> = 0>
template <std::size_t MyExtent = Extent, std::enable_if_t<MyExtent == dynamic_extent, int> = 0>
constexpr span(pointer ptr, size_type count) noexcept : storage_(ptr, count)
{}
template <std::size_t MyExtent = Extent, std::enable_if_t<MyExtent != gsl::dynamic_extent, int> = 0>
template <std::size_t MyExtent = Extent, std::enable_if_t<MyExtent != dynamic_extent, int> = 0>
constexpr explicit span(pointer firstElem, pointer lastElem) noexcept
: storage_(firstElem, static_cast<std::size_t>(lastElem - firstElem))
{
Expects(lastElem - firstElem == static_cast<difference_type>(Extent));
}
template <std::size_t MyExtent = Extent, std::enable_if_t<MyExtent == gsl::dynamic_extent, int> = 0>
template <std::size_t MyExtent = Extent, std::enable_if_t<MyExtent == dynamic_extent, int> = 0>
constexpr span(pointer firstElem, pointer lastElem) noexcept
: storage_(firstElem, static_cast<std::size_t>(lastElem - firstElem))
{}

View File

@ -471,7 +471,7 @@ bool operator==(const T& one, const gsl::basic_string_span<CharT, Extent>& other
}
// operator !=
template <typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
template <typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename = std::enable_if_t<std::is_convertible<
T, gsl::basic_string_span<std::add_const_t<CharT>, Extent>>::value>>
bool operator!=(gsl::basic_string_span<CharT, Extent> one, const T& other)
@ -480,7 +480,7 @@ bool operator!=(gsl::basic_string_span<CharT, Extent> one, const T& other)
}
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename = std::enable_if_t<
std::is_convertible<T, gsl::basic_string_span<std::add_const_t<CharT>, Extent>>::value &&
!gsl::details::is_basic_string_span<T>::value>>
@ -490,7 +490,7 @@ bool operator!=(const T& one, gsl::basic_string_span<CharT, Extent> other)
}
// operator<
template <typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
template <typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename = std::enable_if_t<std::is_convertible<
T, gsl::basic_string_span<std::add_const_t<CharT>, Extent>>::value>>
bool operator<(gsl::basic_string_span<CharT, Extent> one, const T& other)
@ -500,7 +500,7 @@ bool operator<(gsl::basic_string_span<CharT, Extent> one, const T& other)
}
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename = std::enable_if_t<
std::is_convertible<T, gsl::basic_string_span<std::add_const_t<CharT>, Extent>>::value &&
!gsl::details::is_basic_string_span<T>::value>>
@ -516,7 +516,7 @@ bool operator<(const T& one, gsl::basic_string_span<CharT, Extent> other)
// so the cases below are already covered by the previous operators
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename DataType = typename T::value_type,
typename = std::enable_if_t<
!gsl::details::is_span<T>::value && !gsl::details::is_basic_string_span<T>::value &&
@ -530,7 +530,7 @@ bool operator<(gsl::basic_string_span<CharT, Extent> one, const T& other)
}
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename DataType = typename T::value_type,
typename = std::enable_if_t<
!gsl::details::is_span<T>::value && !gsl::details::is_basic_string_span<T>::value &&
@ -545,7 +545,7 @@ bool operator<(const T& one, gsl::basic_string_span<CharT, Extent> other)
#endif
// operator <=
template <typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
template <typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename = std::enable_if_t<std::is_convertible<
T, gsl::basic_string_span<std::add_const_t<CharT>, Extent>>::value>>
bool operator<=(gsl::basic_string_span<CharT, Extent> one, const T& other)
@ -554,7 +554,7 @@ bool operator<=(gsl::basic_string_span<CharT, Extent> one, const T& other)
}
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename = std::enable_if_t<
std::is_convertible<T, gsl::basic_string_span<std::add_const_t<CharT>, Extent>>::value &&
!gsl::details::is_basic_string_span<T>::value>>
@ -569,7 +569,7 @@ bool operator<=(const T& one, gsl::basic_string_span<CharT, Extent> other)
// so the cases below are already covered by the previous operators
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename DataType = typename T::value_type,
typename = std::enable_if_t<
!gsl::details::is_span<T>::value && !gsl::details::is_basic_string_span<T>::value &&
@ -582,7 +582,7 @@ bool operator<=(gsl::basic_string_span<CharT, Extent> one, const T& other)
}
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename DataType = typename T::value_type,
typename = std::enable_if_t<
!gsl::details::is_span<T>::value && !gsl::details::is_basic_string_span<T>::value &&
@ -596,7 +596,7 @@ bool operator<=(const T& one, gsl::basic_string_span<CharT, Extent> other)
#endif
// operator>
template <typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
template <typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename = std::enable_if_t<std::is_convertible<
T, gsl::basic_string_span<std::add_const_t<CharT>, Extent>>::value>>
bool operator>(gsl::basic_string_span<CharT, Extent> one, const T& other)
@ -605,7 +605,7 @@ bool operator>(gsl::basic_string_span<CharT, Extent> one, const T& other)
}
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename = std::enable_if_t<
std::is_convertible<T, gsl::basic_string_span<std::add_const_t<CharT>, Extent>>::value &&
!gsl::details::is_basic_string_span<T>::value>>
@ -620,7 +620,7 @@ bool operator>(const T& one, gsl::basic_string_span<CharT, Extent> other)
// so the cases below are already covered by the previous operators
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename DataType = typename T::value_type,
typename = std::enable_if_t<
!gsl::details::is_span<T>::value && !gsl::details::is_basic_string_span<T>::value &&
@ -633,7 +633,7 @@ bool operator>(gsl::basic_string_span<CharT, Extent> one, const T& other)
}
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename DataType = typename T::value_type,
typename = std::enable_if_t<
!gsl::details::is_span<T>::value && !gsl::details::is_basic_string_span<T>::value &&
@ -647,7 +647,7 @@ bool operator>(const T& one, gsl::basic_string_span<CharT, Extent> other)
#endif
// operator >=
template <typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
template <typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename = std::enable_if_t<std::is_convertible<
T, gsl::basic_string_span<std::add_const_t<CharT>, Extent>>::value>>
bool operator>=(gsl::basic_string_span<CharT, Extent> one, const T& other)
@ -656,7 +656,7 @@ bool operator>=(gsl::basic_string_span<CharT, Extent> one, const T& other)
}
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename = std::enable_if_t<
std::is_convertible<T, gsl::basic_string_span<std::add_const_t<CharT>, Extent>>::value &&
!gsl::details::is_basic_string_span<T>::value>>
@ -671,7 +671,7 @@ bool operator>=(const T& one, gsl::basic_string_span<CharT, Extent> other)
// so the cases below are already covered by the previous operators
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename DataType = typename T::value_type,
typename = std::enable_if_t<
!gsl::details::is_span<T>::value && !gsl::details::is_basic_string_span<T>::value &&
@ -684,7 +684,7 @@ bool operator>=(gsl::basic_string_span<CharT, Extent> one, const T& other)
}
template <
typename CharT, std::size_t Extent = gsl::dynamic_extent, typename T,
typename CharT, std::size_t Extent = dynamic_extent, typename T,
typename DataType = typename T::value_type,
typename = std::enable_if_t<
!gsl::details::is_span<T>::value && !gsl::details::is_basic_string_span<T>::value &&