惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
阮一峰的网络日志
阮一峰的网络日志
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
P
Palo Alto Networks Blog
Know Your Adversary
Know Your Adversary
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Cisco Talos Blog
Cisco Talos Blog
L
Lohrmann on Cybersecurity
AWS News Blog
AWS News Blog
J
Java Code Geeks
博客园_首页
Scott Helme
Scott Helme
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
V
Visual Studio Blog
Cloudbric
Cloudbric
Jina AI
Jina AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
S
SegmentFault 最新的问题
The Last Watchdog
The Last Watchdog
SecWiki News
SecWiki News
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
W
WeLiveSecurity
K
Kaspersky official blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Hacker News: Ask HN
Hacker News: Ask HN
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
宝玉的分享
宝玉的分享
Hugging Face - Blog
Hugging Face - Blog
量子位
Google Online Security Blog
Google Online Security Blog
博客园 - Franky
Simon Willison's Weblog
Simon Willison's Weblog
博客园 - 三生石上(FineUI控件)
Recent Commits to openclaw:main
Recent Commits to openclaw:main

The JetBrains Blog

PhpStorm 2026.2 is Now Out - The JetBrains Blog Key Takeaways From PHPverse 2026 - The JetBrains Blog What's New in IntelliJ IDEA 2026.2 - The JetBrains Blog What’s fixed in IntelliJ IDEA 2026.2 - The JetBrains Blog CLion 2026.2 Is Here - The JetBrains Blog DataGrip 2026.2: AI Agent Skills, MCP Tools and CLI Commands for Data Source Management, Bundled JDBC Drivers, and Improved Session Control - The JetBrains Blog Download WebStorm 2026.2: TypeScript 7 Support, AI, and more GoLand 2026.2 Is Now Available! - The JetBrains Blog Code in Space: Redefining Tech Creation with AI and XR - The JetBrains Blog Rider 2026.2 Release Candidate Is Out! - The JetBrains Blog ReSharper 2026.2 Release Candidate Released! - The JetBrains Blog JetBrains GameDev Days 2026 – Call for Speakers - The JetBrains Blog MPS 2026.1 Has Been Released! - The JetBrains Blog IntelliJ Scala Plugin 2026.2 Is Out! - The JetBrains Blog What's New in ReSharper 2026.2 for VS Code-compatible editors  - The JetBrains Blog Debugging for .NET in VS Code and Cursor: The #1 Requested Feature Is Here - The JetBrains Blog dotInsights | July 2026 - The JetBrains Blog The History of Kodee, Kotlin’s Mascot - The JetBrains Blog JetBrains Academy – June Digest - The JetBrains Blog Introducing the Kotlin Benchmark for AI Coding Agents - The JetBrains Blog Best Object Detection Models for Machine Learning in 2026 - The JetBrains Blog What's Next for TeamCity – CI/CD by JetBrains - The JetBrains Blog The Benchmark Meaning Gap - The JetBrains Blog JetBrains AI for Teams and Organizations: From Fragmented AI Usage to Coordinated Software Development - The JetBrains Blog Java Annotated Monthly – July 2026  - The JetBrains Blog Shift-Left with JetBrains Qodana Natvis Comes to Linux and macOS: Visualize Your C++ Types Without Writing a Single Data Formatter - The JetBrains Blog Speaking to AI Agents like Cavemen Saves 65% of Tokens. We Test. In Conversation With the Golden Kodee Winners - The JetBrains Blog Toolbox App 3.6: Smarter Storage Cleanup, Windows installation diagnostics, and More - The JetBrains Blog IntelliJ IDEA 2026.1.4 Is Out! - The JetBrains Blog TeamCity 2026.1.2 and 2025.11.6 Are Now Available - The JetBrains Blog JetBrains Engineering Hiring Process Guide Kotlin Comes to BlueJ - The JetBrains Blog Improving Embedded Software Quality With Parasoft C/C++test, CLion, and AI - The JetBrains Blog Kodee’s Kotlin Roundup: Kotlin Turns 15, Kotlin 2.4.0, and the Kotlin Toolchain - The JetBrains Blog GitHub Copilot now an Integrated Agent in JetBrains IDEs - The JetBrains Blog JetBrains Air lands on Windows - The JetBrains Blog The Role of Static Code Analysis in Fintech Compliance Kotlin Notebook Sunset - The JetBrains Blog Open-Sourcing the LSP Client API in IntelliJ IDEA 2026.2 - The JetBrains Blog The Dev Containers Story: Introducing EelApi for Plugin Authors - The JetBrains Blog Cursor's $60B Acquisition - Qodana Codex is now the recommended agent in JetBrains IDEs - The JetBrains Blog SSH Connections Are Moving to JetBrains Daemon in the Toolbox App 3.6 EAP - The JetBrains Blog Your AI Agent Keeps Missing The Real Bottleneck. JetBrains Rider Can Fix It Now. - The JetBrains Blog Rust Web Development 2026: The Problems Nobody Talks About Our Research on Membership Inference Attacks and Preventing Privacy Leaks - The JetBrains Blog Explicit Lazy Imports Are Coming to Python 3.15 - The JetBrains Blog Kotlin Toolchain 0.11: The Next Step for Amper - The JetBrains Blog YouTrack Helpdesk Now Includes Customer Groups - The JetBrains Blog How to Win a Hackathon: Notes From the Judging Table - The JetBrains Blog How We Measure the ROI of JetBrains IDEs - The JetBrains Blog AWS Image Builder Plugin for TeamCity - The JetBrains Blog PHP Version Migration | Jetbrains Qodana Bamboo End of Life: How to Prepare and Choose the Right CI/CD Replacement - The JetBrains Blog Structuring IntelliJ Plugins with Optional Content Modules - The JetBrains Blog YouTrack Security Update: Upgrade Required for YouTrack Server - The JetBrains Blog Qodana Is a Finalist in the 2026 CODiE Awards for Best DevOps Tool - The JetBrains Blog JetBrains Marketplace Ecosystem Security Update: Addressing Malicious Third-Party AI Plugins - The JetBrains Blog Your JetBrains IDE Expertise, Now on LinkedIn - The JetBrains Blog The JetBrains AI Coding Agent moves to general availability Step Rejection Fine-Tuning: Squeezing More Signal from Noisy Agent Trajectories - The JetBrains Blog The Anthropic Debate - The Qodana Blog dotInsights | June 2026 | The .NET Tools Blog Inside JetPride: How JetBrains Employees Built an LGBTQIA+ Community | The Life at JetBrains Blog MPS 2026.1 Release Candidate Arrives | The MPS Blog Best Python AI Frameworks in 2026 | The PyCharm Blog Contribute to the State of PHP Survey | The PhpStorm Blog The Rules of Zero, Three and Five - The Qodana Blog Agentic AI Governance: Designing for Accountability and Control | The JetBrains AI Blog JetBrains Plugin Developer Conf 2026 – Call for Speakers | The JetBrains Platform Blog Fewer False Positives in RustRover 2026.2|The RustRover Blog Rider 2026.2 EAP 5: Code Quality Checks for Your AI Agents, and More. | The .NET Tools Blog Why Zig Isn’t 1.0 (Yet) | The JetBrains Blog Java Annotated Monthly – June 2026  | The IntelliJ IDEA Blog IntelliJ IDEA 2026.1.3 Is Out! | The IntelliJ IDEA Blog RustRover at RustWeek 2026 | The RustRover Blog WPF Hot Reload Is Here: Edit Your XAML and Watch It Update Live in Rider | The .NET Tools Blog Kotlin 2.4.0 Released | The Kotlin Blog IntelliJ IDEA 2025.3.6 Is Out! | The IntelliJ IDEA Blog Async VFS Content Writes - What Plugin Authors Need to Know | The JetBrains Platform Blog Top Agentic Frameworks for Building Applications 2026 | The PyCharm Blog Toolbox App 3.5: Better Remote Development Observability, More Reliable Enterprise Configuration, and Smoother Everyday Interactions | The Toolbox App Blog Stop Pasting Tokens: OAuth2 Login for JetBrains IDE Plugins | The JetBrains Platform Blog Fix Common TypeScript Issues | The Qodana Blog Mellum2 Goes Open Source: A Fast Model for AI Workflows | The JetBrains AI Blog What Does It Actually Take for an IDE to Understand Rust? Hibernate 7.4 New Features | The IntelliJ IDEA Blog How We Use AlphaEvolve to Make Complex IDE Algorithms Faster | The JetBrains AI Blog JetBrains Academy – May Digest | The JetBrains Academy Blog TeamCity 2026.1.1 Is Now Available | The TeamCity Blog The Upcoming Sunset of DataSpell | The DataSpell Blog Deprecating dotMemory Unit | The .NET Tools Blog Koog 1.0 Is Out: Stable Core, Better Interop, and Multiplatform Observability | The JetBrains AI Blog Introducing the Cloud9 JetStream Theme for JetBrains IDEs | The JetBrains Blog Build a Live Object Detection App for the Reachy Mini With TensorFlow and PyCharm | The PyCharm Blog IntelliJ IDEA 2026.2 EAP Is Open | The IntelliJ IDEA Blog How AI Agents Can Work with TeamCity | The TeamCity Blog
Modern C++ Support in CLion: What’s New | The CLion Blog
Oleg Zinovyev · 2026-06-10 · via The JetBrains Blog
Clion logo

A Cross-Platform IDE for C and C++

News Tips & Tricks

Modern C++ Support in CLion: What’s New

Modern C++ makes advanced high-performance techniques more accessible, with features like compile-time computation, zero-overhead abstractions, and expressive template code. But as your codebase grows, your ability to use these techniques productively depends heavily on how well your tooling understands them. Without proper language engine support, modern C++ features can lead to false positives, broken navigation, and missing completion, rather than productivity gains.

Supporting these techniques is a core part of what CLion’s language engine is built for – and it keeps getting better. In this blog post, we’ll look at the most interesting improvements introduced in recent releases. To get all the updates mentioned here, you need CLion 2026.1 or later with the CLion Nova engine enabled.

DOWNLOAD CLION

C++26 features

C++26 is a large release with dozens of new features, including ones that extend compile-time capabilities and simplify metaprogramming. CLion now supports all C++26 features except reflection, which we plan to implement in the upcoming 2026.2 release (CPP-48365). Here are some examples:

#embed preprocessor directive: This feature allows you to embed the contents of binary files – such as images, icons, or encoded text – directly into your source code at compile time as byte arrays.

constexpr unsigned char logo[] = {
#embed "logo.png"
};

constexpr std::size_t logo_size = sizeof(logo);

Before C++26, this typically required external tools or custom scripts to convert binary files into C arrays, which you then had to manually sync with the source files – #embed removes that step.

