From fe0ef67e52ef4b87dac3c2bb511ff9bca7e18434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Koz=C3=A1r?= Date: Mon, 16 Mar 2020 14:45:55 +0100 Subject: [PATCH] Fix build with GCC 8.2.0 (#15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix build with GCC 8.2.0 Co-authored-by: Gábor Kozár --- include/toml++/toml_parser_impl.h | 4 ++-- toml.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/toml++/toml_parser_impl.h b/include/toml++/toml_parser_impl.h index e10e6e6..40e73b2 100644 --- a/include/toml++/toml_parser_impl.h +++ b/include/toml++/toml_parser_impl.h @@ -221,8 +221,8 @@ TOML_IMPL_START recording_buffer.clear(); else recording_buffer.erase( - recording_buffer.cbegin() + static_cast(recording_buffer.length() - pop_bytes), - recording_buffer.cend() + recording_buffer.begin() + static_cast(recording_buffer.length() - pop_bytes), + recording_buffer.end() ); } } diff --git a/toml.hpp b/toml.hpp index 2c8129e..319d55d 100644 --- a/toml.hpp +++ b/toml.hpp @@ -6374,8 +6374,8 @@ TOML_IMPL_START recording_buffer.clear(); else recording_buffer.erase( - recording_buffer.cbegin() + static_cast(recording_buffer.length() - pop_bytes), - recording_buffer.cend() + recording_buffer.begin() + static_cast(recording_buffer.length() - pop_bytes), + recording_buffer.end() ); } }