Skip to content

Commit

Permalink
Another attempt to workaround MSVC failure to compile c0035af
Browse files Browse the repository at this point in the history
  • Loading branch information
lhog committed Feb 21, 2024
1 parent f9a09a5 commit a1fe23f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rts/System/MemPoolTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ template<uint32_t NumBuckets, size_t BucketSize> struct PassThroughPool {

// Helper to infer the memory alignment and size from a set of types.
template <class ...T>
#if 0 // doesn't compile on MSVC 19.37
struct TypesMem {
alignas(std::max({alignof(T)...})) uint8_t data[std::max({sizeof(T)...})];
alignas(alignof(T)...) uint8_t data[std::max({sizeof(T)...})];
};
#else
using TypesMem = std::aligned_storage_t< std::max({ sizeof(T)... }), std::max({ alignof(T)... }) >;
#endif

template<size_t S, size_t Alignment> struct DynMemPool {
public:
Expand Down

0 comments on commit a1fe23f

Please sign in to comment.