p-ranav / alpaca

Serialization library written in C++17 - Pack C++ structs into a compact byte-array without any macros or boilerplate code
MIT License
464 stars 43 forks source link

samples/optional_values.cpp: compile error: no matching function for call to 'to_bytes' #29

Closed DannyBoyKN closed 3 months ago

DannyBoyKN commented 9 months ago

I wanted to give this a try, downloaded and failed to compile 😞 : (MacBook Pro M2, macOS Sonoma)

$ cmake -DALPACA_BUILD_TESTS=on       -DALPACA_BUILD_BENCHMARKS=on       -DALPACA_BUILD_SAMPLES=on     -DCMAKE_BUILD_TYPE=Release ..
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The C compiler identification is AppleClang 15.0.0.15000100
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Building benchmark
-- Could NOT find benchmark (missing: benchmark_DIR)
-- Using CMake Version 3.24.4
-- Downloading GoogleBenchmark
-- Found Git: /usr/bin/git (found version "2.39.3 (Apple Git-145)") 
-- git Version: v1.5.2
-- Version: 1.5.2
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Success
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test BENCHMARK_HAS_O3_FLAG
-- Performing Test BENCHMARK_HAS_O3_FLAG - Success
-- Performing Test BENCHMARK_HAS_CXX03_FLAG
-- Performing Test BENCHMARK_HAS_CXX03_FLAG - Success
-- Performing Test BENCHMARK_HAS_WNO_ODR
-- Performing Test BENCHMARK_HAS_WNO_ODR - Success
-- Configuring done
-- Generating done
-- Build files have been written to:alpaca/build
$ make
[  0%] Building CXX object test/CMakeFiles/ALPACA.dir/main.cpp.o
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3725:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(char, "%d")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3726:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(char signed, "%d")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3727:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(char unsigned, "%u")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3728:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(int short, "%d")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3729:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(int short unsigned, "%u")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3730:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(int, "%d")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3731:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(unsigned, "%u")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3732:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(int long, "%ld")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3733:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(int long unsigned, "%lu")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3734:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(int long long, "%lld")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/test/main.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3735:1: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
DOCTEST_TO_STRING_OVERLOAD(int long long unsigned, "%llu")
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/test/./doctest.hpp:3721:14: note: expanded from macro 'DOCTEST_TO_STRING_OVERLOAD'
        std::sprintf(buf, fmt, in);                                                                \
             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
