Product News

GCC 5.1 released

A new version of GCC is out, with a lot of improvements:

GCC 5.1 released

Some changes:

C++

  • G++ now supports C++14 variable templates.
  • -Wnon-virtual-dtor doesn't warn anymore for final classes.
  • Excessive template instantiation depth is now a fatal error. This prevents excessive diagnostics that usually do not help to identify the problem.
  • G++ and libstdc++ now implement the feature-testing macros from Feature-testing recommendations for C++.
  • G++ now allows typename in a template template parameter.
template<template<typename> typename X> struct D; // OK
  • G++ now supports C++14 aggregates with non-static data member initializers.
struct A { int i, j = i; };
A a = { 42 }; // a.j is also 42
  • G++ now supports C++14 extended constexpr.
constexpr int f (int i)
{
  int j = 0;
  for (; i > 0; --i)
    ++j;
  return j;
}
constexpr int i = f(42); // i is 42
  • G++ now supports the C++14 sized deallocation functions.
void operator delete (void *, std::size_t) noexcept;
void operator delete[] (void *, std::size_t) noexcept;
  • A new One Definition Rule violation warning (controlled by -Wodr) detects mismatches in type definitions and virtual table contents during link-time optimization.
  • New warnings -Wsuggest-final-types and -Wsuggest-final-methods help developers to annotate programs with final specifiers (or anonymous namespaces) to improve code generation. These warnings can be used at compile time, but they are more useful in combination with link-time optimization.
  • G++ no longer supports N3639 variable length arrays, as they were removed from the C++14 working paper prior to ratification. GNU VLAs are still supported, so VLA support is now the same in C++14 mode as in C++98 and C++11 modes.
  • G++ now allows passing a non-trivially-copyable class via C varargs, which is conditionally-supported with implementation-defined semantics in the standard. This uses the same calling convention as a normal value parameter.
  • G++ now defaults to -fabi-version=0 and -fabi-compat-version=2. So various mangling bugs are fixed, but G++ will still emit aliases with the old, wrong mangling where feasible. -Wabi continues to warn about differences.
libstdc++
  • A Dual ABI is provided by the library. A new ABI is enabled by default. The old ABI is still supported and can be used by defining the macro _GLIBCXX_USE_CXX11_ABI to 0 before including any C++ standard library headers.
  • A new implementation of std::string is enabled by default, using the small string optimization instead of copy-on-write reference counting.
  • A new implementation of std::list is enabled by default, with an O(1) size() function;
  • Full support for C++11, including the following new features:
    • std::deque and std::vector<bool> meet the allocator-aware container requirements;
    • movable and swappable iostream classes;
    • support for std::align and std::aligned_union;
    • type traits std::is_trivially_copyable, std::is_trivially_constructible, std::is_trivially_assignable etc.;
    • I/O manipulators std::put_time, std::get_time, std::hexfloat and std::defaultfloat;
    • generic locale-aware std::isblank;
    • locale facets for Unicode conversion;
    • atomic operations for std::shared_ptr;
    • std::notify_all_at_thread_exit() and functions for making futures ready at thread exit.
  • Support for the C++11 hexfloat manipulator changes how the num_put facet formats floating point types when ios_base::fixed|ios_base::scientific is set in a stream's fmtflags. This change affects all language modes, even though the C++98 standard gave no special meaning to that combination of flags. To prevent the use of hexadecimal notation for floating point types use str.unsetf(std::ios_base::floatfield) to clear the relevant bits in str.flags().
  • Full experimental support for C++14, including the following new features:
    • std::is_final type trait;
    • heterogeneous comparison lookup in associative containers.
    • global functions cbegin, cend, rbegin, rend, crbegin, and crend for range access to containers, arrays and initializer lists.
  • Improved experimental support for the Library Fundamentals TS, including:
    • class std::experimental::any;
    • function template std::experimental::apply;
    • function template std::experimental::sample;
    • function template std::experimental::search and related searcher types;
    • variable templates for type traits;
    • function template std::experimental::not_fn.
  • New random number distributions logistic_distribution and uniform_on_sphere_distribution as extensions.
  • GDB Xmethods for containers and std::unique_ptr.

Boost Version 1.58 Released

The next version of boost is released.

Boost 1.58

From the release note:

These new libraries were added:

  • Endian: Types and conversion functions for correct byte ordering and more regardless of processor endianness.
  • Sort: Includes spreadsort, a general-case hybrid radix sort that is faster than O(n*log(n))

