In C++ 20 we're getting assume aligned, this would be very usefull for audio code where pointers to aligned blocks of floats are passed around all the time. Let's say we have the following span type:
template<typename T>
struct Signal
{
const T* data
size_t size;
};
How would one indicate that the data pointer in this struct is aligned by some constexpr integer? Is something like this already possible in C++ 20?
constexpr int SIMDAlignment = 16;
template<typename T>
struct Signal
{
aligned<SIMDAlignment> const T* data
size_t size;
};