зеркало из https://github.com/microsoft/GSL.git
solve span compile problem with gcc 5.5.0 (#1052)
GCC 4.8.0 - 7.0 has a bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480) involving specialization in a namespace enclosing the specialized template. This PR fixes an appearance of this bug in the span header.
This commit is contained in:
Родитель
2e94541fcf
Коммит
10df83d292
|
@ -343,16 +343,18 @@ namespace details
|
|||
};
|
||||
}} // namespace gsl::details
|
||||
|
||||
namespace std
|
||||
{
|
||||
template <class Type>
|
||||
struct std::pointer_traits<::gsl::details::span_iterator<Type>> {
|
||||
using pointer = ::gsl::details::span_iterator<Type>;
|
||||
using element_type = Type;
|
||||
struct pointer_traits<::gsl::details::span_iterator<Type>>
|
||||
{
|
||||
using pointer = ::gsl::details::span_iterator<Type>;
|
||||
using element_type = Type;
|
||||
using difference_type = ptrdiff_t;
|
||||
|
||||
static constexpr element_type* to_address(const pointer i) noexcept {
|
||||
return i.current_;
|
||||
}
|
||||
static constexpr element_type* to_address(const pointer i) noexcept { return i.current_; }
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
namespace gsl { namespace details {
|
||||
template <std::size_t Ext>
|
||||
|
|
Загрузка…
Ссылка в новой задаче