Skip to content

Instantly share code, notes, and snippets.

@masouduut94
Created October 12, 2024 23:48
Show Gist options
  • Save masouduut94/3e69cf50aece65cc39a033ca5d59cc98 to your computer and use it in GitHub Desktop.
Save masouduut94/3e69cf50aece65cc39a033ca5d59cc98 to your computer and use it in GitHub Desktop.
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "cpp_evaluator.h" // Include your evaluator C++ module
namespace py = pybind11;
PYBIND11_MODULE(cpp_evaluator, m) {
py::class_<CppEvaluator>(m, "CppEvaluator")
.def(py::init<const std::string&, const std::string&>()) // Constructor binding
.def("evaluate", &CppEvaluator::evaluate); // Bind evaluate method
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment