# Type mapping for Template(parametric) types with CxxWrap.jl

**URL:** https://discourse.julialang.org/t/type-mapping-for-template-parametric-types-with-cxxwrap-jl/71534
**Category:** General Usage
**Tags:** question, cxxwrap
**Created:** [November 16, 2021, 12:52am UTC](https://discourse.julialang.org/t/type-mapping-for-template-parametric-types-with-cxxwrap-jl/71534 "2021-11-16T00:52:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kemu](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@kemu](https://discourse.julialang.org/u/kemu)
#### Post date: [November 16, 2021, 12:52am UTC](https://discourse.julialang.org/t/type-mapping-for-template-parametric-types-with-cxxwrap-jl/71534/1 "2021-11-16T00:52:33Z")

</div>

I’ve been trying to map these structures.

```julia
# Julia Struct
mutable struct Point{T}
    x::T
    y::T
end

```

```cpp
// C++ Struct
template <typename T>
struct Point{
	T x;
	T y;
};

```

It is possible that CxxWrap maps Julia parametric type to C++ template type using `add_type` and `.apply()`.

[https://github.com/JuliaInterop/CxxWrap.jl#template-parametric-types](https://github.com/JuliaInterop/CxxWrap.jl#template-parametric-types)

I’d like to use `map_type` to do the same thing. Please let me know if you have any information.
