Quantcast
Channel: CLion : A Cross-Platform IDE for C and C++ | The JetBrains Blog
Viewing all 680 articles
Browse latest View live

CLion 2017.2 EAP: CMake Cancel and more

$
0
0

Hi,

A new CLion 2017.2 EAP is now available (build 172.2953.14).

C++ code analysis

CLion supports va_* macros in a more accurate way now. This means less false-positive code analysis, like for example, incorrect unused code inspection (CPP-9748).

Besides, CLion now works more accurately with GCC and Clang compiler predefined macros.

Performance

After optimizing the parsing of the compiler predefined macros in CLion, some performance improvement during the reindexing was achieved.

CMake

CMake reload can take significant time, and sometimes you decide to cancel when it’s already running (to introduce additional changes or just to postpone this time-consuming operation). It’s now possible in CLion – Stop button is available in the CMake tool window:
reload_cmake
If you enable the auto-reload function, then currently running CMake command will be stopped automatically, in case you continue typing in CMake file, and the new one will be scheduled.

Besides, CLion now prints [Finished] in every output tab for each CMake configuration being reloaded and finished (not cancelled):cmake_finished

Check the full release notes here.


Download CLion 2017.2 EAP

Your CLion Team
The Drive to Develop


CLion 2017.2 EAP: fixes in C++ parser and Clang-Tidy integration, C++17 in the New Project wizard and more

$
0
0

Hi,

Meet our new CLion 2017.2 EAP (build 172.3095.8)!

Clang-Tidy integration improvements

CLion 2017.2 EAP started with the Clang-Tidy integration. Clang-Tidy warnings are shown the same way as CLion’s own built-in code inspections. Similarly you can use Alt+Enter to apply Clang-Tidy quick-fixes where available.
This EAP build fixes some issues related to this integration:

  • CLion used to continue highlighting the code and showing the warning for a couple of seconds after the quick-fix was applied. This is partially fixed now. The problem only left for the cases when the fix and the warning are located in various lines, or when the user calls Undo for a quick-fix.
  • False inspection is fixed (CPP-9404).
  • Clang-Tidy checks invoked from CLion are now generally more accurate (CLion now passes proper compilation settings, user and system headers, and other information to Clang-Tidy).

C++ support

This build provides fixes for:

  • Issue with constructor inheritance with using and type alias names (CPP-2807).
  • False warning about parameter type mismatch for const boost::optional and int (CPP-5852).
  • And a couple of regressions introduced recently (CPP-9834, CPP-9991).

Performance

We continue our work on performance improvements in CLion. This EAP build brings fixes for laggy Enter and Backspace handle on some projects (when, for example, cursor enters a new block, moves to a new line and causes the code indent).

And more

C++17 is just around the corner. Besides, CLion now includes bundled CMake 3.8, that supports set(CMAKE_CXX_STANDARD 17) command to set C++17 for the project. Therefore we’ve added C++17 option to the list of standards in the New Project… wizard:cpp17_new_project
The corresponding set command will be added to CMakeLists.txt generated for your new project in this case.

Check the full release notes here.


Download CLion 2017.2 EAP

Your CLion Team
The Drive to Develop

CLion 2017.2 EAP: force step into, PCH for MSVC and more

$
0
0

Hi everyone,

Check the new CLion 2017.2 EAP build (172.3198.18). This build includes a couple of important improvements and enhancements to the currently available features.

Force Step Into

CLion 2017.1 brought disassembly view for debugger. It allows stepping into disassembly code when the sources are not available, while debugging with GDB.
However, seems, that quite often, when pressing Step Into F7, users don’t expect disassembly code, but rather just skipping all the frames without the sources. That’s why we’ve moved the functionality to the Force Step Into Shift+Alt+F7. That means that from now on to get to the disassembly code you need to use Force Step Into, while usual Step Into will jump to the closest frame with sources:
force_step_into

Precompiled headers for Microsoft Visual C++ compiler

Enhancing experimental Microsoft Visual C++ compiler support, we’ve added a support for precompiled headers. That means that the symbols from PCH are now correctly resolved and all the actions like completion, navigations, etc. are now working for them.
Mind, that due to the MSVC limitations, all PCH-related operations/options (including creating and using precompiled headers) have to be mentioned in the CMake build script.

Performance

Go to navigation actions might be time-consuming, especially when building a long list of options. For example, when you navigate to overridden functions. Recently, we’ve started a big overhaul to improve the performance of these actions. The main idea is to make them asynchronous and cancelable.
This build comes with Go to subclass and Go to overridden functions actions updated in the suggested way. Now, if you click on a navigation icon in the left gutter and decide not to wait for the IDE to finish building a full list of options to navigate to, you can cancel the action by moving the cursor out of the navigation popup window.

Check the full release notes here, try this build and let us know what you think.


Download CLion 2017.2 EAP

Your CLion Team
The Drive to Develop

CLion 2017.2 RC: C++ type casts in quick-fixes

$
0
0

Hi,

CLion 2017.2 release is coming closer and today we are glad to announce Release Candidate build (172.3317.14).

C++ cast operators

CLion is able to indicate situations when user is missing a type cast. As a quick-fix (Alt+Enter), CLion suggested a C style cast previously. Now CLion suggests C++ type casts: static_cast, dynamic_cast, reinterpret_cast, const_cast:

cast_operators

If there is no single valid C++ style cast operator, the C style cast will be used. And if you want CLion to permanently use C style cast operators, simply switch off the setting in Settings/Preferences | Editor | Code Style | C/C++ | Code Generation | C++:

cpp_cast_operations

Besides, a couple of false positives code analysis checks were fixed: CPP-989 and CPP-3111.

You are welcome to download and try the RC build (no license is required). If you find any bug at all, please, report to our issue tracker.


Download CLion 2017.2 Release Candidate

Release notes are available by the link.

Your CLion Team

JetBrains
The Drive to Develop

CLion 2017.2 Release Candidate 2

$
0
0

Hi,

We are approaching the final steps towards the CLion 2017.2 release and today we are glad to announce CLion 2017.2 Release Candidate 2 (build 172.3317.49). Give it a try, and if you find any bug at all, please file an issue in our tracker.


Download CLion 2017.2 RC2

Non-project files

The users of CLion 2017.2 Release Candidate 1 noticed a new file-wide notifications appeared in non-project files.
not_in_prj

Files that do not belong to any CMake target are considered as not included into the project. For CLion it means that code insight features should be limited in such files, for example refactorings should not be performed. To identify these files with ease CLion marks them as greyed out in the project view. Now you can also easily identify such files in the editor, thanks to the file-wide notifications.

By the way, when you create new C++ class or C/C++ source or header file CLion suggests to add a new file to CMake target and suggests most probable options to select from. Use this feature to get all your new files included into CMake targets.

Besides, several performance improvements (in indexing) were implemented in this build. Release notes are available by the link.

Please note that to use CLion 2017.2 RC2 you need to have an active subscription (or start a 30-day evaluation period).


Download CLion 2017.2 RC2

Your CLion Team

JetBrains
The Drive to Develop

Live Webinar: Refactoring C++ code

$
0
0

This webinar will give an introduction to finding code smells and refactoring them towards cleaner code.

It will show how to break down a refactoring into small steps that are easy to perform safely with the help of CLion’s powerful automated refactorings aides or manually, if needed. In addition, it will touch on the most important strategies we can use to stay in control of the refactoring process.

Join us Thursday, August 17th, 4pm – 5pm GMT (6pm – 7pm CEST, 9am – 10am PDT).


Register now!

Space is limited.

About the presenter:

Arne MertzArne Mertz
 
Arne has been an enterprise C++ developer for almost a decade. Due to his involvement in large legacy projects in the insurance market, he has developed an interest in software craftmanship topics. Since the beginning of 2015 he blogs frequently about modern C++, clean code and related topics. Arne works at Zühlke Engineering, currently dipping his toes into the world of C++ on embedded devices.

 

 

Links:

 

Please, register now to reserve a seat.

Webinar Recording: Developing C/C++ projects with CLion IDE and Conan C/C++ package manager

$
0
0

The recording of our July 11th webinar with Diego Rodriguez-Losada and Luis Martinez de Bartolome, Developing C/C++ projects with CLion IDE and Conan C/C++ package manager, is now available on JetBrainsTV YouTube channel.

In this webinar we’ve discussed the process of developing large C/C++ projects using the package modularization and reuse offered by Conan package manager, and the power and convenience of the CLion IDE, using the CMake build system.

Useful links:

Agenda:

  • 00:37 – Consuming existing packages of OSS libraries Boost, Poco, etc
  • 10:10 – How to create packages from your own source code
  • 15:30 – Conan profile
  • 19:30 – Totally skipping the local cache to depend on a locally edited package
  • 43:00 – Questions

Below are some questions from our webinar answered by Diego, Luis and Anastasia.

Q: Are there any plans about Conan integration into CLion? Some UI, ability to have Conan settings in CLion, etc.
A: We’ve discussed this opportunity with the Conan team, as well as inside the CLion team. It looks interesting to us and we feel there is room for a plugin here. Together with Diego and Luis we’ve came up with some understanding of the integration scope and priorities. However, due to the lack of the resources in both teams, we are not on it right now. Still I believe, in future we could come up with a Conan plugin for CLion (which may even go to OS to get more contributors from the community).

Q: Does Conan support cross-compilation?
L: Yes, check the docs here, we have some examples with ARM and Android.
D: It does, and we are aware of several users who are heavily cross-compiling. There are several features for this, like build requirements that allow to inject dev tools and toolchains, like CMake Helper that I was demonstrated earlier, and others. In documentation you can find samples with cross-compiling to Raspberry Pi, Android, cross-compiling from Windows to Linux, etc.

Q: Which languages (others than C++) does Conan support? Can I use Conan for Go or Rust?
D: Yes. As you can see the recipe is quite general. When we realized that Conan recipes are very flexible, we built some proof-of-concepts. For example, for Go language. That means you can use Conan to manage dependancies for Go.
There is also a nice features that you can create Python packages with Conan – one of the feature our users were requesting. Thus you can reuse the Python code into your recipes.
I guess all the samples are in our documentation.

Q: How can I start my own Conan server?
D: Well, there are a few options. The first one is an open sourced Conan server (MTI license), It’s included into Conan distribution, so you get it when Conan is installed on your machine. You can easily launch it.
In case you need something more powerful, that is able to scale to big things, Conan now has an integration with Artifactory. Thus you can create your own Artifactory instance with Conan repositories and use it.
The third option is a bintray. If you are distributing OS, you can create packages for OS libraries and distribute them via bintray.

Q: Your samples are all on Windows. Are there any general differences when using on Linux?
L: It’s the same process for Linux, Conan is multi-platform and we have binary already available at bintray.com conan-center repository for several compilers.

Q: How shared object libs are located at runtime? Does Conan assume it will find them in the local cache, or can it get them from a shared network location?
L: You can locate them in the local cache and we have an “Imports” methods that you can use to copy the shared libraries to a local directory. There are several different approaches, for windows dlls the common one is to import the dll to the project bin dir

Q: How compiler profile can be added? Is it just a plain text file stored in .conan directory?
L: Yes, .conan/profiles, but you can also specify a custom path with –profile=path/to/profile. Plain text, very simple. Take a look here.

Q: Who will support boost library in the repository? It is not using CMake for the build.
L: It doesn’t matter, Conan is not coupled with any build system. The Conan recipe can explicitly call the boost build system, the only important thing is the libraries and the headers you get and know the names and the location of them. So consumers can use them from CMake or any other build system.

Thanks to all the attendees for the questions!

About the presenters:

Diego Rodriguez-LosadaDiego Rodriguez-Losada

Diego’s passions are robotics and SW engineering and development. He has developed many years in C and C++ in the Industrial, Robotics and AI fields. Diego was also a University (tenure track) professor and robotics researcher for 8 years, till 2012, when he quit academia to try to build a C/C++ dependency manager and co-founded a startup. Since then he mostly develops in Python. Diego is a conan.io open source C/C++ package manager co-creator and maintainer, now working at JFrog as SW engineer and C/C++ advocate.

 

Luis Martinez de BartolomeLuis Martinez de Bartolome

Luis is a full stack software engineer with more than 13 years of experience. He has spent the last 5 years mitigating the pains of C/C++ development flows & dependency management. Co-founder of Conan and a proudly Frog 🐸, today spends his time developing Conan and its ecosystem, playing ukulele, growing hydroponic lettuces and enjoying his two kids.

 

Cheers,
The CLion Team

CLion 2017.2 released: Clang-Tidy, Force Step Into, better C++ support and performance improvements

$
0
0

Please welcome the new release of your favorite cross-platform C/C++ IDE – CLion 2017.2! Focusing on C++ correctness and performance improvements, it also brings Clang-Tidy integration to expand the number of code analysis checks, a better way to get disassembly view, and lots of bug fixes and other improvements.

800x400_Clion_2017_2_Released@2x

Read on for details and get a free 30-day trial to evaluate all the new features and enhancements:

Download CLion 2017.2

Better code quality: Clang-Tidy integration

CLion has 30+ code built-in code inspections to alert users to unused code, incompatible types, wrong declaration order, uninitialized variables and so forth. It also performs Data Flow Analysis to catch infinite recursion, endless loops, missing returns, and unreachable code. To expand the list of checks and help you ensure better code quality, we’ve integrated Clang-Tidy into CLion 2017.2.

