Skip to content

Commit

Permalink
Use Vc::Allocator for any VectorAbi not just default
Browse files Browse the repository at this point in the history
	* Vc/Allocator: Partially specialize std::allocator also on the
	ABI tag.
  • Loading branch information
mattkretz committed Dec 8, 2020
1 parent 34975e9 commit 52a2d8f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Vc/Allocator
Expand Up @@ -237,7 +237,8 @@ namespace Vc_VERSIONED_NAMESPACE
#include "vector.h"
namespace std
{
template<typename T> class allocator<Vc::Vector<T> > : public ::Vc::Allocator<Vc::Vector<T> >
template<typename T, typename Abi>
class allocator<Vc::Vector<T, Abi> > : public ::Vc::Allocator<Vc::Vector<T, Abi> >
{
public:
template<typename U> struct rebind { typedef ::std::allocator<U> other; };
Expand All @@ -246,8 +247,8 @@ namespace std
const allocator &select_on_container_copy_construction() const { return *this; }
#endif
};
template <typename T>
class allocator<Vc::Mask<T>> : public ::Vc::Allocator<Vc::Mask<T>>
template <typename T, typename Abi>
class allocator<Vc::Mask<T, Abi>> : public ::Vc::Allocator<Vc::Mask<T, Abi>>
{
public:
template<typename U> struct rebind { typedef ::std::allocator<U> other; };
Expand Down

0 comments on commit 52a2d8f

Please sign in to comment.