xeus-cling
xeus-cling copied to clipboard
using std a posteriori does not fix endl lookup
If one forgets to "use std" before accessing "endl", then "using namespace std" a posteriori does not resolve the lookup:
In[1] cout << 1 << endl;
input_line_7:2:2: error: use of undeclared identifier 'cout'; did you mean 'std::cout'?
cout << 1 << endl;
^~~~
...
All good for now.
In[2] using namespace std;
One would now expect the following to work, but it does not:
In[3] cout << 1 << endl;
input_line_9:2:15: error: reference to overloaded function could not be resolved; did you mean to call it?
cout << 1 << endl;
^~~~
...
Full transcript in test-namespace-endl.pdf
It's a cling issue. I will test on the last version of cling to be sure that this issue was not already solved.
cc @vgvassilev this is an upstream issue apparently. Might be solved in 0.4
For the record: the issue is still there with cling 0.5:
clangdev 5.0.0 cling_1 [cling] gouarin
cling 0.5 3 [cling] gouarin
cling-patches 1 0 QuantStack
clingkernel 0.0.2 <pip>
cppzmq 4.2.2 cling_0 [cling] gouarin
llvmdev 5.0.0 cling_1 [cling] gouarin
xeus-cling 0.0.10 0 gouarin
zeromq 4.2.3 cling_3 [cling] gouarin
the issue is still there with cling 0.7 and xeus-cling 0.10