In CLion Clang-Tidy checks are shown the same way as CLion’s own built-in code inspections, and quick-fixes are also available via Alt+Enter:

modernize

cppcoreguidelines

Clang-Tidy’s list of checks is long and impressive, and CLion got most of them enabled by default. To customize the list of checks and tweak it to your needs, as well as company policies and standards, go to Settings/Preferences | Editor | Inspections | C/C++ | General | Clang-Tidy settings and use the text-formed string in the Clang-Tidy command line format:
clang_tidy_settings

Enable C++ Core Guidelines or Clang Static Analyzer checks, try Modernize checks and many others. It’s even possible to add your own checks to Clang-Tidy and get them automatically in CLion. However, be sure to use JetBrains’ fork of Clang-Tidy (LLVM, Clang, Clang Tools)
until our patches for the output format and response files (patch 1, patch 2 part 1, patch 2 part 2) are accepted into LLVM master.

To read more about the integration and our plans for expanding it, see this blog post.

More accurate C++ parser and enhanced quick-fixes

Looking ahead, we’re planning a major overhaul of CLion’s C++ parser. Starting from bottom to top, we will ensure it is correct on each level, unmasking hidden problems on the way. Some work has already been done.

At the same time, CLion 2017.2 brings dozens of fixes in various parts of the C++ parsing and resolving engine. From the user perspective, it means a reduced number of false-positive code analysis checks, more accurate navigation, refactorings, and other benefits.

If you are interested in the full list of fixes, please see our tracker.

In addition, CLion 2017.2 comes with a new quick-fix to preserve non-trivial constructor calls on an unused variable. It can be used for the cases when constructor still does some useful work:
unused_var

Besides, when the cast is needed in C++ code, CLion now suggests C++ type casts (static_cast, dynamic_cast, reinterpret_cast, const_cast) instead of C-style casts:
cast_operators

You can turn this behaviour off in Settings/Preferences | Editor | Code Style | C/C++ | Code Generation | C++, if necessary.

PCH for Microsoft Visual C++ compiler

If you use CLion’s experimental support for Microsoft Visual C++ compiler, you’ll be glad to learn that precompiled headers are now supported for this case (in addition to previously supported GCC and Clang). Note there are some limitations to keep in mind.

Easy start with C++17

C++17 will be officially signed later this year, but as we see, many C++ developers have already moved to it or at least plan to do so. That’s why we’ve added C++17 to the list of standards in the New Project wizard. This means CLion will automatically add set(CMAKE_CXX_STANDARD 17) to the CMakeLists.txt generated for the new project.
cpp17_wizard

Force Step Into for disassembly view

Disassembly view (for GDB) was recently added to CLion 2017.1, and now we’re adjusting its behavior based on your feedback. Some users have been facing the problem of getting into disassembly code unexpectedly, whereas they would prefer to simply skip all the frames without sources. That’s why we’ve relocated the functionality to the Force Step Into Shift+Alt+F7 action, while the usual Step Into F7 skips the frames without sources. We hope this makes the feature easier to use and more intuitive.
Besides, the name of the tab with the disassembly view was updated to show the name of the currently running configuration:
force_step_into

Note, that on macOS (when using GDB) Step Into still falls into disassembly view on std function calls and in some other cases (CPP-10181).

Debugger fixes

To improve the debugging process in CLion, this release comes with some important enhancements and fixes.

To inspect elements of array with big indexes without constantly clicking Expand to the next 50 elements, you can adjust the value cidr.debugger.value.maxChildren in the Registry. (Open the Find Action dialog (Shift+Ctrl+A on Linux/Windows, ⇧⌘A on macOS), type Registry, and then type cidr.debugger.value.maxChildren in the Registry to search for the setting.) However, remember that this change may lead to increased timeouts during array evaluation while debugging and may affect the IDE in general (beyond your current debug session or project).

Other fixes implemented in the GDB driver include:

  • Command time out when trying to attach to a non-existent local process
  • Incorrectly escaped backslashes in program arguments on Windows

Automatic Run/Debug configurations for Google Test

To perform unit tests with ease, CLion provides a built-in test runner that allows you to rerun tests/failed tests in one click, export results, navigate to the sources, and view the results in a tree view. To get the test results there, a special Run/Debug configuration should be used. For Google Test it can be created automatically by CLion for every target linked with gtest, and now with gmock.

Non-project files

Non-project files (files that do not belong to any CMake target) can now be identified easily in the editor, thanks to the the new file-wide notification:
not_in_prj

For CLion it means that code insight features should be limited in such files, for example refactorings should not be performed.

It might be useful to know, that when you create new C++ class or C/C++ source or header file CLion suggests to add a new file to CMake target and suggests most probable options to select from. Use this feature to get all your new files included into CMake targets.

Improved performance

Our team is constantly working on performance improvements, doing our best to make the IDE responsive and effective. Thanks to many CPU snapshots, logs and sample projects that you’ve shared with us via tech support and the CLion tracker, we can identify the areas that can be improved and make the appropriate changes.

The first performance enhancement in CLion 2017.2 is cancelable actions. The idea is to use them where possible to prevent time-consuming operations from freezing the IDE. This time we’ve updated Go to subclass and Go to overridden functions actions, which build a list of options and can require quite a lot of time to finish. To cancel the action, simply click to the area out of the navigation popup:
cancelable_goto

Another time-consuming operation is CMake reload. You can now cancel it at any time, by simply clicking the Stop button in the CMake tool window. The output logs were updated to get the indication of successfully finished reload (to distinguish from a canceled run):
cmake_reload

Among other performance-related changes:

  • We’ve fixed laggy Enter and Backspace on some projects (for example, when the caret enters a new block, moves to a new line, or causes a code indent).
  • We’ve shortened indexing time by optimizing the way compiler-predefined macros are parsed in CLion.

Find in Path UI enhancements

In version 2017.1, the Find in Path window turned into a convenient and compact popup with immediate preview. CLion 2017.2 brings several improvements to make the UI more functional:

  • A left-side gutter is now available in the preview, with navigation icons, and markers for local changes.
  • To make the preview even more compact, results from the same line are merged into one line in the preview panel.

find_gutter

Do more with new VCS features

Thanks to IntelliJ Platform, this release brings lots of improvements for Version Control Support:

  • If you need to revert some commits, select them and run the Git command Revert from the Git Log view.
  • To fix a typo in a commit message, or just to update it, use the Reword action (applicable to any commit that has not been pushed yet).
  • To keep commit messages easy to read and expressive, use new Preferences/Settings | Version Control | Commit Dialog settings. Configure whether to have a blank line between subject and body, set maximum text length, and check the spelling in your comments.
    commit_messages
  • A quick-fix and the Reformat action are available in commit messages:
    commit_message_inspection

