When building for ESP32, got an error: 'is nothrow copy_constructible_v' is not a member of 'std'

Hi, sorry if this might be more of an ESP-IDF question, but I’m trying to compile a ring buffer implementation which I got from this site: C++ Ring buffer. The code uses type_traits which should be available for the ESP IDF version 4.6 which comes with PlatformIO. Jumping to definition leads me to the implementation in toolchain-xtensa-esp32@8.4.0 and I can see the definitions inside the type_traits file. I’ve place the source code both under lib/ringbuffer as well as in the src directory. My platformio.ini file looks like this:

[env:m5stick-c]
platform = espressif32
board = m5stick-c
framework = arduino, espidf
lib_deps = 
	m5stack/M5Unified@^0.1.12
	wnatth3/WiFiManager@^2.0.16-rc.2
	bblanchon/ArduinoJson@^7.0.4
monitor_raw = yes
monitor_speed = 115200
board_build.partitions = partitions.csv
board_upload.flash_size  = 8MB
board_upload.maximum_size = 8388608
build_flags = 
	-DLOG_LOCAL_LEVEL=ESP_LOG_VERBOSE
	-std=c++14
build_unflags = -std=c++11

Right now, I’m getting the following errors:

Processing m5stick-c (platform: espressif32; board: m5stick-c; framework: arduino, espidf)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stick-c.html
PLATFORM: Espressif 32 (6.5.0) > M5Stick-C
HARDWARE: ESP32 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) 
 - framework-espidf @ 3.40406.240122 (4.4.6) 
 - tool-cmake @ 3.16.4 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - tool-ninja @ 1.7.1 
 - toolchain-esp32ulp @ 1.23500.220830 (2.35.0) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Warning! Arduino framework as an ESP-IDF component doesn't handle the `variant` field! The default `esp32` variant will be used.
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 39 compatible libraries
Scanning dependencies...
Dependency Graph
|-- M5Unified @ 0.1.13
|-- WiFiManager @ 2.0.16-rc.2
|-- ArduinoJson @ 7.0.4
|-- mfrc522
|-- M5GFX @ 0.1.14
|-- Wire @ 2.0.0
Building in release mode
Compiling .pio/build/m5stick-c/src/main.o
Generating LD script .pio/build/m5stick-c/memory.ld
Compiling .pio/build/m5stick-c/app_trace/app_trace.o
Compiling .pio/build/m5stick-c/app_trace/app_trace_util.o
Compiling .pio/build/m5stick-c/app_trace/host_file_io.o
Compiling .pio/build/m5stick-c/app_trace/gcov/gcov_rtio.o
Compiling .pio/build/m5stick-c/app_update/esp_ota_ops.o
Compiling .pio/build/m5stick-c/app_update/esp_app_desc.o
Compiling .pio/build/m5stick-c/asio/asio/asio/src/asio.o
Archiving .pio/build/m5stick-c/esp-idf/app_update/libapp_update.a
Archiving .pio/build/m5stick-c/esp-idf/app_trace/libapp_trace.a
Indexing .pio/build/m5stick-c/esp-idf/app_trace/libapp_trace.a
Indexing .pio/build/m5stick-c/esp-idf/app_update/libapp_update.a
Compiling .pio/build/m5stick-c/bootloader_support/src/bootloader_common.o
Compiling .pio/build/m5stick-c/bootloader_support/src/bootloader_common_loader.o
Compiling .pio/build/m5stick-c/bootloader_support/src/bootloader_clock_init.o
Compiling .pio/build/m5stick-c/bootloader_support/src/bootloader_flash.o
Compiling .pio/build/m5stick-c/bootloader_support/src/bootloader_mem.o
Compiling .pio/build/m5stick-c/bootloader_support/src/bootloader_random.o
Compiling .pio/build/m5stick-c/bootloader_support/src/bootloader_random_esp32.o
Compiling .pio/build/m5stick-c/bootloader_support/src/bootloader_utility.o
Compiling .pio/build/m5stick-c/bootloader_support/src/esp_image_format.o
Compiling .pio/build/m5stick-c/bootloader_support/src/flash_encrypt.o
Compiling .pio/build/m5stick-c/bootloader_support/src/secure_boot.o
Compiling .pio/build/m5stick-c/bootloader_support/src/flash_partitions.o
Compiling .pio/build/m5stick-c/bootloader_support/src/flash_qio_mode.o
Compiling .pio/build/m5stick-c/bootloader_support/src/bootloader_flash_config_esp32.o
Compiling .pio/build/m5stick-c/bootloader_support/src/bootloader_efuse.o
Compiling .pio/build/m5stick-c/bootloader_support/src/idf/bootloader_sha.o
Compiling .pio/build/m5stick-c/cbor/tinycbor/src/cborencoder_close_container_checked.o
Compiling .pio/build/m5stick-c/cbor/tinycbor/src/cborencoder.o
Compiling .pio/build/m5stick-c/cbor/tinycbor/src/cborerrorstrings.o
Compiling .pio/build/m5stick-c/cbor/tinycbor/src/cborparser_dup_string.o
Archiving .pio/build/m5stick-c/esp-idf/bootloader_support/libbootloader_support.a
Indexing .pio/build/m5stick-c/esp-idf/bootloader_support/libbootloader_support.a
Compiling .pio/build/m5stick-c/cbor/tinycbor/src/cborparser.o
Compiling .pio/build/m5stick-c/cbor/tinycbor/src/cborpretty_stdio.o
Compiling .pio/build/m5stick-c/cbor/tinycbor/src/cborpretty.o
Compiling .pio/build/m5stick-c/cbor/tinycbor/src/cbortojson.o
Compiling .pio/build/m5stick-c/cbor/tinycbor/src/cborvalidation.o
Compiling .pio/build/m5stick-c/cbor/tinycbor/src/open_memstream.o
Compiling .pio/build/m5stick-c/cmock/CMock/src/cmock.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/address.o
Archiving .pio/build/m5stick-c/esp-idf/cbor/libcbor.a
Archiving .pio/build/m5stick-c/esp-idf/cmock/libcmock.a
Indexing .pio/build/m5stick-c/esp-idf/cmock/libcmock.a
Indexing .pio/build/m5stick-c/esp-idf/cbor/libcbor.a
Compiling .pio/build/m5stick-c/coap/libcoap/src/async.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/block.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_asn1.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_cache.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_debug.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_event.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_hashkey.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_io.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_mbedtls.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_notls.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_prng.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_session.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_tcp.o
In file included from src/main.cpp:22:
src/Ringbuffer.hpp:124:59: error: 'is_nothrow_copy_constructible_v' is not a member of 'std'
         ring_buffer(ring_buffer const &rhs) noexcept(std::is_nothrow_copy_constructible_v<value_type>)
                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/Ringbuffer.hpp:124:59: note: suggested alternative: 'is_nothrow_copy_constructible'
         ring_buffer(ring_buffer const &rhs) noexcept(std::is_nothrow_copy_constructible_v<value_type>)
                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                           is_nothrow_copy_constructible
src/Ringbuffer.hpp:124:101: error: expected primary-expression before '>' token
         ring_buffer(ring_buffer const &rhs) noexcept(std::is_nothrow_copy_constructible_v<value_type>)
                                                                                                     ^
src/Ringbuffer.hpp:124:102: error: expected primary-expression before ')' token
         ring_buffer(ring_buffer const &rhs) noexcept(std::is_nothrow_copy_constructible_v<value_type>)
                                                                                                      ^
src/Ringbuffer.hpp:128:70: error: 'is_nothrow_copy_constructible_v' is not a member of 'std'
         ring_buffer &operator=(ring_buffer const &rhs) noexcept(std::is_nothrow_copy_constructible_v<value_type>)
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/Ringbuffer.hpp:128:70: note: suggested alternative: 'is_nothrow_copy_constructible'
         ring_buffer &operator=(ring_buffer const &rhs) noexcept(std::is_nothrow_copy_constructible_v<value_type>)
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                      is_nothrow_copy_constructible
src/Ringbuffer.hpp:128:112: error: expected primary-expression before '>' token
         ring_buffer &operator=(ring_buffer const &rhs) noexcept(std::is_nothrow_copy_constructible_v<value_type>)
                                                                                                                ^
src/Ringbuffer.hpp:128:113: error: expected primary-expression before ')' token
         ring_buffer &operator=(ring_buffer const &rhs) noexcept(std::is_nothrow_copy_constructible_v<value_type>)
                                                                                                                 ^
