# Taking an existing type as an argument

**URL:** <https://discourse.julialang.org/t/taking-an-existing-type-as-an-argument/52854>\
**Category:** General Usage\
**Tags:** cxx\
**Created:** [January 4, 2021, 10:32pm UTC](https://discourse.julialang.org/t/taking-an-existing-type-as-an-argument/52854 "2021-01-04T22:32:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckfinite](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ckfinite/32/8341_2.png) [@ckfinite](https://discourse.julialang.org/u/ckfinite)\
**Post date:** [January 4, 2021, 10:32pm UTC](https://discourse.julialang.org/t/taking-an-existing-type-as-an-argument/52854/1 "2021-01-04T22:32:06Z")

</div>

I’m working on writing a wrapper for an existing sparse linear algebra library using CxxWrap.jl, and one of the functions takes a SuiteSparse (under a different name, but identical by design memory layout) sparse matrix as an argument. Is it possible to declare using CxxWrap that this function should be passed the corresponding Ptr{SuiteSparse.CHOLMOD.C\_Sparse{Float64}} argument, or will I need to have it take a void\* and then wrap the wrapper?
