Page 1 of 1

code completion with C++11

Posted: Fri Sep 04, 2015 1:19 pm
by litecpp
codelite version: 8.2.0
it is not a self compiled version of codelite
OS: windows xp sp3
compiler: mingw64 gcc 5.1.0 and clang 3.6.0

include paths:
E:\Program\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\include
E:\Program\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\i686-w64-mingw32\include
E:\Program\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\i686-w64-mingw32\include\c++
E:\Program\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\i686-w64-mingw32\include\c++\i686-w64-mingw32
E:\Program\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\i686-w64-mingw32\include\c++\backward
E:\Program\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\lib
E:\Program\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\lib\gcc\i686-w64-mingw32\5.1.0\include-fixed

code compeltion:
enable clang code completion
only use clang code completion

workspace setting:
enable c++11 standard

Code: Select all

#include <iostream>
#include <type_traits>

int main()
{
	std:: // after I type :: code completion shows info below
}
clang: This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

Code: Select all

#include <type_traits>

int main()
{
	std:: // after I type :: code completion shows info below
}
clang: use of undeclared identifier 'std'

Code: Select all

#include <iostream>

int main()
{
	std:: // after I type :: code completion works fine
}

Re: code comletion with C++11

Posted: Fri Sep 04, 2015 1:27 pm
by eranif
Right click on your workspace and select "Workspace settings->code completion->enable c++11"

Eran

Re: code comletion with C++11

Posted: Fri Sep 04, 2015 1:48 pm
by litecpp
I selected "enable c++11 standard", then I rebuild workspace, retag workspace(full), still not work.

Re: code comletion with C++11

Posted: Fri Sep 04, 2015 2:32 pm
by eranif
You will need to rebuild your workspace (it also clears clang cache)

Eran

Re: code completion with C++11

Posted: Fri Sep 04, 2015 2:43 pm
by litecpp
Now it is OK, I reinstalled it.

Re: code completion with C++11

Posted: Sat Sep 05, 2015 7:26 pm
by litecpp
step1 only enable c++11 standard
code completion works fine with c++11.

step2 enable c++11 standard and enable c++14 standard
retag workspace(full)
code completion does not work with c++11

step3 only enable c++11 standard
rebuild workspace(retag workspace has no effect)
code completion works fine with c++11 again.

only enable c++14 standard does not work with c++11 either.