infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
Ch05_CppTemplates.c File Reference

Cookbook Chapter 5: Interfacing with C++ Templates. More...

#include <infix/infix.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for Ch05_CppTemplates.c:

Functions

int main ()
 

Variables

const char * MANGLED_GET_DBL = "_ZNK3BoxIdE9get_valueEv"
 
const char * LIB_NAME = "./libbox.so"
 

Detailed Description

Cookbook Chapter 5: Interfacing with C++ Templates.

This example demonstrates calling a specific instantiation of a C++ template class. While you can't call the template itself, you can find the mangled name for a concrete instantiation (e.g., Box<double>) and call its methods.

Function Documentation

◆ main()

int main ( void  )

Variable Documentation

◆ LIB_NAME

const char* LIB_NAME = "./libbox.so"

◆ MANGLED_GET_DBL

const char* MANGLED_GET_DBL = "_ZNK3BoxIdE9get_valueEv"