I have a type with a strict alignment requirement (due to AVX operations being used) that is larger than the platforms default alignment.
To make usage of this class simpler, I would like to specialize std::make_shared
to always use a suitable allocator for this type.
Something like this:
namespace std{
template<class... Args> inline
auto make_shared<X, Args...>(Args&&... args){
return std::allocate_shared(allocator_type<X, 32>, std::forward<Args>(args)...);
}
}
My question is, is this allowed by the standard? Will it work as expected?