Closed davidhunter22 closed 1 year ago
Ah so std::byte is a C++ 17 thing. Do you want me to use something like 'char' instead? I can also do conditional code based on C++ 14 or 17 and greater. Note I did note the README does not mention minimum language or compiler versions, I assume it is C++ 14, if it is it may better to require this in the CMake so you don't get as far as trying to compile code.
Just use unsigned char
instead; the project aims to be C++11 compatible.
I think I need to install some old compilers so I can check they work!
OK I am confused by the error
/__w/type_safe/type_safe/include/type_safe/reference.hpp:689:14: required from 'class type_safe::function_ref<int(int, int)>'
/__w/type_safe/type_safe/test/reference.cpp:243:40: required from here
/__w/type_safe/type_safe/include/type_safe/detail/aligned_union.hpp:45:67: error: requested alignment is not an integer constant
In the gcc48 build that is failing given the values are defined as
static constexpr auto size_value = detail::max(sizeof(Types)...);
static constexpr auto alignment_value = detail::max(alignof(Types)...);
Is this one of those "the compiler may not actually make a constexpr a compile time constant" things?
I've implemented the requested changes myself. Thanks for starting the PR.
fixes foonathan/type_safe#144