diff --git a/lib/include/irritator/container.hpp b/lib/include/irritator/container.hpp index a57e3d2e..e9e9811a 100644 --- a/lib/include/irritator/container.hpp +++ b/lib/include/irritator/container.hpp @@ -3088,7 +3088,7 @@ ring_buffer::iterator_base::iterator_base( template template -ring_buffer::template iterator_base& +typename ring_buffer::template iterator_base& ring_buffer::iterator_base::operator=( const iterator_base& other) noexcept { @@ -3118,7 +3118,7 @@ ring_buffer::iterator_base::operator->() const noexcept template template -ring_buffer::template iterator_base& +typename ring_buffer::template iterator_base& ring_buffer::iterator_base::operator++() noexcept { if (ring) { @@ -3133,7 +3133,7 @@ ring_buffer::iterator_base::operator++() noexcept template template -ring_buffer::template iterator_base +typename ring_buffer::template iterator_base ring_buffer::iterator_base::operator++(int) noexcept { iterator_base orig(*this); @@ -3144,7 +3144,7 @@ ring_buffer::iterator_base::operator++(int) noexcept template template -ring_buffer::template iterator_base& +typename ring_buffer::template iterator_base& ring_buffer::iterator_base::operator--() noexcept { if (ring) { @@ -3159,7 +3159,7 @@ ring_buffer::iterator_base::operator--() noexcept template template -ring_buffer::template iterator_base +typename ring_buffer::template iterator_base ring_buffer::iterator_base::operator--(int) noexcept { iterator_base orig(*this); @@ -4177,7 +4177,7 @@ small_ring_buffer::iterator_base::iterator_base( template template -small_ring_buffer::template iterator_base& +typename small_ring_buffer::template iterator_base& small_ring_buffer::iterator_base::operator=( const iterator_base& other) noexcept { @@ -4210,7 +4210,7 @@ small_ring_buffer::iterator_base::operator->() template template -small_ring_buffer::template iterator_base& +typename small_ring_buffer::template iterator_base& small_ring_buffer::iterator_base::operator++() noexcept { if (ring) { @@ -4225,7 +4225,7 @@ small_ring_buffer::iterator_base::operator++() noexcept template template -small_ring_buffer::template iterator_base +typename small_ring_buffer::template iterator_base small_ring_buffer::iterator_base::operator++(int) noexcept { iterator_base orig(*this); @@ -4236,7 +4236,7 @@ small_ring_buffer::iterator_base::operator++(int) noexcept template template -small_ring_buffer::template iterator_base& +typename small_ring_buffer::template iterator_base& small_ring_buffer::iterator_base::operator--() noexcept { if (ring) { @@ -4251,7 +4251,7 @@ small_ring_buffer::iterator_base::operator--() noexcept template template -small_ring_buffer::template iterator_base +typename small_ring_buffer::template iterator_base small_ring_buffer::iterator_base::operator--(int) noexcept { iterator_base orig(*this); diff --git a/lib/include/irritator/error.hpp b/lib/include/irritator/error.hpp index bff98e88..6f3bde72 100644 --- a/lib/include/irritator/error.hpp +++ b/lib/include/irritator/error.hpp @@ -7,6 +7,7 @@ #include +#include #include #define BOOST_LEAF_EMBEDDED @@ -71,7 +72,16 @@ struct argument_error {}; struct filesystem_error {}; struct e_file_name { - std::string value; + e_file_name() noexcept = default; + + e_file_name(std::string_view str) noexcept + { + const auto len = str.size() > sizeof value ? sizeof value : str.size(); + + std::uninitialized_copy_n(str.data(), len, value); + } + + char value[64]; }; struct e_memory { @@ -85,8 +95,18 @@ struct e_allocator { }; struct e_json { + e_json() noexcept = default; + + e_json(long long unsigned int offset_, std::string_view str) noexcept + { + const auto len = + str.size() > sizeof error_code ? sizeof error_code : str.size(); + + std::uninitialized_copy_n(str.data(), len, error_code); + } + long long unsigned int offset; - std::string_view error_code; + char error_code[24]; }; struct e_ulong_id {