hi,
I'm new to code blocks. I write my first cpp console application but can't jump to declaration or implementation of std::string_view when I right click those menu items. Meanwhile, it works for std::string. Since string_view is supported since c++ 17, I'm wondering if it is because codeblock doesn't support declaration or implementation jumping for those added after c++ 17?
The "-std=c++20" option is checked in compiler settings and it could build and run correctly. My g++ version is:
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Here's the code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s("Hello world!");
string_view sv(s.c_str(), 5);
cout <<sv <<endl;
return 0;
}
Thanks!