That’s it! Explore all the new features in even more detail on our website. Start your 30-day free evaluation and try out all these new features and fixes.

Download CLion 2017.2

Your CLion Team

JetBrains
The Drive to Develop


Let’s move on! CLion 2017.3 roadmap

$
0
0

Hi,

CLion 2017.2 was released just a week ago, but we hope you already gave new version a try and shared your feedback with us. If not, get your free 30-day trial on our site now.

Before moving on to CLion 2017.3 and sharing the roadmap, we’d like to thank our EAP users.

Special thanks

To follow a good tradition, we have selected the most active EAP users with the most valuable contribution and rewarded them with a free personal 1-year subscription for CLion (to extend their current subscription or to get a new one). So let us thank:

  • Ivan Smirnov (YouTrack handle: aldanor)
  • Victor Sergienko (YouTrack handle: singalen)
  • Mario Charest (YouTrack handle: mcharest)

Each of you will receive a personal email with details on how to claim your license. (If for some reason you do not get any email from us within a week, ping us here in the comments.)

CLion 2017.3 and more

And now let’s move to CLion 2017.3!

Note: The following is a preliminary plan; we cannot guarantee that all of the features listed below will be included in CLion 2017.3.

Several interesting features are currently under investigation. The analysis stage doesn’t guarantee that anything functional will make it into the actual release, however your feedback, use cases and comments are extremely valuable. Feel free to share them!

  • Under investigation:
    • Integration with Valgrind (CPP-548)
    • Remote development support (since the topic in general is too broad, we’ll try to focus on some particular improvements, however it’s only a general investigation going on now without any clear decision)
  • Language support:
    CLion 2017.2 got many fixes in various areas of C++ language support. Now we’ve decided to change the strategy a bit. We analyzed issues with the language support on the whole and identified levels, where there is room for improvement. We plan to start from the bottom and work our way up to the top, implementing big overhauls in the problematic areas. This might take more than one release cycle even for one area, but you can expect many issues to be resolved with each finished cycle.

    Besides this, we plan to cover the following:

    • The work on the set of issues with the JUCE code will be continued (for example, OC-8211).
    • Code generation should respect templates (for example, generate definitions).
  • Multiple toolchains support (CPP-10116)
  • Debugger:
    • UI for providing custom pretty printers / .gdbinit for the project.
    • Check and bundle, if possible, GDB 8.0 and LLDB 5.0.
  • Unit tests
    • Gutter icons for unit tests (OC-12323).
    • Fixes and improvements for Google Test and Catch.
  • Continue with performance improvements.

That’s it! Any new feature request? You are always welcome to send them to us over our tracker!

Your CLion Team

JetBrains
The Drive to Develop

Live Webinar agenda and demo project: Refactoring C++ code

$
0
0

The webinar about refactoring C++ code is planned for August. Arne Mertz, the author of popular Simplify C++ blog, will talk about general strategies and effective refactoring process.


Register now to reserve a seat!

The preliminary plan for this webinar:

  • Finding and extracting domain concepts
  • Naming some code smells and getting rid of them
  • General refactoring strategies, e.g. duplicate & reduce, parallel change
  • And all of it using and explaining CLion’s refactoring capabilities

You can also clone a demo project from GitHub. If you plan to follow the webinar in CLion, go to VCS | Checkout from Version Control | GitHub and use this link:
https://github.com/arnemertz/commandline-videostore-cpp.git

See you!

CLion 2017.2.2 EAP: configure Clang-Tidy checks you need

$
0
0

Today we start CLion 2017.2.2 Early Access Program, build 172.3968.3 is available here. Please, note that this EAP build requires an active subscription (or you can start a 30-day evaluation period).

Clang-Tidy integration: disable individual checks and other improvements

CLion 2017.2 brought Clang-Tidy integration, that expands the list of CLion’s checks and helps you ensure better code quality. We’ve received a lot of useful feedback and today are happy to address several important issues:

  • Now you can use your own Clang-Tidy instead of one bundled into CLion. To do so provide a path to the Clang-Tidy binary in Settings/Preferences | Languages & Frameworks | C/C++:
    clang_tidy
    The main benefit of this change is that you can now checkout the LLVM master repository, add your own checks to the Clang-Tidy and get them instantly in CLion!

    Please, be sure you are using Clang-Tidy version 6.0.0 and more (or any other version, but with this and this patches applied).

  • You can now disable individual Clang-Tidy checks from the CLion context menu:
    disable_move_check

    This will update the list of enabled/disable checks in Settings/Preferences | Editor | Inspections | C/C++ | General | Clang-Tidy:
    clang_tidy_settings

    In this context menu you can also find an option to suppress Clang-Tidy check for a particular line via // NOLINT.

  • Default configuration of enabled/disabled checks was slightly updated.

That’s it! Full release notes are available by the link.

Your CLion Team

JetBrains
The Drive to Develop

CLion 2017.2.2 RC is available

$
0
0

CLion 2017.2.2 Release Candidate build is available for download, build 172.3968.17.

Paste simple when paste from history

Paste from history (Shift+Ctrl+V on Linux/Windows, ⇧⌘D on macOS) you can easily cope with multiple code snippets to copy/paste. Just copy them all and have a list available in the IDE.
From now on you can find Paste Simple option there (in addition to Paste), that helps when you don’t want the IDE to apply formatting or escape characters:
paste_simple

Clang-Tidy support regression for MSVC

Previously, EAP build brought several useful enhancements in the Clang-Tidy integration:

  • Ability to disable individual checks.
  • Ability to suppress Clang-Tidy check for a particular line via // NOLINT.
  • Ability to use your own Clang-Tidy binary instead of the bundled one.

The changes, however, broke the Clang-Tidy for MSVC in some cases, which is now fixed.

Check the full release notes by the link.

Your CLion Team

JetBrains
The Drive to Develop

Webinar Recording: Refactoring C++ code

$
0
0

The recording of our August 17th webinar with Arne Mertz, the author of Simplify C++ blog, is now available on JetBrainsTV YouTube channel.

In this webinar we’ve talked about general strategies and effective refactoring process, all of it using and explaining CLion’s refactoring capabilities.

Useful links and further reading:

  • Demo project can be taken from GitHub.
  • “Refactoring to Patterns” by Joshua Kerievsky
  • “Refactoring” by Martin Fowler
  • martinfowler.com

The video includes the time stamps:
00:10 – Sample project description and overall structure
01:55 – Extract function and remove duplicates
07:44 – Parallel change strategy (sample 1: movie structure)
16:20 – Parallel chance strategy (sample 2: rental structure)
24:00 – Extracting domain logic into a separate class: extract frequentRenterPoints to the class
29:00 – First round of Q&A
36:00 – Duplicate and reduce technique
48:42 – Second round of Q&A


