Update memchunk.h

Add a macro for compile with GCC and other Linux compiler.
This commit is contained in:
pengweichu 2017-08-02 11:02:26 +08:00 committed by GitHub
parent a41a230fdc
commit b7afab80a4
1 changed files with 6 additions and 2 deletions

View File

@ -83,10 +83,14 @@ template <size_t N> struct Memchunk {
void reset() { pos = last = std::begin(buf); } void reset() { pos = last = std::begin(buf); }
std::array<uint8_t, N> buf; std::array<uint8_t, N> buf;
#if defined(_MSC_VER)
std::_Array_iterator<uint8_t, N> pos; std::_Array_iterator<uint8_t, N> pos;
std::_Array_iterator<uint8_t, N> last; std::_Array_iterator<uint8_t, N> last;
#else
// uint8_t *pos, *last; uint8_t *pos, *last;
#endif
Memchunk *knext; Memchunk *knext;
Memchunk *next; Memchunk *next;
static const size_t size = N; static const size_t size = N;