Skip to content

Commit

Permalink
Merge pull request #500 from ManifoldFR/topic/std-vector-hpp-expose-v…
Browse files Browse the repository at this point in the history
…ector-allocator

[std-vector.hpp] make std::vector allocator type a template parameter for exposeStdVectorEigenSpecificType
  • Loading branch information
jcarpent authored Aug 30, 2024
2 parents 012e4c7 + c3fa4f7 commit 8571ed6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions include/eigenpy/std-vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 8571ed6

Please sign in to comment.