diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27804e89fb21ac96d3ba226f0e865f5c3863a93e..c9782887e8ac4221f47dea30a621894a38fcdc8c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 
 ## [Unreleased]
 
+### Changed
+
+- The `exposeStdVectorEigenSpecificType()` template function now takes the vector allocator as a template parameter.
+
 ## [3.8.2] - 2024-08-26
 
 ### Fixed
diff --git a/include/eigenpy/std-vector.hpp b/include/eigenpy/std-vector.hpp
index 2dbdabfd2f8e9bd03c642b0e14466bc5d2648b33..bcef20c852f7eae06323b8a670ce87466f1379a5 100644
--- a/include/eigenpy/std-vector.hpp
+++ b/include/eigenpy/std-vector.hpp
@@ -485,9 +485,9 @@ struct StdVectorPythonVisitor {
  */
 void EIGENPY_DLLAPI exposeStdVector();
 
-template <typename MatType>
+template <typename MatType, typename Alloc = Eigen::aligned_allocator<MatType> >
 void exposeStdVectorEigenSpecificType(const char *name) {
-  typedef std::vector<MatType, Eigen::aligned_allocator<MatType> > VecMatType;
+  typedef std::vector<MatType, Alloc> VecMatType;
   std::string full_name = "StdVec_";
   full_name += name;
   StdVectorPythonVisitor<VecMatType>::expose(