Skip to content

Commit 8571ed6

Browse files
authored
Merge pull request #500 from ManifoldFR/topic/std-vector-hpp-expose-vector-allocator
[std-vector.hpp] make std::vector allocator type a template parameter for exposeStdVectorEigenSpecificType
2 parents 012e4c7 + c3fa4f7 commit 8571ed6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- The `exposeStdVectorEigenSpecificType()` template function now takes the vector allocator as a template parameter.
12+
913
## [3.8.2] - 2024-08-26
1014

1115
### Fixed

include/eigenpy/std-vector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,9 @@ struct StdVectorPythonVisitor {
485485
*/
486486
void EIGENPY_DLLAPI exposeStdVector();
487487

488-
template <typename MatType>
488+
template <typename MatType, typename Alloc = Eigen::aligned_allocator<MatType> >
489489
void exposeStdVectorEigenSpecificType(const char *name) {
490-
typedef std::vector<MatType, Eigen::aligned_allocator<MatType> > VecMatType;
490+
typedef std::vector<MatType, Alloc> VecMatType;
491491
std::string full_name = "StdVec_";
492492
full_name += name;
493493
StdVectorPythonVisitor<VecMatType>::expose(

0 commit comments

Comments
 (0)