Skip to content

Commit

Permalink
#21 add test for constructor_signature_excludes
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Jul 29, 2024
1 parent fa956ed commit a37a6d3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 8 additions & 0 deletions examples/shapes/src/geometry/Point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ Point<DIM>::Point(double x, double y, double z)
}
}

template <unsigned DIM>
Point<DIM>::Point(int x, int y, int z)
: Point(static_cast<double>(x),
static_cast<double>(y),
static_cast<double>(z))
{
}

template <unsigned DIM>
Point<DIM>::~Point()
{
Expand Down
5 changes: 5 additions & 0 deletions examples/shapes/src/geometry/Point.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ class Point
*/
Point(double x, double y, double z = (DIM - DIM));

/**
* Constructor to exclude from wrapping
*/
Point(int x, int y, int z = 0);

/**
* Destructor
*/
Expand Down
5 changes: 2 additions & 3 deletions examples/shapes/wrapper/package_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ modules:
# - double

# Exclude any constructors that have these signatures.
# constructor_signature_excludes:
# - [double]
# - [double, int]
constructor_signature_excludes:
- [int, int, int]

# Path to a custom script for generating wrappers for this class.
# CPPWG_SOURCEROOT points to the supplied source root directory.
Expand Down

0 comments on commit a37a6d3

Please sign in to comment.