[Bug c++/102470] C++20 NTTP causes ICE
iDingDong at outlook dot com
gcc-bugzilla@gcc.gnu.org
Thu Sep 23 13:05:23 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102470
--- Comment #1 from Kun Ge <iDingDong at outlook dot com> ---
I misplaced the wrong piece of codes.
the code that actually triggered the error is:
//---
#include <cstdlib>
#include <memory>
struct MemAttr {
std::size_t size;
std::size_t align;
};
template <typename T> constexpr MemAttr memAttrOf = MemAttr { .size =
sizeof(T), .align = alignof(T) };
template <MemAttr attr> using AlignedStorage =
::std::aligned_storage_t<attr.size, attr.align>;
template <typename T> using AlignedStorageFor = AlignedStorage<memAttrOf<T>>;
//---
More information about the Gcc-bugs
mailing list