xeus-cling
xeus-cling copied to clipboard
Function cannot return type vector<T>. Limitation or bug?
Reproduced in Binder:
#include <iostream>
#include <vector>
std::cout << "some output" << std::endl;
std::vector<int> test() {
std::vector<int> result;
return result;
}
input_line_8:3:25: error: function definition is not allowed here
std::vector
It should work if you define the function in a dedicated cell.
Yes it is a parsing issue in cling. The next version should come with a fix for this after cling 0.6 is out.
I just saw cling 0.6 released 4 days ago...
Yes, I've been working on the conda recipe since yesterday.
@SylvainCorlay I want to know how to upgrade the cling on Ubuntu... I have updated all of my packages with conda yesterday, but the cling --version is still 0.5...