11 warnings generated.
[  0%] Building CXX object test/CMakeFiles/ALPACA.dir/test_backwards_compatibility.cpp.o
[  1%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_array.cpp.o
[  1%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_big_endian.cpp.o
[  2%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_bool.cpp.o
[  2%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_bool_from_array.cpp.o
[  3%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_chrono_duration.cpp.o
[  3%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_chrono_duration_from_array.cpp.o
[  4%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_deque.cpp.o
[  4%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_deque_from_array.cpp.o
[  5%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_enum_class.cpp.o
[  5%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_enum_class_from_array.cpp.o
[  6%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_error_crc32.cpp.o
[  6%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_error_crc32_from_array.cpp.o
[  7%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_error_set.cpp.o
[  7%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_error_set_from_array.cpp.o
[  8%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_error_vector.cpp.o
[  8%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_error_vector_from_array.cpp.o
[  9%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_error_version.cpp.o
[  9%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_error_version_from_array.cpp.o
[ 10%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_float.cpp.o
[ 10%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_float_from_array.cpp.o
[ 11%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_from_carray.cpp.o
[ 11%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_from_ifstream.cpp.o
[ 12%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_int.cpp.o
[ 12%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_int_from_array.cpp.o
[ 13%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_list.cpp.o
[ 13%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_list_from_array.cpp.o
[ 14%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_map.cpp.o
[ 14%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_map_from_array.cpp.o
[ 15%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_optional.cpp.o
[ 15%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_optional_from_array.cpp.o
[ 16%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_pair.cpp.o
[ 16%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_pair_from_array.cpp.o
[ 16%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_set.cpp.o
[ 17%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_set_from_array.cpp.o
[ 17%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_string.cpp.o
[ 18%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_string_from_array.cpp.o
[ 18%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_tuple.cpp.o
[ 19%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_tuple_from_array.cpp.o
[ 19%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_uint.cpp.o
[ 20%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_uint_from_array.cpp.o
[ 20%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_unique_ptr.cpp.o
[ 21%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_unique_ptr_from_array.cpp.o
[ 21%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_ustring.cpp.o
[ 22%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_variant.cpp.o
[ 22%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_variant_from_array.cpp.o
[ 23%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_vector.cpp.o
[ 23%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_vector_from_array.cpp.o
[ 24%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_with_crc32.cpp.o
[ 24%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_with_crc32_from_array.cpp.o
[ 25%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_with_version.cpp.o
[ 25%] Building CXX object test/CMakeFiles/ALPACA.dir/test_deserialize_with_version_from_array.cpp.o
[ 26%] Building CXX object test/CMakeFiles/ALPACA.dir/test_forwards_compatibility.cpp.o
[ 26%] Building CXX object test/CMakeFiles/ALPACA.dir/test_forwards_compatibility_from_array.cpp.o
[ 27%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_array.cpp.o
[ 27%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_array_into_array.cpp.o
[ 28%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_big_endian.cpp.o
[ 28%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_big_endian_into_array.cpp.o
[ 29%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_bool.cpp.o
[ 29%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_bool_into_array.cpp.o
[ 30%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_chrono_duration.cpp.o
[ 30%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_chrono_duration_to_array.cpp.o
[ 31%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_deque.cpp.o
[ 31%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_deque_into_array.cpp.o
[ 32%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_enum_class.cpp.o
[ 32%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_enum_class_into_array.cpp.o
[ 33%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_float.cpp.o
[ 33%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_float_into_array.cpp.o
[ 33%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_int.cpp.o
[ 34%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_int_into_array.cpp.o
[ 34%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_into_carray.cpp.o
[ 35%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_list.cpp.o
[ 35%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_list_into_array.cpp.o
[ 36%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_map.cpp.o
[ 36%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_map_into_array.cpp.o
[ 37%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_nested_struct.cpp.o
[ 37%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_nested_struct_into_array.cpp.o
[ 38%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_optional.cpp.o
[ 38%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_optional_into_array.cpp.o
[ 39%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_pair.cpp.o
[ 39%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_pair_optional.cpp.o
[ 40%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_set.cpp.o
[ 40%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_set_into_array.cpp.o
[ 41%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_string.cpp.o
[ 41%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_string_into_array.cpp.o
[ 42%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_to_fstream.cpp.o
[ 42%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_tuple.cpp.o
[ 43%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_tuple_into_array.cpp.o
[ 43%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_uint.cpp.o
[ 44%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_uint_into_array.cpp.o
[ 44%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_unique_ptr.cpp.o
[ 45%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_unique_ptr_into_array.cpp.o
[ 45%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_variant.cpp.o
[ 46%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_variant_into_array.cpp.o
[ 46%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_vector.cpp.o
[ 47%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_vector_into_array.cpp.o
[ 47%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_with_crc32.cpp.o
[ 48%] Building CXX object test/CMakeFiles/ALPACA.dir/test_serialize_with_crc32_into_array.cpp.o
[ 48%] Building CXX object test/CMakeFiles/ALPACA.dir/test_type_info.cpp.o
[ 49%] Linking CXX executable tests
[ 49%] Built target ALPACA
[ 50%] Building CXX object samples/CMakeFiles/fundamental_types.dir/fundamental_types.cpp.o
[ 50%] Linking CXX executable fundamental_types
[ 50%] Built target fundamental_types
[ 50%] Building CXX object samples/CMakeFiles/arrays_vectors_strings.dir/arrays_vectors_strings.cpp.o
[ 50%] Linking CXX executable arrays_vectors_strings
[ 50%] Built target arrays_vectors_strings
[ 51%] Building CXX object samples/CMakeFiles/maps_and_sets.dir/maps_and_sets.cpp.o
[ 51%] Linking CXX executable maps_and_sets
[ 51%] Built target maps_and_sets
[ 51%] Building CXX object samples/CMakeFiles/nested_structures.dir/nested_structures.cpp.o
[ 52%] Linking CXX executable nested_structures
[ 52%] Built target nested_structures
[ 52%] Building CXX object samples/CMakeFiles/optional_values.dir/optional_values.cpp.o
In file included from /Users/Mladen/Developer/C++/ngfsw/alpaca/samples/optional_values.cpp:1:
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/alpaca.h:125:3: error: no matching function for call to 'to_bytes'
  to_bytes<O>(bytes, byte_index, input);
  ^~~~~~~~~~~
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/vector.h:34:5: note: in instantiation of function template specialization 'alpaca::detail::to_bytes_router<alpaca::options::none, std::__bit_const_reference<std::vector<bool>>, std::vector<unsigned char>>' requested here
    to_bytes_router<O>(v, bytes, byte_index);
    ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/vector.h:48:3: note: in instantiation of function template specialization 'alpaca::detail::to_bytes_from_vector_type<alpaca::options::none, std::vector<bool>, std::vector<unsigned char>>' requested here
  to_bytes_from_vector_type<O, std::vector<bool>, Container>(input, bytes,
  ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/alpaca.h:125:3: note: in instantiation of function template specialization 'alpaca::detail::to_bytes<alpaca::options::none, std::vector<unsigned char>>' requested here
  to_bytes<O>(bytes, byte_index, input);
  ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/optional.h:35:5: note: in instantiation of function template specialization 'alpaca::detail::to_bytes_router<alpaca::options::none, std::vector<bool>, std::vector<unsigned char>>' requested here
    to_bytes_router<O, U>(input.value(), bytes, byte_index);
    ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/alpaca.h:125:3: note: in instantiation of function template specialization 'alpaca::detail::to_bytes<alpaca::options::none, std::vector<unsigned char>, std::vector<bool>>' requested here
  to_bytes<O>(bytes, byte_index, input);
  ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/alpaca.h:138:13: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    detail::to_bytes_router<O>(field, bytes, byte_index);
            ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/alpaca.h:141:5: note: in instantiation of function template specialization 'alpaca::detail::serialize_helper<alpaca::options::none, MyStruct, 4UL, std::vector<unsigned char>, 3UL>' requested here
    serialize_helper<O, T, N, Container, I + 1>(s, bytes, byte_index);
    ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/alpaca.h:141:5: note: in instantiation of function template specialization 'alpaca::detail::serialize_helper<alpaca::options::none, MyStruct, 4UL, std::vector<unsigned char>, 2UL>' requested here
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/alpaca.h:141:5: note: in instantiation of function template specialization 'alpaca::detail::serialize_helper<alpaca::options::none, MyStruct, 4UL, std::vector<unsigned char>, 1UL>' requested here
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/alpaca.h:152:11: note: in instantiation of function template specialization 'alpaca::detail::serialize_helper<alpaca::options::none, MyStruct, 4UL, std::vector<unsigned char>, 0UL>' requested here
  detail::serialize_helper<options::none, T, N, Container, 0>(s, bytes,
          ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/samples/optional_values.cpp:17:32: note: in instantiation of function template specialization 'alpaca::serialize<MyStruct, 4UL, std::vector<unsigned char>>' requested here
  auto bytes_written = alpaca::serialize<MyStruct, 4>(
                               ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/filesystem_path.h:26:6: note: candidate function template not viable: no known conversion from 'const std::__bit_const_reference<std::vector<bool>>' to 'const std::filesystem::path' for 3rd argument
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/vector.h:46:6: note: candidate function template not viable: no known conversion from 'const std::__bit_const_reference<std::vector<bool>>' to 'const std::vector<bool>' for 3rd argument
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/to_bytes.h:39:1: note: candidate template ignored: requirement 'std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, bool> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, char> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, wchar_t> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, char16_t> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, char32_t> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, unsigned char> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, unsigned short> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, signed char> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, short> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, float> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, double>' was not satisfied [with O = alpaca::options::none, T = std::vector<unsigned char>, U = std::__bit_const_reference<std::vector<bool>>]
to_bytes(T &bytes, std::size_t &byte_index, const U &original_value) {
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/to_bytes.h:54:1: note: candidate template ignored: requirement 'std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, unsigned int> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, unsigned long long> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, int> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, long long> || std::is_same_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>, unsigned long>' was not satisfied [with O = alpaca::options::none, T = std::vector<unsigned char>, U = std::__bit_const_reference<std::vector<bool>>]
to_bytes(T &bytes, std::size_t &byte_index, const U &original_value) {
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/to_bytes.h:79:1: note: candidate template ignored: requirement 'std::is_enum<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>>::value' was not satisfied [with O = alpaca::options::none, T = std::vector<unsigned char>, U = std::__bit_const_reference<std::vector<bool>>]
to_bytes(T &bytes, std::size_t &byte_index, const U &value) {
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/alpaca.h:117:1: note: candidate template ignored: requirement 'std::is_aggregate_v<std::__bit_const_reference<std::vector<bool, std::allocator<bool>>>>' was not satisfied [with O = alpaca::options::none, T = std::vector<unsigned char>, U = std::__bit_const_reference<std::vector<bool>>]
to_bytes(T &bytes, std::size_t &byte_index, const U &input) {
^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/array.h:26:6: note: candidate template ignored: could not match 'array' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/deque.h:39:6: note: candidate template ignored: could not match 'deque' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/duration.h:30:6: note: candidate template ignored: could not match 'duration' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/list.h:39:6: note: candidate template ignored: could not match 'list' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/map.h:65:6: note: candidate template ignored: could not match 'map' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/map.h:73:6: note: candidate template ignored: could not match 'unordered_map' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/optional.h:26:6: note: candidate template ignored: could not match 'optional' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/pair.h:30:6: note: candidate template ignored: could not match 'pair' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/set.h:63:6: note: candidate template ignored: could not match 'set' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/set.h:71:6: note: candidate template ignored: could not match 'unordered_set' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/string.h:26:6: note: candidate template ignored: could not match 'basic_string' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/tuple.h:58:6: note: candidate template ignored: could not match 'tuple' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/unique_ptr.h:28:6: note: candidate template ignored: could not match 'unique_ptr' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/variant.h:42:6: note: candidate template ignored: could not match 'variant' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
/Users/Mladen/Developer/C++/ngfsw/alpaca/include/alpaca/detail/types/vector.h:39:6: note: candidate template ignored: could not match 'vector' against '__bit_const_reference'
void to_bytes(Container &bytes, std::size_t &byte_index,
     ^
1 error generated.
make[2]: *** [samples/CMakeFiles/optional_values.dir/optional_values.cpp.o] Error 1
make[1]: *** [samples/CMakeFiles/optional_values.dir/all] Error 2
make: *** [all] Error 2

I removed samples/optional_values.cpp from CMakeLists and had to do it also for samples/time_t.cpp. Then I recompiled successfully.

Is there something I missed or simply related to my building host ?

PS: had also to exclude for building benchmarks which failed because of the -Werror flag.