Skip to content

std::aligned_storage_t deprecation warning in C++23 mode #232

@jcmonnin

Description

@jcmonnin

When using v8pp using C++23 mode in MSVC in 14.50 (VS 2026), I get a deprecation warning of std::aligned_storage_t

	template<typename T>
	struct value_holder final : value_holder_base
	{
		std::aligned_storage_t<sizeof(T), alignof(T)> storage;
		v8::Global<v8::External> pext;
v8pp/function.hpp(105): warning C4996: 'std::aligned_storage_t': warning STL4034: std::aligned_storage and std::aligned_storage_t are deprecated in C++23. Prefer alignas(T) std::byte t_buff[sizeof(T)]. You can define _SILENCE_CXX23_ALIGNED_STORAGE_DEPRECATION_WARNING or _SILENCE_ALL_CXX23_DEPRECATION_WARNINGS to suppress this warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions