You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following snippet rightfully triggers an error in cling:
#include <string>
string s
However, cling goes into a weird state where it does not accept anymore:
std::string s
I am using cling installed from QuantStack's conda repository:
/opt/miniconda3/bin/cling --version
0.4~dev
Full trace:
****************** CLING ******************
* Type C++ code and press enter to run it *
* Type .q to exit *
*******************************************
[cling]$ #include <string>
[cling]$ string s
input_line_4:2:2: error: unknown type name 'string'; did you mean 'std::string'?
string s
^~~~~~
std::string
/opt/miniconda3/gcc/include/c++/bits/stringfwd.h:74:33: note: 'std::string' declared here
typedef basic_string<char> string;
^
[cling]$ std::string s
input_line_5:2:14: error: no matching constructor for initialization of 'std::string' (aka 'basic_string<char>')
std::string s
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:549:9: note: candidate constructor template not viable: requires at least 2 arguments, but 0 were provided
basic_string(_InputIterator __beg, _InputIterator __end,
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:389:7: note: candidate constructor not viable: requires single argument '__a', but no arguments were provided
basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:397:7: note: candidate constructor not viable: requires single argument '__str', but no arguments were provided
basic_string(const basic_string& __str)
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:476:7: note: candidate constructor not viable: requires single argument '__str', but no arguments were provided
basic_string(basic_string&& __str) noexcept
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:454:7: note: candidate constructor not viable: requires at least argument '__s', but no arguments were provided
basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:503:7: note: candidate constructor not viable: requires at least argument '__l', but no arguments were provided
basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:507:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
basic_string(const basic_string& __str, const _Alloc& __a)
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:511:7: note: candidate constructor not viable: requires 2 arguments, but 0 were provided
basic_string(basic_string&& __str, const _Alloc& __a)
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:410:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
basic_string(const basic_string& __str, size_type __pos,
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:444:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
basic_string(const _CharT* __s, size_type __n,
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:464:7: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
^
/opt/miniconda3/gcc/include/c++/bits/basic_string.h:426:7: note: candidate constructor not viable: requires 4 arguments, but 0 were provided
basic_string(const basic_string& __str, size_type __pos,
^
The text was updated successfully, but these errors were encountered:
Similar problem in my WSL
Linux MSI 4.4.0-17134-Microsoft #523-Microsoft Mon Dec 31 17:49:00 PST 2018 x86_64 GNU/Linux
[cling]$ #include <iostream>
[cling]$ using namespace std;
[cling]$ cout << "srini hi";
In file included from input_line_3:1:
In file included from /usr/include/c++/8/iostream:39:
/usr/include/c++/8/ostream:559:8: error: no member named 'setstate' in 'std::basic_ostream'
__out.setstate(ios_base::badbit);
~~~~~ ^
input_line_6:2:7: note: in instantiation of function template specialization 'std::operator<<<std::char_traits >' requested here
cout << "srini hi";
^
The following snippet rightfully triggers an error in cling:
However, cling goes into a weird state where it does not accept anymore:
I am using cling installed from QuantStack's conda repository:
Full trace:
The text was updated successfully, but these errors were encountered: