Skip to content

Commit

Permalink
macos: fixes various missing typename for appleclang
Browse files Browse the repository at this point in the history
  • Loading branch information
quesnel committed Jan 29, 2024
1 parent a972a26 commit 5bff9ae
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
20 changes: 10 additions & 10 deletions lib/include/irritator/container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3088,7 +3088,7 @@ ring_buffer<T, A>::iterator_base<is_const>::iterator_base(

template<class T, typename A>
template<bool is_const>
ring_buffer<T, A>::template iterator_base<is_const>&
typename ring_buffer<T, A>::template iterator_base<is_const>&
ring_buffer<T, A>::iterator_base<is_const>::operator=(
const iterator_base& other) noexcept
{
Expand Down Expand Up @@ -3118,7 +3118,7 @@ ring_buffer<T, A>::iterator_base<is_const>::operator->() const noexcept

template<class T, typename A>
template<bool is_const>
ring_buffer<T, A>::template iterator_base<is_const>&
typename ring_buffer<T, A>::template iterator_base<is_const>&
ring_buffer<T, A>::iterator_base<is_const>::operator++() noexcept
{
if (ring) {
Expand All @@ -3133,7 +3133,7 @@ ring_buffer<T, A>::iterator_base<is_const>::operator++() noexcept

template<class T, typename A>
template<bool is_const>
ring_buffer<T, A>::template iterator_base<is_const>
typename ring_buffer<T, A>::template iterator_base<is_const>
ring_buffer<T, A>::iterator_base<is_const>::operator++(int) noexcept
{
iterator_base orig(*this);
Expand All @@ -3144,7 +3144,7 @@ ring_buffer<T, A>::iterator_base<is_const>::operator++(int) noexcept

template<class T, typename A>
template<bool is_const>
ring_buffer<T, A>::template iterator_base<is_const>&
typename ring_buffer<T, A>::template iterator_base<is_const>&
ring_buffer<T, A>::iterator_base<is_const>::operator--() noexcept
{
if (ring) {
Expand All @@ -3159,7 +3159,7 @@ ring_buffer<T, A>::iterator_base<is_const>::operator--() noexcept

template<class T, typename A>
template<bool is_const>
ring_buffer<T, A>::template iterator_base<is_const>
typename ring_buffer<T, A>::template iterator_base<is_const>
ring_buffer<T, A>::iterator_base<is_const>::operator--(int) noexcept
{
iterator_base orig(*this);
Expand Down Expand Up @@ -4177,7 +4177,7 @@ small_ring_buffer<T, length>::iterator_base<is_const>::iterator_base(

template<class T, int length>
template<bool is_const>
small_ring_buffer<T, length>::template iterator_base<is_const>&
typename small_ring_buffer<T, length>::template iterator_base<is_const>&
small_ring_buffer<T, length>::iterator_base<is_const>::operator=(
const iterator_base& other) noexcept
{
Expand Down Expand Up @@ -4210,7 +4210,7 @@ small_ring_buffer<T, length>::iterator_base<is_const>::operator->()

template<class T, int length>
template<bool is_const>
small_ring_buffer<T, length>::template iterator_base<is_const>&
typename small_ring_buffer<T, length>::template iterator_base<is_const>&
small_ring_buffer<T, length>::iterator_base<is_const>::operator++() noexcept
{
if (ring) {
Expand All @@ -4225,7 +4225,7 @@ small_ring_buffer<T, length>::iterator_base<is_const>::operator++() noexcept

template<class T, int length>
template<bool is_const>
small_ring_buffer<T, length>::template iterator_base<is_const>
typename small_ring_buffer<T, length>::template iterator_base<is_const>
small_ring_buffer<T, length>::iterator_base<is_const>::operator++(int) noexcept
{
iterator_base orig(*this);
Expand All @@ -4236,7 +4236,7 @@ small_ring_buffer<T, length>::iterator_base<is_const>::operator++(int) noexcept

template<class T, int length>
template<bool is_const>
small_ring_buffer<T, length>::template iterator_base<is_const>&
typename small_ring_buffer<T, length>::template iterator_base<is_const>&
small_ring_buffer<T, length>::iterator_base<is_const>::operator--() noexcept
{
if (ring) {
Expand All @@ -4251,7 +4251,7 @@ small_ring_buffer<T, length>::iterator_base<is_const>::operator--() noexcept

template<class T, int length>
template<bool is_const>
small_ring_buffer<T, length>::template iterator_base<is_const>
typename small_ring_buffer<T, length>::template iterator_base<is_const>
small_ring_buffer<T, length>::iterator_base<is_const>::operator--(int) noexcept
{
iterator_base orig(*this);
Expand Down
24 changes: 22 additions & 2 deletions lib/include/irritator/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <irritator/macros.hpp>

#include <memory>
#include <string_view>

#define BOOST_LEAF_EMBEDDED
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 5bff9ae

Please sign in to comment.