Pack indexing: You can now access individual elements of a parameter pack directly by the element’s index using the pack...[index] format, for example, values...[0], values...[2], and so on.

template <std::size_t I, typename... Ts>
constexpr auto element_at(Ts... args) {
   // Use pack indexing to access an element
   return args...[I];
}

Previously, extracting a specific element required recursive template specializations or helper utilities. Now it’s as easy as indexing into an array.

Variadic friends: This feature lets you grant friendship to all classes in a template parameter pack. This is particularly useful in patterns where a group of closely related types – such as nodes in a data structure – need access to each other’s private class members.

template <class... Ts> class X {
   int data = 42;
   friend Ts...;
};

struct A {
   int get(X<A> x) { return x.data; }
};

struct B {
   int get(X<A, B> x) { return x.data; }
};

Previously, each friendship had to be declared individually, which became cumbersome as the number of types grew.

Updates to constexpr support

Compile-time code in C++ is powerful, but debugging it often requires dealing with cryptic compiler errors and little context. CLion’s latest releases bring features and improvements that make constexpr code significantly easier to debug and validate.

Constexpr Debugger

CLion 2025.3 introduced the Constexpr Debugger – the first in-IDE debugger to let you step through compile-time evaluations of constexpr and consteval code. From the debugger, you can inspect locals, navigate the call stack, and even step backward through each evaluation stage.

It’s especially helpful when constant evaluation fails. Instead of deciphering compiler errors, you can run the evaluation until failure and let CLion stop exactly at the point where things went wrong – with the full context in view.

Early detection of constexpr evaluation failures

The IDE now also provides an inspection that detects constexpr evaluation failures, for example, non-constexpr function calls or logic errors. The corresponding popup presents an evaluation trace to help you identify and fix the problems more easily.

You can also use the Constexpr Debugger to investigate the cause of a problem in more detail by clicking Run evaluation until failure in the popup. The Constexpr Debugger will run and stop at the point of the failed evaluation. You can then use Step Into, Step Over, Step Backward, and other actions to debug the code. Learn more in the documentation.

Other updates to constexpr evaluation

We extended CLion’s constexpr evaluation capabilities to cover a wider range of C++ constructs and features, including:

  • switch statements
  • if statements with initializers
  • Structured bindings
  • Trivial default initialization
  • C++20’s defaulted operator==