src/Ringbuffer.hpp: In copy constructor 'buffers::ring_buffer<T, N, Overwrite>::ring_buffer(const buffers::ring_buffer<T, N, Overwrite>&)':
src/Ringbuffer.hpp:126:33: error: 'bool_constant' is not a member of 'std'
             copy_impl(rhs, std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                 ^~~~~~~~~~~~~
src/Ringbuffer.hpp:126:52: error: 'is_trivially_copyable_v' is not a member of 'std'
             copy_impl(rhs, std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                    ^~~~~~~~~~~~~~~~~~~~~~~
src/Ringbuffer.hpp:126:52: note: suggested alternative: 'is_trivially_copyable'
             copy_impl(rhs, std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                    ^~~~~~~~~~~~~~~~~~~~~~~
                                                    is_trivially_copyable
src/Ringbuffer.hpp:126:77: error: expected primary-expression before '>>' token
             copy_impl(rhs, std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                                             ^~
src/Ringbuffer.hpp:126:79: error: expected primary-expression before '{' token
             copy_impl(rhs, std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                                               ^
src/Ringbuffer.hpp: In member function 'buffers::ring_buffer<T, N, Overwrite>& buffers::ring_buffer<T, N, Overwrite>::operator=(const buffers::ring_buffer<T, N, Overwrite>&)':
src/Ringbuffer.hpp:133:30: error: 'bool_constant' is not a member of 'std'
             destroy_all(std::bool_constant<std::is_trivially_copyable_v<T>>{});
                              ^~~~~~~~~~~~~
src/Ringbuffer.hpp:133:49: error: 'is_trivially_copyable_v' is not a member of 'std'
             destroy_all(std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                 ^~~~~~~~~~~~~~~~~~~~~~~
src/Ringbuffer.hpp:133:49: note: suggested alternative: 'is_trivially_copyable'
             destroy_all(std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                 ^~~~~~~~~~~~~~~~~~~~~~~
                                                 is_trivially_copyable
src/Ringbuffer.hpp:133:74: error: expected primary-expression before '>>' token
             destroy_all(std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                                          ^~
src/Ringbuffer.hpp:133:76: error: expected primary-expression before '{' token
             destroy_all(std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                                            ^
src/Ringbuffer.hpp:134:33: error: 'bool_constant' is not a member of 'std'
             copy_impl(rhs, std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                 ^~~~~~~~~~~~~
src/Ringbuffer.hpp:134:52: error: 'is_trivially_copyable_v' is not a member of 'std'
             copy_impl(rhs, std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                    ^~~~~~~~~~~~~~~~~~~~~~~
src/Ringbuffer.hpp:134:52: note: suggested alternative: 'is_trivially_copyable'
             copy_impl(rhs, std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                    ^~~~~~~~~~~~~~~~~~~~~~~
                                                    is_trivially_copyable
src/Ringbuffer.hpp:134:77: error: expected primary-expression before '>>' token
             copy_impl(rhs, std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                                             ^~
src/Ringbuffer.hpp:134:79: error: expected primary-expression before '{' token
             copy_impl(rhs, std::bool_constant<std::is_trivially_copyable_v<T>>{});
                                                                               ^
src/Ringbuffer.hpp: In member function 'void buffers::ring_buffer<T, N, Overwrite>::push_back(U&&)':
src/Ringbuffer.hpp:141:52: error: 'bool_constant' is not a member of 'std'
             push_back(std::forward<U>(value), std::bool_constant<Overwrite>{});
                                                    ^~~~~~~~~~~~~
src/Ringbuffer.hpp:141:76: error: expected primary-expression before '{' token
             push_back(std::forward<U>(value), std::bool_constant<Overwrite>{});
                                                                            ^
src/Ringbuffer.hpp: In member function 'void buffers::ring_buffer<T, N, Overwrite>::pop_front()':
src/Ringbuffer.hpp:148:33: error: 'bool_constant' is not a member of 'std'
             destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                 ^~~~Compiling .pio/build/m5stick-c/coap/libcoap/src/coap_time.o
~~~~~~~~~
src/Ringbuffer.hpp:148:52: error: 'is_trivially_destructible_v' is not a member of 'std'
             destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/Ringbuffer.hpp:148:52: note: suggested alternative: 'is_trivially_destructible'
             destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                    is_trivially_destructible
src/Ringbuffer.hpp:148:90: error: expected primary-expression before '>>' token
             destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                                                          ^~
src/Ringbuffer.hpp:148:92: error: expected primary-expression before '{' token
             destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                                                            ^
src/Ringbuffer.hpp: In member function 'T& buffers::ring_buffer<T, N, Overwrite>::back()':
src/Ringbuffer.hpp:153:101: error: 'clamp' is not a member of 'std'
         [[nodiscard]] reference back() noexcept { return reinterpret_cast<reference>(elements_[std::clamp(head_, 0UL, N - 1)]); }
                                                                                                     ^~~~~
src/Ringbuffer.hpp: In member function 'void buffers::ring_buffer<T, N, Overwrite>::clear()':
src/Ringbuffer.hpp:180:30: error: 'bool_constant' is not a member of 'std'
             destroy_all(std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                              ^~~~~~~~~~~~~
src/Ringbuffer.hpp:180:49: error: 'is_trivially_destructible_v' is not a member of 'std'
             destroy_all(std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/Ringbuffer.hpp:180:49: note: suggested alternative: 'is_trivially_destructible'
             destroy_all(std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                 is_trivially_destructible
src/Ringbuffer.hpp:180:87: error: expected primary-expression before '>>' token
             destroy_all(std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                                                       ^~
src/Ringbuffer.hpp:180:89: error: expected primary-expression before '{' token
             destroy_all(std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                                                         ^
src/Ringbuffer.hpp: In member function 'void buffers::ring_buffer<T, N, Overwrite>::destroy_all(std::false_type)':
src/Ringbuffer.hpp:193:37: error: 'bool_constant' is not a member of 'std'
                 destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                     ^~~~~~~~~~~~~
src/Ringbuffer.hpp:193:56: error: 'is_trivially_destructible_v' is not a member of 'std'
                 destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/Ringbuffer.hpp:193:56: note: suggested alternative: 'is_trivially_destructible'
                 destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                        is_trivially_destructible
src/Ringbuffer.hpp:193:94: error: expected primary-expression before '>>' token
                 destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                                                              ^~
src/Ringbuffer.hpp:193:96: error: expected primary-expression before '{' token
                 destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                                                                ^
src/Ringbuffer.hpp: In member function 'void buffers::ring_buffer<T, N, Overwrite>::copy_impl(const self_type&, std::false_type)':
src/Ringbuffer.hpp:220:41: error: 'bool_constant' is not a member of 'std'
                     destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                         ^~~~~~~~~~~~~
src/Ringbuffer.hpp:220:60: error: 'is_trivially_destructible_v' is not a member of 'std'
                     destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/Ringbuffer.hpp:220:60: note: suggested alternative: 'is_trivially_destructible'
                     destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                            is_trivially_destructible
src/Ringbuffer.hpp:220:98: error: expected primary-expression before '>>' token
                     destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                                                                  ^~
src/Ringbuffer.hpp:220:100: error: expected primary-expression before '{' token
                     destroy(tail_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                                                                    ^
src/Ringbuffer.hpp: In member function 'void buffers::ring_buffer<T, N, Overwrite>::push_back_impl(U&&)':
src/Ringbuffer.hpp:244:37: error: 'bool_constant' is not a member of 'std'
                 destroy(head_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                     ^~~~~~~~~~~~~
src/Ringbuffer.hpp:244:56: error: 'is_trivially_destructible_v' is not a member of 'std'
                 destroy(head_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/Ringbuffer.hpp:244:56: note: suggested alternative: 'is_trivially_destructible'
                 destroy(head_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                        is_trivially_destructible
src/Ringbuffer.hpp:244:94: error: expected primary-expression before '>>' token
                 destroy(head_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                                                              ^~
src/Ringbuffer.hpp:244:96: error: expected primary-expression before '{' token
                 destroy(head_, std::bool_constant<std::is_trivially_destructible_v<value_type>>{});
                                                                                                ^
In file included from src/main.cpp:23:
src/defs.hpp: At global scope:
src/defs.hpp:86:24: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 char *rollcall_topic = "rollcall";
                        ^~~~~~~~~~
src/main.cpp: In function 'std::__cxx11::string lookUpVehicle(int)':
src/main.cpp:858:33: warning: ignoring return value of 'buffers::detail::ring_buffer_iterator<T, N, C, Overwrite>::self_type& buffers::detail::ring_buffer_iterator<T, N, C, Overwrite>::operator++() [with T = tVehicleInfo; unsigned int N = 10; bool C = false; bool Overwrite = true; buffers::detail::ring_buffer_iterator<T, N, C, Overwrite>::self_type = buffers::detail::ring_buffer_iterator<tVehicleInfo, 10, false, true>]', declared with attribute nodiscard [-Wunused-result]
     for (tVehicleInfo vehicle : vehicleCache)
                                 ^~~~~~~~~~~~
In file included from src/main.cpp:22:
src/Ringbuffer.hpp:63:38: note: declared here
             [[nodiscard]] self_type &operator++() noexcept
                                      ^~~~~~~~
src/Ringbuffer.hpp: In instantiation of 'buffers::detail::ring_buffer_iterator<T, N, C, Overwrite>::self_type& buffers::detail::ring_buffer_iterator<T, N, C, Overwrite>::operator++() [with T = tVehicleInfo; unsigned int N = 10; bool C = false; bool Overwrite = true; buffers::detail::ring_buffer_iterator<T, N, C, Overwrite>::self_type = buffers::detail::ring_buffer_iterator<tVehicleInfo, 10, false, true>]':
src/main.cpp:858:33:   required from here
src/Ringbuffer.hpp:65:17: error: operation on '((buffers::detail::ring_buffer_iterator<tVehicleInfo, 10, false, true>*)this)->buffers::detail::ring_buffer_iterator<tVehicleInfo, 10, false, true>::index_' may be undefined [-Werror=sequence-point]
                 index_ = ++index_ % N;
                 ^~~~~~
Compiling .pio/build/m5stick-c/coap/libcoap/src/encode.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/mem.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/net.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/option.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/pdu.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/resource.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/str.o
Compiling .pio/build/m5stick-c/coap/libcoap/src/subscribe.o
cc1plus: some warnings being treated as errors
Compiling .pio/build/m5stick-c/coap/libcoap/src/uri.o
Compiling .pio/build/m5stick-c/console/commands.o
Compiling .pio/build/m5stick-c/console/esp_console_repl.o
*** [.pio/build/m5stick-c/src/main.o] Error 1

Just to be clear, you have actually added:

#include <type_traits>

somewhere before your RingBuffer.hpp header is being included, correct?