CLion 2016.3 Help

C++ Support

Currently, CLion supports all the C++ standards up to C++14. The C++17 is not supported for now therefore it is out of scope for this topic.
The table below represents the list of features supported by CLion for the respective standards.
Legend:
/help/img/idea/appIconOk512.png - Supported.
/help/img/idea/stop@2x.png - Not supported.

C++14
Variable templates
/help/img/idea/stop@2x.png
Generic lambdas
/help/img/idea/stop@2x.png
Binary literals
/help/img/idea/appIconOk512.png
Aggregate initialization for classes with brace-or-equal initializers
/help/img/idea/appIconOk512.png
[[deprecated]] attribute
/help/img/idea/appIconOk512.png
Single quote as digit separator
/help/img/idea/appIconOk512.png
Return type deduction for normal functions
/help/img/idea/stop@2x.png
Generalized lambda capture
/help/img/idea/stop@2x.png
C++11
auto specifier
/help/img/idea/appIconOk512.png
decltype specifier
/help/img/idea/appIconOk512.png
final specifier
/help/img/idea/appIconOk512.png
override specifier
/help/img/idea/appIconOk512.png
Trailing return initialization
/help/img/idea/appIconOk512.png
rvalue references
/help/img/idea/appIconOk512.png
Variadic templates
/help/img/idea/appIconOk512.png
List initialization
/help/img/idea/appIconOk512.png
In-class member initializers
/help/img/idea/appIconOk512.png
Delegating constructors
/help/img/idea/appIconOk512.png
Inheriting constructors
/help/img/idea/appIconOk512.png
nullptr
/help/img/idea/appIconOk512.png
long long
/help/img/idea/appIconOk512.png
char16_t and char32_t
/help/img/idea/appIconOk512.png
Generalized unions
/help/img/idea/appIconOk512.png
Generalized POD's
/help/img/idea/appIconOk512.png
thread_local storage
/help/img/idea/appIconOk512.png
GC interface
/help/img/idea/appIconOk512.png
range for
/help/img/idea/appIconOk512.png
Static asserts
/help/img/idea/appIconOk512.png
Explicit specifier
/help/img/idea/appIconOk512.png
default/ delete keywords
/help/img/idea/appIconOk512.png
Scoped enum
/help/img/idea/appIconOk512.png
thread_local keyword
/help/img/idea/appIconOk512.png
noexcept specifier
/help/img/idea/appIconOk512.png
noexcept operator
/help/img/idea/appIconOk512.png
Inline namespaces
/help/img/idea/appIconOk512.png
alignof / alignas specifiers
/help/img/idea/appIconOk512.png
extern template
/help/img/idea/appIconOk512.png
attribute specifier sequence
/help/img/idea/appIconOk512.png
Lambda functions
/help/img/idea/appIconOk512.png
Raw string literals
/help/img/idea/appIconOk512.png
Type aliases
/help/img/idea/appIconOk512.png
Type traits
/help/img/idea/appIconOk512.png
User-defined literals
/help/img/idea/appIconOk512.png
constexpr specifier
/help/img/idea/appIconOk512.png
constexpr functions are not always used in code analysis, for example in the following code sample CLion can't determine correct specialization yet:
#include <iostream> constexpr int foo() { return 3 + 3; } template<int i> struct S { int value() { return 1; } }; template<> struct S<5> { int value() { return 2; } }; int main() { std::cout << S<foo()>().value(); }

You can enable the desired C++ standard using CMake CMAKE_CXX_STANDARD variable. For example:

set(CMAKE_CXX_STANDARD 11)

CLion is compatible with libc++ (Clang) and libstdc++ (GCC) Standard Template Libraries (STL).

See Also

Last modified: 23 November 2016