Product News

Targeting Android with the C++ REST SDK -- Steven Gates

Fresh on vcblog:

Targeting Android with the C++ REST SDK

by Steven Gates

From the article:

Right before the holidays we put together a new release, version 2.4.0, of the C++ REST SDK. One of the new features added in the library is support for targeting Android using the Visual Studio 2015 cross platform mobile development, as well as the x86 Android emulator. In this post I’m going to walk through showing how to create an Android Native Activity that utilizes the C++ REST SDK...

JSON for Modern C++ -- Niels Lohmann

A new GitHub project With a very readable README:

JSON for Modern C++

by Niels Lohmann

From the README:

... You can create an object (deserialization) by appending _json to a string literal:

// create object from string literal
json j = "{ \"pi\": 3.141, \"happy\": true }"_json;

[Note: Or perhaps auto j = R"({ "pi": 3.141, "happy": true })"_json; --Ed.]

You can also get a string representation (serialize):

// explicit conversion to string
std::string s = j.to_string();

EDG C++ front end 4.10 released, adds more C++14 support

Announced today, just in time for the new year:

EDG C++ front end 4.10 released

Version 4.10 of the EDG C++ Front End has been released.

This version provides the following new features:

1) This version provides the following new C++14 features:

Lambdas can specify expressions, not just local variables, to be captured. For example:

       auto l = [x = 42]{ return x + 1; };

Generic lambdas are accepted, allowing auto parameters to define a call operator template.  For example:

        auto l = [](auto p) { return p*2; };

Binary literals and apostrophes as digit separators in numeric literals are accepted.

        int i = 0b0110;
        long l = 123'456'789; // Equivalent to 123456789

2) __cpluplus in C++14 modes:

The standard for C++14 has now been approved and specifies the value of the __cplusplus predefined macro as 201402L.  The front end uses that value when --c++14 mode is specified, except that in Microsoft and GNU    modes it adopts the value set by those compilers.  See the Changes file for more details.

3) GNU statement expressions with class type results:

Version 4.9 of the front end enabled the ability to have destructible entities in GNU statement expressions (GSEs), but with the restriction that the result expression of a GSE cannot be of a class type requiring nontrivial copy construction or nontrivial destruction.  This restriction has been removed.  For example:

     struct D { D(D const&); };
     D g(D d) {
       return ({ d; });  // Now accepted.
    }

4) Performance improvements:

As part of what will be an ongoing effort, a number of changes were made to improve the overall speed of the front end.  This has generally resulted in an improvement between 1 and 6 percent in our testing, but can be significantly more for some IA-64 mangling cases.

As usual, we have fixed bugs, added many minor features, and continued to improve our various compatibility modes.

C++ Portable Components Release 1.6.0

POCO 1.6.0 is now available:

POCO Release 1.6.0 is out

by POCO Team

This release is the culmination of the work done on GitHub over the last two years, including five development releases. It includes major new features from new contributors, like the JSON and MongoDB libraries, much improved Data library, CMake support, as well as numerous other new features and fixes. A big Thank You to everyone who contributed to this release.

LINQ-like List Manipulation in C++

Cross platform LINQ for C++ 

LINQ-like List Manipulation in C++

by Gaston Hillar

From the article:

When developers make the move from C# to C++, they definitely miss Language-Integrated Query (LINQ) features. Cpplinq is an excellent open-source project that uses C++11 features to provide extensible LINQ-like list manipulation to C++.

I'm sad to say Farewell Dr. Dobb's. Thank you for all the good articles.

biicode 2.0 is out -- biicode Team

biicode, a C++ dependency manager, releases version 2.0

biicode 2.0 is out

by biicode Team

Who's biicode for?

For C/C++ developers that think a dependency manager is needed, biicode is a multiplatform tool and hosting service that allows you to build your projects easily, integrate third party code and reuse code among projects with just #includes.

 

Android NDK Revision 10d available

For all the people that develop for Android, a new version( revision 10d) of the Android Native Development Kit has been released.

Android NDK Revision 10d available

From the release log:

  • Made GCC 4.8 the default for all 32-bit ABIs. Deprecated GCC 4.6, and will remove it next release. To restore previous behavior, either add NDK_TOOLCHAIN_VERSION=4.6 to ndk-build, or add --toolchain=arm-linux-androideabi-4.6 when executing make-standalone-toolchain.sh on the command line. GCC 4.9 remains the default for 64-bit ABIs.
  • Stopped all x86[_64] toolchains from adding -mstackrealign by default. The NDK toolchain assumes a 16-byte stack alignment. The tools and options used by default enforce this rule. A user writing assembly code must make sure to preserve stack alignment, and ensure that other compilers also comply with this rule. (GCC bug 38496)
  • Added Address Sanitizer functionality to Clang 3.5 support to the ARM and x86 ABIs. For more information on this change, see the Address Sanitizer project.
  • Introduced the requirement, starting from API level 21, to use -fPIE -pie when building. In API levels 16 and higher, ndk-build uses PIE when building. This change has a number of implications, which are discussed in Developer Preview Issue 888. These implications do not apply to shared libraries.

And much more ...

Address and Thread Sanitizers in GCC -- Red Hat Developer Blog

A short article about two error-detection features in GCC:

Address and Thread Sanitizers in GCC

by Dodji Seketeli on Red Hat Developer Blog

From the article:

Since their 4.8 version, the C and C++ compilers of the GNU Compiler Collection are equipped with built-in memory and data race errors detectors named Address Sanitizer and Thread Sanitizer.

This article intends to quickly walk you through the highlights of these two interesting tools.

New Security Feature in Visual Studio 2015

An article about a security feature in Visual Studio 2015, called Control Flow Guard.

Visual Studio 2015 Preview: Work-in-Progress Security Feature

by Jim Hogg

From the article:

By simply adding a new option to your Project, the Visual C++ compiler will inject extra security checks into your binaries. These will detect attempts to hijack your code. The check will stop execution of your code, before the hijacker can do damage to your data or PC...