The following example shows CLion’s warning when evaluation of operator== fails:

The constexpr evaluator still doesn’t support some constructs. You can track our progress in the related YouTrack issues and upvote the ones that matter most to you.

New GCC and Clang extensions

We’ve improved the compatibility with compiler-specific extensions by adding support for the following:

Nested functions: CLion now supports the GCC extension for defining functions inside other functions in C code, which is useful when working with legacy codebases or embedded projects that rely on this pattern.

int main(void) {
   int outer_var = 10;

   // Define the nested function
   void nested_function() {
       printf("Inside nested function\n");
       printf("Accessing outer variable: %d\n", outer_var);
   }

   // Call the nested function
   nested_function();
   return 0;
}

_Nullable and _Nonnull qualifiers: Clang’s pointer nullability qualifiers indicate whether a pointer can be null or not. The parser now recognizes these qualifiers, so code that is shared with Apple platforms or that uses Clang-specific APIs no longer produces false-positive warnings or incorrect inspections.

Conditionals with omitted operands: The x ?: y shorthand, where the middle operand is omitted, is especially useful in GNU C codebases, providing a fallback value without repeating the condition.

Designated initializer range syntax: This GCC extension lets you initialize a range of array elements to the same value in a single expression, like int arr[100] = { [0 ... 49] = 0, [50 ... 99] = 1 };. This syntax is handy in embedded and system development for initializing hardware register maps, lookup tables, or memory-mapped I/O buffers that require arrays to have predictable default values.

New code assistance and refactoring features

CLion’s code assistance and refactoring capabilities have received several improvements designed to reduce manual cleanup and repetitive work. These include smarter module imports, new inspections that catch common mistakes early, refactoring support in inactive code blocks, and automatic definition sorting.

Auto-import for C++20 modules auto-import

When you use an exported symbol but the corresponding import declaration is missing, CLion suggests inserting it automatically with a shortcut (Alt + Enter on Windows and Linux or ⌥↩ on macOS).

Note that currently, auto-import for C++20 modules works for symbols exported directly from primary module interface units and module partitions.

New inspections

We’ve added several new built-in inspections that help you keep your code cleaner and easier to read. Here are some examples:

  • CLion now automatically detects duplicate forward declarations, highlights them in gray, and offers a quick-fix to remove them, so you don’t have to hunt for them manually. You can also do this with a shortcut (Alt+Enter on Windows and Linux or ⌥↩ on macOS).
  • If your project targets C++20 or later and contains the typename keyword in contexts where it’s no longer required, CLion identifies these cases and offers a quick-fix to remove them.
  • The IDE now detects instances where C++20 designated initializers are in the wrong order relative to their declarations within the struct. CLion highlights the problem directly in the editor, so you can see it immediately rather than after compilation.
  • Another new inspection warns you when a function has a different access level than the virtual function it overrides in the base class. For example, a public virtual function in the base class can be overridden as private in the derived class. CLion helps you catch such access mismatches, which are often unintended but allowed by compilers.

Improved code assistance and refactorings in inactive code

Code analysis, code completion, and local refactorings are now fully available inside inactive preprocessor blocks, so you can edit platform-specific code without switching your build configuration.

Automatic definition sorting

CLion can now automatically sort function definitions in a source file to match the declaration order in the corresponding header file. For a one-time fix, use the Sort definitions by the order of declaration context action to reorder definitions for a single function, a whole file, or the entire project. For continuous monitoring, enable the corresponding style option in Settings | Editor | Code Style | C/C++ | Syntax Style. CLion will then flag any mismatches with an inspection, and you can fix them automatically with a single click.

The ability to edit naming rules

CLion now provides a new Edit Naming Rule dialog as part of the work to improve support for C/C++ naming rules. To get to this dialog, navigate to Settings | Editor | Code Style | C/C++ | Naming, then select a rule and click Edit, or just double-click it.

Each naming rule allows one or more styles, and for each style, you can configure the base naming pattern, the prefix and suffix, and more.

Conclusion

The improvements covered in this post are powered by CLion Nova, CLion’s custom C++ engine. Many thanks to the C++ Core team for developing it!

We’ll keep highlighting the most interesting language engine updates in upcoming release posts – more to come.

DOWNLOAD CLION

Subscribe to CLion Blog updates

Discover more