Skip to content
This repository was archived by the owner on Oct 4, 2025. It is now read-only.
This repository was archived by the owner on Oct 4, 2025. It is now read-only.

How to wrap templated C++ class with Cxx #479

@TomasOberhuber

Description

@TomasOberhuber

Hi again,

I am trying to export interface of C++ templated library to Julia using Cxx and I cannot find a good way how to do it. Suppose I have a class like this:

template< typename T >
struct myArray
{
   myArray() {...};
  
   myArray( int size ) {...};

  void setSize( int size ) {...};

   int getSize() {...};
};

I would like to use Cxx in Julia to define struct, constructor with size and functions getSize and setSize. And another question, how could I deal with type T? How to pass it from Julia to myArray?

Thanks for ant help, Tomas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions