mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
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:
parent
2e94541fcf
commit
10df83d292
@ -343,16 +343,18 @@ namespace details
|
|||||||
};
|
};
|
||||||
}} // namespace gsl::details
|
}} // namespace gsl::details
|
||||||
|
|
||||||
|
namespace std
|
||||||
|
{
|
||||||
template <class Type>
|
template <class Type>
|
||||||
struct std::pointer_traits<::gsl::details::span_iterator<Type>> {
|
struct pointer_traits<::gsl::details::span_iterator<Type>>
|
||||||
using pointer = ::gsl::details::span_iterator<Type>;
|
{
|
||||||
using element_type = Type;
|
using pointer = ::gsl::details::span_iterator<Type>;
|
||||||
|
using element_type = Type;
|
||||||
using difference_type = ptrdiff_t;
|
using difference_type = ptrdiff_t;
|
||||||
|
|
||||||
static constexpr element_type* to_address(const pointer i) noexcept {
|
static constexpr element_type* to_address(const pointer i) noexcept { return i.current_; }
|
||||||
return i.current_;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
} // namespace std
|
||||||
|
|
||||||
namespace gsl { namespace details {
|
namespace gsl { namespace details {
|
||||||
template <std::size_t Ext>
|
template <std::size_t Ext>
|
||||||
|
Loading…
Reference in New Issue
Block a user