Questions
Q: Could you please share some links for further reading on the topic and the strategies you’ve mentioned?
A: References where these names come from are (among others): The book “Refactoring to Patterns” by Joshua Kerievsky, “Refactoring” by Martin Fowler – see also his website, e.g. for Parallel Change.

Q: Don’t you violate the Single Responsibility Principle by just making movie a struct and keeping related behaviour in the main app?
A: Yes and no. There is no actual movie related behaviour. And I’m not done with all the refactoring steps for now. Input in the movieData variable could be treated as movie related, but can be also seen as just an Input. Besides, it will later be refactored into Console and MovieRepository classes.

Q: Why to use Inline and not simply keep functions separated?
A: I’ve inlined free functions as they are a part of the class logic. It actually happens quite often when you refactor something, move it around and then inline, and all this for the goal of moving a bunch of lines to another place.

Q: What to do if we don’t have tests on the project and so can’t check the changes introduced by refactorings easily?
A: That’s a difficult question. As Bjarne Stroustrup says, if you haven’t tested your application, it doesn’t work, as you can’t say it works. So the first step is to get tests. That’s a prerequisite for any refactoring because, if you don’t have tests to make sure you don’t break anything, don’t touch it. So the tests are really essential for this kind of work.

Q: How do you approach program logic? How do you analyse program so you can split program into classes and functions?
A: If we talk about the program logic, we often have names that are part of our domain (business) language. Usually I try to go into the direction of domain driven design. If I have a name like rental or movie, these are indications that we need classes for these different concepts. And usually we see quickly that there is logic that belongs to these concepts as well.

About the presenter:

Arne MertzArne Mertz
 
Arne has been an enterprise C++ developer for almost a decade. Due to his involvement in large legacy projects in the insurance market, he has developed an interest in software craftmanship topics. Since the beginning of 2015 he blogs frequently about modern C++, clean code and related topics. Arne works at Zühlke Engineering, currently dipping his toes into the world of C++ on embedded devices.

 

 

Links:

 

More info on refactorings in CLion is here.

Cheers,
The CLion Team

C++ Annotated: Apr – Aug 2017

$
0
0

Today we are happy to share our next compilation of C++ news with you.

Subscribe to the regular C++ Annotated and be the first to get the next edition!

C++ Annotated: April – August 2017

A long time has passed since the last edition of C++ Annotated. Which means today we have lots of great articles and news to share with you. In this edition:

  • C++ language news
    • C++20
    • Metaclasses
  • Conferences
    • Recent events like ACCU and C++Now
    • Upcoming events
  • Learning
  • Releases

C++ language news

C++20

wg21-timeline-2017-07b
With C++17 ready for final publication by the end of 2017, we can now start thinking about the future of C++ and in particular C++20. The Toronto C++ committee meeting was solely about just this! Just look:

  • Concept TS was merged into C++20 draft. It takes now only one clean syntax (out of three) and doesn’t include function concepts.
  • Coroutines TS, Networking TS and Ranges TS are done, Modules TS is quite close.
  • Several nice enhancements like designated Initializers, template syntax for generic lambdas, default member initializers for bit-fields and others.

It seems that Fall will bring even more exciting features to C++20, and maybe for example, compile-time reflection. (And here’s one to definitely have a check of the talk by Jackie Kay from C++Now). And not to mention the library evolution group and new standard library under discussion. To find out more check Herb Sutter’s traditional trip report. And if you want a summary table view, check the trip report by Botond Ballo.

Metaclasses

metaclasses
The trickiest thing about ACCU 2017 was keeping secret Herb Sutter’s keynotes on metaclasses. This was the closing talk of the conference, but it made the whole audience of the big room at the Marriott hotel stay until very late. Now, that the proposal is live and the ACCU’s talk is finally published, everyone can learn more about this exciting topic.

What can make the C++ language more powerful and simpler? Can we avoid boilerplate code? Can we talk to a C++ compiler in C++? Can we get DSLs out of C++ without vendor-specific compilers? The answer to all these questions is ‘Yes’ if we use metaclasses.

More specifically, the idea is to enable you to describe some abstractions to the compiler and get metaclasses definitions that can be later used in the code. Today struct and class are the two main ways to define a type in C++, but with metaclasses, we can access way more!

One typical example is interface, which is:

  • an abstract base class, and
  • all public virtual functions, and
  • no copy/move or data members.

Check the live sample in Compiler Explorer.

Or another one, value:

  • default construction, destruction, copy/move, and comparison (memberwise by default),
  • and no virtual functions or protected members.

Check the live sample in Compiler Explorer.

Or any of the others you create! A standard library for such metaclasses has to be created, as well as a way to include the definitions into the regular C++ code.

The full collection of links for further reading can be found in this blog post by Herb Sutter. And if you are looking for a short technical summary of Herb’s proposal, check the blog post by Jonathan Boccara.

Conferences

ACCU 2017

accuThis year’s ACCU conference was huge and not only because of the Herb Sutter’s keynotes (though now it could be a tricky task to organize something more exciting). A couple of talks worth mentioning are: Odin Holmes’ “Modern C++ Design reloaded” (again about moving in the direction of meta-programming), “Mongrel Monads, Dirty, Dirty, Dirty” by Niall Douglas (showing how errors in C++ could be handled and providing a nice comparison of the options in terms of performance), “Grill the C++ committee” session (from a C++17/20 discussion to advice on starting a C++ proposal), and many others.

The playlists with all the videos are available and organized by the days on ACCU’s YouTube account. There are also a couple of trip reports worth reading, including one from JetBrains, where we share our booth experience and general impressions and thoughts on the conference.

C++Now 2017

cppnowIf you were ever interested in cutting-edge C++ and wanted to work on new language features with a group of people with a similar deep interest in the language itself, C++Now is the proper place. A week spent in Aspen, Co, USA will fill you with dozens of bright and outstanding ideas, that will become your everyday C++ routine tomorrow.

This year’s event was no exception. While the unique feature of C++Now is a drive for discussions and collaboration that leads to hours of hot debate on-site, you can still get lots of useful information from the recordings. The playlist is already available.

And if you need recommendations on how to start over, I’d suggest you look at Tony Van Eerd’s “Postmodern C++” (awarded “Most Inspiring” and “Most Engaging”), Ben Deane & Jason Turner “constexpr ALL the things!” (awarded “Best Presentation”), all three parts of Alisdair Meredith talk about std2 (1st, 2nd, 3rd) discussing the future of the standard library in the world of modules-based approach and concept usages, and a very practical talk about Modern CMake by Daniel Pfeifer.

The JetBrains trip report can be found here.

Upcoming conferences

cppcon meetingcpp
The upcoming months are going to be pretty packed with lots of great C++ events. It will all start with CppCon 2017 in September followed by Meeting C++ 2017 later in November. These two events introduce Bjarne Stroustrup, Herb Sutter, Lars Knoll, Matt Godbolt, Sean Parent, and Kate Gregory as keynotes speakers, as well as dozens of other great speakers.
adc
The Audio Developer Conference (former JUCE) will run in London in November, and will gather audio developers from all over the world to discuss the problems in the audio processing field, the specific libraries and solutions, as well as news around C++ language.

Learning

Past, Present and Future of C++

cppcastIn May, Bjarne Stroustrup joined CppCast for the anniversary 100th episode of the podcast. He talked about his expectations for C++20 (in a nutshell, Concepts, Modules, Contracts, Networking, and likely no Reflection), as well as issues with compile times, code cleanliness and possible improvements, he also touched on the current state of the C++ committee and more.
Addressing a “time machine question” about what Bjarne would change in C++ if he could go back in time, he talked about good interfaces and the possibility of getting Concepts. Check the episode for more interesting thoughts from the C++ language creator.

Deep dive into C++ Core Guidelines

cpp_core_guidelines
Rainer Grimm runs quite an interesting blog Moderness C++, and this month there is a series of detailed posts about C++ Core Guidelines in it. Rainer started with the question why do we need guidelines for C++ coding at all? The reasons he gives:

  • The language is complicated for the novice.
  • With each modern standard, the language changes the way we think and solve problems in C++.
  • C++ is a language for safety critical systems, where the cost of error is high. But some existing guidelines are based on very old standards, and thus are outdated.

Saying this, Rainer hopes that C++ Core Guidelines will help to solve current issues. So he dedicates a series of posts to discussing the currently existing rules (350 in total) in detail, creating fables from each group and tieing them all together (posts are grouped in sections following the Guidelines structure). For example, learn about recommended practices to write Function Definitions, general rules for Classes, and many others.

Reading list

сpp_reading_listThe C++ language is tough and complicated and developers often ask about recommended books on C++ good practices. All these books are well-known, but it’s always convenient to have them all in one list. So here it is, prepared by Jonathan Boccara in his blog. One may find there lots of modern language classics like Scott Meyers series, Herb Sutter’s (More) Exceptional C++, and Modern C++ Design from Andrei Alexandrescu, there are recommended books on Boost, template metaprogramming, and more.

C++ Online Compilers

Another list that might be useful for many C++ developers is published by Arne Mertz in his blog Simplify C++. That’s the list of online C++ compilers. This could serve several goals:

  • Quickly check C++ code snippets without setting the whole toolchain on your machine.
  • Compare several compilers or several versions of one compiler (especially for the case, when you develop using one version and build on a target platform using another one).
  • Learn and experiment with the new language features.

You can also often share the code snippet online using such services.

Compiler Explorer (by Matt Godbolt) is one of the most famous online compilers. It’s often used during meetups and conference presentations, especially when talking about language features. It also shows the assembly produced by the compilers. But there are more names mentioned in the blog post, with their peculiarities highlighted.

Refactoring C++ code webinar

clion_webinar_Refactoring_C++_code
On August 17th we’ve run a live webinar with Arne Mertz as a speaker, the recording is now live. In an hour long talk, Arne covered general strategies and effective refactoring processes, showing lots of samples. It all started with one application where all the code was placed in one file. Step by step, Arne was extracting functions, removing duplicates, demonstrating parallel change strategy, extracting domain logic into a separate class and playing with the duplicate & reduce technique. There is a sample project available on GitHub, so you can follow the whole process.

Conan C/C++ package manager webinar

clion_webinar_Developing_C_C++_Projects_with_CLion_IDE_and_Conan_C_C++_Package_Manager
If you have ever developed a large C/C++ project or were interested in reusing certain packages and libraries, you might wonder about package and dependency managers for C/C++, then Conan is what you are looking for! In July we did a live webinar with SW Engineers from the JFrog team, who are actively contributing to Conan. An hour talk covered topics such as: creating packages from your own sources, discussing Conan profiles (what are they and how they help), and a way to skip the local cache to depend on a locally edited package. As usual, the demo project is available to try all the tips on your own. Find the recording by the link.

Compile-time string concatenation

Can you concatenate two strings in compile-time in C++? Can you do that with C++11? The blog post by Andrzej Krzemieński started with a typical static initialization order fiasco sample:
concat_strings
Quite a common solution might be “introduce a function notation to read a constant value”, but there are several reasons why this is not ideal and can lead to slow-downs. And here the author comes to compile-time constants and the need for compile-time concatenation. The rest of the article is about building a solution, that becomes more complicated because of C++11 and its restrictions.

A bug in GCC

gcc_bug
If you think GCC guarantees you the exception safety, then you should check this story about the related bug in GCC. It shows a simple case that uses aggregate initialization and leads to a problem. Namely, you can get a Member that was initialized but never destroyed. The author later made another blog post showing another case where the same error occurs and that is close to real-world C++ code. Check these samples at least to confirm you don’t get similar leaks in your programs.

When comparison function does it wrong

pvs_studio
PVS-Studio is famous for checking lots of projects for potential errors and sharing the result of such checks in their blog. In this post Andrey Karpov collected possible issues with comparison function, to share real-program examples. Several error patterns are discussed:

  • Issues that come out of repetitive checks and code duplication
  • Incorrect Check of Null References
  • Typical issues within loops conditions
  • And much more

Check real errors from Unreal Engine 4 code, Chromium, Qt, CryEngine V, MongoDB, LibreOffice and many others.

The StarCraft II API

starcraft2Blizzard welcomes everyone interested, to try and implement a bot using the StarCraft II API. The library appeared on GitHub, along with a couple of tutorials (on how to create various types of bots, run simulator, etc.) and a list of examples. The API is built around protobuf defined protocol, it uses CMake to generate project files and Doxygen to generate documentation. The library supports all three platforms (Linux, Mac, Windows).

Releases

CLion

CLion_400x400_Twitter_logo_whiteThe latest release of CLion (2017.2) brought integration with Clang-Tidy, which means first and foremost that users are able to see Clang-Tidy warnings and benefit from Clang-Tidy quick-fixes right inside the IDE, in just the same way it works for CLion’s own built-in inspections. And secondly it means users can add their own check to Clang-Tidy and get them instantly in the IDE.
In addition to that, some existing inspections and quick-fixes were updated, C++17 came to the New Project Wizard, other improvements to PCH support and disassembly view in debugger were introduced. Learn more by the link.

ReSharper C++

R++_400x400_Twitter_logo_whiteAnother C++ tool from JetBrains, ReSharper C++, which is a Visual Studio extension for C++, also got an update. With version 2017.2 ReSharper C++ now supports ClangFormat configuration files as a source of information for the built-in formatter. The tool shows the progress with C++17 features (selection statements with initializer, using in attribute namespaces, and capturing *this by value), polishes support for some C++11 features (including the work around friend declarations and user-defined literals). In addition, this release improves the code navigation and adds several new code inspections.

Qt

qtQt Creator 4.4 is nearly ready for its final release. This version brings inline annotations for warnings and errors from the Clang code model (just like in Xcode) and changes to Rename refactoring that is now capable of doing Rename Files when renaming a symbol. And built-in Clang code model helps now with the highlighting of the identifier at the cursor. Check the blog post for other changes.

That’s it for now. Thanks for reading and stay tuned!

CLion 2017.2.2 update is available

$
0
0

CLion 2017.2.2, build 172.3968.17, is now available for download. If you’re using CLion 2017.2.1, a patch-update will be available shortly.


Download CLion 2017.2.2

This update brings a few enhancements to the Clang-Tidy integration and enables paste simple when paste from history. Check the full release notes by the link.

Your CLion Team

JetBrains
The Drive to Develop


CLion starts 2017.3 EAP

$
0
0

Hi everyone,

We are glad to say that the Early Access Program for CLion 2017.3 is now open. The release is scheduled for the end of this year, and there are so many things planned!

CL_20173_EAP_blog

For now, please feel free to download the build and check the new features and enhancements that are already included. Your feedback is very welcome.

Download CLion 2017.3 EAP

This build (173.2099.3) addresses issues in several major areas, including C++ parser and debugger, it also provides better support for unit testing and a more flexible toolchains configuration. Let’s see what’s inside:

Unit testing: easy to run and debug from the gutter

If you use Google Test or Catch framework for unit testing on your project, you may benefit from the built-in test runner in CLion, which provides a progress bar, a tree view of all the tests running, information about the status, duration, and output stream. There is also the ability to easily sort and rerun tests, export/import testing results, and navigate to the test’s sources. This EAP now makes it easier to run tests and review results by adding special test icons to the editor’s left gutter:

test_icons_cut

You can run the tests using these icons. Besides, they show the status of the tests – success or failure, so you always know, when looking through the code of your tests if they failed recently or not:

test_status

Debugger: GDB 8.0

CLion 2017.3 EAP comes with GDB 8.0 bundled. Among other things, this brings fixes to several major issues and inconveniences.

Since bundled GDB is now built with multiarch support, it can be used for remote cross-platform debug in various Linux/Windows and embedded cases. For example, target Linux from the IDE running on Windows. There is no need to find/build another GDB version for this.

Previously, there was a bug with Application output on Windows, which redirected you to a separate console window instead of the default Run window when debugging (CPP-8175). The most critical case here was debugging the unit tests. Updating to GDB v8 helped to fix the bug, so now the output is printed to the default Run window for both, Run and Debug. (Bear in mind, that on Windows, CLion uses bundled GDB when MinGW32 is selected as the toolchain.)

Several other bugs were also addressed, like “LZMA support was disabled at compile time” error and incorrect rvalue references rendering.

C++ language engine improvements

List initialization improvements

We’ve promised a big overhaul in the problematic areas of CLion’s language engine, which parses, resolves and highlights the issues in your code, as well as provides info for the context search, navigation, and refactorings. Following the plan, we’ve started with the list initialization.

This work addresses lots of issues, most of which are linked to CPP-8143. Like for example:

  • some false “no matching constructor” error,
  • some false “too many arguments” and “too few arguments” errors,
  • invalid “parameter type mismatch” error for boost weak pointer initialization,
  • failed resolve for members of auto variables initialized with uniform initialization,
  • false “Invalid initializer” error with C99 union initializers,
  • and many others.

We definitely appreciate your feedback, and your reports on any issues you find (we expect some regressions here due to the massive changes).

Support for __COUNTER__

__COUNTER__ macro is now properly supported in CLion, which means CLion increments its value properly in the language engine and doesn’t show invalid duplicate declaration errors now:

counter_macro

Unique_ptr related issues (GCC7)

In case of using GCC7 one may encounter various issues with unique_ptr. CLion 2017.3 EAP comes with the proper support for it, and thus issues with unique_ptr such as incorrect “parameter type mismatch” and false “applying operator ‘->’ to … instead of a pointer” are now fixed:

unique_ptr

Invert if condition

One very common refactoring pattern is to invert the condition in the if clause and flip the if-else blocks. It can be used, for example, to simplify complex code using multiple nested if statements. CLion now provides a code intention that can do that:

modernize

Other improvements

In case you have include directives inside namespaces, which is a typical case for JUCE library, you will be glad to know that code completion, navigation and refactorings now work correctly for the symbols from such headers:

modernize

Besides, CLion 2017.3 EAP comes with the support for C++11 friend declaration syntax (CPP-3680).

Toolchains

With this EAP we’ve started working on a configurable list of toolchains. When done, it should allow you to use different CMake/debugger or MinGW/Cygwin/Microsoft Visual C++ toolchains for different projects or configurations (ready in this EAP), and conveniently switch compilers, environment settings, etc (not yet ready).

The work has just recently started, but we want to present this current state to you within this EAP build. Let’s look at what is now supported.

In Settings/Preferences | Build, Execution, Deployment | Toolchains you can now add several toolchain configurations in addition to the Default one.

Default toolchain (macOS case):
default_toolchain

Extra toolchain configured:
nondefault_toolchain

For now you can change:

  • CMake
  • Debugger

On Windows this comes with an ability to select the environment – MinGW, Cygwin or Microsoft Visual C++ (keep in mind that MSVC support is still experimental and is available under clion.enable.msvc setting in the Registry):
toolchain_windows

Now, when you have several toolchains configured, you can go to CMake settings under Settings/Preferences | Build, Execution, Deployment | CMake and select different toolchains for different CMake configurations, for example, one toolchain for Debug, another one for Release:
cmake_configurations

Note that currently the CMake configuration should be named differently (CPP-8466).

These CMake configurations are now available for selection in Run/Debug Configurations:
run_debug_config

Besides this, on Windows CLion now works correctly with tools without providing a full path, for example, custom compiler path. The same logic as platform shell is used to find an executable.

That’s it for now! Check the full release notes here. More changes are coming with further EAP builds – stay tuned.

Download CLion 2017.3 EAP

Your CLion Team
The Drive to Develop

CLion 2017.3 EAP: toolchains on welcome wizard

$
0
0

Hi,

CLion 2017.3 EAP has recently started with many great things on board: dozens of language engine improvements, invert if refactoring, bundled GDB 8.0, gutter icons to run/debug unit tests, new toolchains configuration.

This new build (173.2290.13) comes with an ability to configure toolchains on CLion’s Welcome screen, which appears when you start the IDE for the first time and don’t have any settings to import from the previous version:

welcome_screen

You can configure toolchains with various CMake versions, debuggers, MinGW, Cygwin or Microsoft Visual C++ environment (in case of Windows) here or change later in Settings/Preferences | Build, Execution, Deployment | Toolchains.

Full release notes are available here.

Download CLion 2017.3 EAP

Your CLion Team
The Drive to Develop

JetBrains C++ team on the move: US trip

$
0
0

Hi,

A week from now, the CLion and ReSharper C++ teams will be visiting Bellevue, Washington, USA, for CppCon 2017, the biggest yearly event in the C++ development world!

Come and listen to the talk given by our team members, and stop by our booth in the exhibition area between Wednesday, September 27, and Thursday, September 28, for a chat or a demo of the products, and you could win a t-shirt and a license. We have some great giveaways too, so come over and grab yourself a tricky mind teaser!

cppcon2017

Before the CppCon visit, Anastasia Kazakova, CLion Product Marketing Manager, will be in NYC and Chicago giving talks to local user groups. Both talks are also going to be included in the CppCon schedule this year. So don’t worry if you miss them the first time round you have a few chances to catch them! By the way, talking about Catch, Phil Nash (the author of the famous Catch unit testing framework, and a JetBrains developer advocate) will also be giving a talk and is eager to chat with you at our booth!

New standards to the rescue: the view through an IDE’s glasses, by Anastasia Kazakova

Chicago C/C++ Users group, Thursday, 6.30pm, September 21
CppCon 2017, Monday, 2pm, September 25

We often talk about how new language features can help developers to write more accurate and concise code. There is another type of discussion to be had on how tools help leverage language issues and support developers. How about a third perspective, on how language can help tools to do better?

As C++ tool vendors, we are able share our experience with the trickiness and peculiarities of the C++ language, including preprocessor and non-trivial parsing. It’s time now to talk about the upcoming language changes from the IDE’s point of view.

In this talk, I’ll identify the most important issues with the language from the IDE’s perspective and will show how new language standards, as well as other initiatives like C++ Core Guidelines, are helpful and beneficial to the IDEs. I’ll cover a variety of features from if constexpr to Concepts and Modules, as well as std2 and some other initiatives that are no more than proposals at this point. Come and see the language from our perspective.

Tools from the C++ eco-system to save a leg, by Anastasia Kazakova

New York C++ Developers Group, Monday, 7.30pm, September 18
CppCon 2017, Tuesday, 3.15pm, September 26

C++ gives you enough rope to shoot your leg off. Readable (and thus easy to maintain, easy to support) and error-free code in C++ is hard to achieve. And while modern C++ standards bring lots of fantastic opportunities and improvements to the language, sometimes they make the task of writing high-quality code even harder. Or can’t we just cook them right? Can the tools help?

In this talk, I’ll highlight the main trickiness of C++, including readability problems, some real-world issues, problems that grow out of C++ context-dependent parsing. I’ll then try to guide you in how to eliminate them by using tools from the C++ eco-system. This will cover code styles and supportive tools, code generation snippets, code analysis (including CLion’s inspections and Data Flow Analysis, C++ Code Guidelines, and clang-tidy checks), and refactorings. I will also take some time to discuss unit testing frameworks and dependency managers as tools which are essential for high-quality code development.

The Holy Grail – A Hash Array Mapped Trie for C++, by Phil Nash

CppCon 2017, Friday, 9am, September 29

C++ has a handful of associative containers. We started with set and map, both based on node-based red-black trees. These are fine but are not the most efficient and, in particular, suffer from more cache misses than we’d like. If we want to build persistent versions of them, it’s achievable but aggravates the problems even more and adds considerable extra complexity. (I know – I’ve done it!) C++11 brought the hash-map based unordered_set and unordered_map, which are generally much faster, with better cache locality – but can be less memory-efficient and also don’t translate so easily into persistent versions.

But there exists another general-purpose data structure that combines many of the characteristics of tree and hash tables into something that in many important ways is superior to both, and with minimal downside (they are close but not quite as fast as pure hash tables). Hash Array Mapped Tries are more memory-efficient than hash tables and, as a bonus, are trivially made persistent – with big implications for concurrency, functional programming, and other applications that benefit from being able to treat them immutably (as well as share large amounts of common state in memory at once). This talk will describe how this data structure works from the ground up, and will look at a reference implementation I am writing with the intention of proposing it as a Boost library – and possibly later for standardization. We’ll also look at how it can be used in practice, and at some of the performance characteristics.

See you in US!
The JetBrains C++ Team

CLion 2017.3 EAP: bug-fixes in C++ support

$
0
0

Hi,

A new CLion 2017.3 EAP (build 173.2463.5) is now available and addresses the following issues:

  • Issues in CLion’s language engine related to array usages are fixed. This covers mostly incorrect overload resolution behaviour, which leads to false-positive warnings (CPP-7860, CPP-9491 and CPP-10231)
  • For -include option, support for values provided without a space after the option’s name is added (CPP-10351).
  • In case you are using C+17, for C++17 features that are not yet supported in CLion, a workaround is added to avoid (where possible) bogus warnings and errors in the code highlighter.

Full release notes are available by the link.

Download CLion 2017.3 EAP

Your CLion Team
The Drive to Develop

CLion 2017.3 EAP: Boost.Test support

$
0
0

Hi,

Welcome our new CLion 2017.3 EAP, build 173.2696.23!

In late 2016 and early 2017 we polled over 5,000 developers to identify the State of Developer Ecosystem. This covered C and C++ development and showed many interesting results.

Among other questions we’ve asked about unit testing framework used by the respondents on a regular basis. For C language the top three unit test frameworks are: Google Test (37%), Boost.Test (8%), CppUnit (8%). For C++ – Google Test (45%), Boost.Test (26%), CppUnit (11%).

unit_test_cpp

CLion already supports Google Test and Catch unit test frameworks. And now it comes with the Boost.Test support! The support includes:

  • Special Boost.Test Run/Debug configurations
  • Built-in test runner with the progress bar and a tree view of all the tests running
  • Ability to re-run failed tests, export test results, open previously saved results
  • Ability to navigate to the source code of a particular test
  • Gutter icons to Run/Debug unit tests and show the status of the tests

modernize

Besides, we’ve eliminated false warning for MSVC specific pragmas (CPP-9549).

Full release notes are available by the link.

Download CLion 2017.3 EAP

Your CLion Team
The Drive to Develop

Viewing all 680 articles
Browse latest View live