A huge number of bugfixes and improvements were implemented for the existing libraries.

 

Many thanks to all contributors and maintainer!

biicode Dependency Manager released to Open Source

biicode just released the client code of their C++ Dependency Manager into OpenSource.

C/C++ Dependency Manager

From the Website:

biicode manages your project’s dependencies so you can use the libs you need (Curl, Catch, Fann, OpenSSL, OpenCV, POCO, Boost, Libuv, GTest ...) as you wish within your project. biicode uses CMake to configure and build your projects and it is compatible with many IDEs, version control systems and compilers.

CLion 1.0, cross-platform C/C++ IDE, has finally arrived

CLion 1.0 is out.

JetBrains has finally released CLion - cross-platform IDE for C and C++ developers

By Anastasia Kazakova

From the article:

CLion is a full-featured IDE for developing in C and C++ on Linux, OS X or Windows. It's deeply integrated with the well-known CMake build system and GDB debugger, as well as with many popular Version Control Systems. CLion provides productivity boosting features, including smart editor, one-click navigation, reliable refactorings and on-the-fly code analysis with quick-fixes, to keep your C/C++ code high-quality.

JetBrains - ReSharper C++ 1.0 released

JetBrains just released their ReSharper for C++ in version 1.0, after a year of an open beta program.

ReSharper for C++

From the website:

ReSharper C++ makes Microsoft Visual Studio a much better IDE with refactorings, navigation, code inspections, quick-fixes, code generation and more productivity features for C++ development.

ReSharper C++ extends Visual Studio with over 60 C++ code inspections that are displayed instantly, as you type.
For many of these inspections, ReSharper C++ provides quick-fixes (light bulbs) to improve code in one way or another.

 

HPX version 0.9.10 released -- STE||AR Group

The STE||AR Group has released V0.9.10 of HPX -- A general purpose parallel C++ runtime system for applications of any scale.

HPX V0.9.10 Released

The newest version of HPX (V0.9.10) is now available for download! Please see here for the release notes.

HPX now exposes an API fully conforming to the concurrency related parts of the C++11 and C++14 standards, extended and applied to distributed computing.

From the announcement:

  • The major focus of this release was to improve the reliability of large scale runs. We have shown to reliably run HPX applications on up to ~24k cores (~1k nodes).
  • A very important improvement introduced with this release is the refactoring of the networking infrastructure which improves the overall performance.
  • We continued our work towards a complete implementation of N4354 (Working Draft, Technical Specification for C++ Extensions for Parallelism).
  • Move to C++11 variadics: all of the API now uses variadic templates.

Range comprehensions with C++ lazy generators -- Paolo Severini

From a totally unnecessary blog (we beg to differ):

Range comprehensions with C++ lazy generators

by Paolo Severini

From the article:

Lazy evaluation is a powerful tool and a pillar of functional programming; it gives the ability to construct potentially infinite data structures, and increases the performance by avoiding needless calculations ...

... Functional languages like Haskell have the concept of list comprehensions ... In C#, of course, we have LINQ ... It would be nice to have something similar in an eager language like C++ ... now the lazy, resumable generators proposed by N4286 seem perfect for this purpose ... We can use the VS2015 CTP prototype to experiment with this idea ...

When CLion met biicode -- Anastasia Kazakova

CLion is a new cross-platform IDE from JetBrains for C and C++ developers. And Biicode is a C/C++ dependency manager. This post is about a very simple and straightforward way to use biicode features together with CLion IDE to benefit from both.

When CLion met biicode

by Anastasia Kazakova

From the article:

CMake layout for the project is generated by biicode commands, after which you can open the project directly in CLion. You can resolve dependencies and install the missing libraries easily by using bii commands from the CLion built-in terminal (Alt+F12).

Take a short overview of the overall process and some available features...

Stackless coroutines with Visual Studio 2015 -- Paolo Severini

From a totally unnecessary blog (we beg to differ):

Stackless coroutines with Visual Studio 2015

by Paolo Severini

From the article:

I had been looking for some time now at the problem of implementing coroutines/resumable functions in order to have even in C++ something similar to what is provided by C# await and yield statements. It turns out that -- unbeknown to me -- this is quite a hot topic in the C++ community...

... stackful coroutines have a big disadvantage in the fact that fibers are very expensive... The new proposal (N4286) instead focuses mostly on a stackless implementation, and promises to be scalable to billions of concurrent coroutines...