[MSVC 19] error C2440: cannot convert to 'void (__cdecl *)(void *,std::size_t) noexcept'

This commit is contained in:
mutouyun 2023-09-09 13:35:47 +08:00
parent 2d75c87672
commit c503812c6f
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ struct generic_traits {
/// \brief Custom initialization. /// \brief Custom initialization.
constexpr static void init_code(storage_t &code) noexcept { constexpr static void init_code(storage_t &code) noexcept {
code = {0, std::error_code(-1, std::generic_category())}; code = {{}, std::error_code(-1, std::generic_category())};
} }
constexpr static void init_code(storage_t &code, T value, std::error_code const &ec) noexcept { constexpr static void init_code(storage_t &code, T value, std::error_code const &ec) noexcept {
code = {value, ec}; code = {value, ec};

View File

@ -208,7 +208,7 @@ struct holder_info {
std::size_t sizeof_type; std::size_t sizeof_type;
std::size_t count; std::size_t count;
void (*copy)(allocator const &, void const *s, void *d); void (*copy)(allocator const &, void const *s, void *d);
void (*dest)(void *p, std::size_t n) noexcept; void (*dest)(void *p, std::size_t n);
}; };
template <typename Value, typename Construct> template <typename Value, typename Construct>
@ -454,7 +454,7 @@ public:
template <std::size_t N> template <std::size_t N>
class small_storage { class small_storage {
static_assert(N > holder<int, false>, "N must be greater than sizeof(holder<int, false>)"); static_assert(N > sizeof(holder<int, false>), "N must be greater than sizeof(holder<int, false>)");
alignas(std::max_align_t) std::array<::LIBIMP::byte, N> storage_; alignas(std::max_align_t) std::array<::LIBIMP::byte, N> storage_;