jupyter-xeus / xeus-cling

Jupyter kernel for the C++ programming language
BSD 3-Clause "New" or "Revised" License
3.02k stars 292 forks source link

Cannot include file for macro expansion #438

Open district10 opened 2 years ago

district10 commented 2 years ago

Testing code

It prints out:

double: double
int: int
std::string: std::string

It does not work under jupyterlab xeus-cling

#include <iostream>
#include <map>
#include <string>

std::map<std::string, std::string> cache;
#define HANDLE_TYPE(Type) cache[#Type] = #Type;
#include "/tmp/types.hpp"

for (auto &pair: cache) {
    std::cout << pair.first << ": " << pair.second << std::endl;
}

image

Maybe it's more like a cling thing. :sad: