What are inline namespaces good for? -- StackOverflow

Quick A: For source-level library versioning.

A StackOverflow classic:

What are inline namespaces for?

C++11 allows inline namespaces, all members of which are also automatically in the enclosing namespace. I cannot think of any useful application of this -- can somebody please give a brief, succinct example of a situation where an inline namespace is needed and where it is the most idiomatic solution?

(Also, it is not clear to me what happens when a namespace is declared inline in one but not all declarations, which may live in different files. Isn't this begging for trouble?)

Quick Q: Why write "5 == myValue" instead of "myvalue == 5"? -- StackOverflow

Quick A: Because it catches most cases where you accidentally wrote = instead of ==.

From SO:

Reason for using '5 == myValue' in conditionals

I've come across some code that flips how a condition is checked and was wondering why this would be done aside from a weird personal quirk. I've never seen any text books use it nor have I seen any sample code done this way.

// why do it this way?
if (5 == myValue)
{
    // do something
}

// instead of:
if (myValue == 5)
{
    // do something
}

I've only seen this way for == operand but not for any other operands.

Deleted Functions in C++11 -- Fang Lu

Here is a quick overview of =delete from the IBM Cafe's tour of C++ features.

Note: This summary article focuses on applying =delete to special member functions, which is a main use case. However, be aware that that's only part of the story, because =delete can also apply to regular member function and free function overloads to suppress specific overloads with nice compile-time errors. We invite authors to write about this aspect as well -- just write about it on your own blog and and send us a link to your post via 'Suggest an Article' at the top of this page (you must be logged in to isocpp.org to see this option).

Deleted functions in C++11

by Fang Lu

The deleted functions feature is introduced into the C++11 standard. In this article, I will explain this feature and provide some examples on how to use it...

C++ AMP beyond Windows: Targeting HSAIL and SPIR on Linux and other platforms

The HSA Foundation together with AMD and Microsoft recently announced an open source C++ AMP compiler implementation they have been working on, using the Clang/LLVM C++ compiler as a base but currently separate from Clang/LLVM. The implementation targets OpenCL, HSAIL, and SPIR 1.2 on Linux and other non-Windows platforms. When the work is finished, the intention is to approach the LLVM community to offer this work as a contribution back to the official Clang/LLVM code base if there is interest.

C++ AMP is an open specification from Microsoft that enables STL-like C++ extensions for massively parallel computation using GPUs and vector units, and is part of the basis for the Parallel STL proposal now under consideration for standardized parallel computations on multicore and vector hardware.

AMD released on Nov 12, 2013 a fully open sourced C++ AMP compiler based on  CLANG/LLVM with outputs to OpenCL and Khronos Group SPIR 1.2 initially. This compiler will have HSAIL support in early 2014 for HSA platforms.   This initial focus is bring about Linux support for C++AMP, complete with GPU acceleration.  AMD is also bringing their BOLT Standard Template library over to be qualified with this tool chain.

Microsoft is engaged with AMD and MultiCoreWare, by providing design and validation inputs to help drive the success of this project.

Coverage:

Bringing C++ AMP Beyond Windows via CLANG and LLVM

Concept Checking in C++11 -- Eric Niebler

While we're waiting for Concepts Lite, Eric shows how we can already do quite a bit in C++11 while planning for a transition to language support when it's available.

Concept Checking in C++11

by Eric Niebler

From the article:

This post describes some utilities I’ve recently developed for doing concept checking in C++11. These utilities are part of an ongoing project to reimplement ranges, also for C++11, but I think the concept checking utilities are useful and interesting in their own right...

Dive into C++11 -- Arkanoid clone in 160 lines of code (SFML2)

arkanoid.PNG

I'm Vittorio Romeo, a computer science student, hobbyist game developer and C++ enthusiast.

I've created a 40 minute tutorial/screencast on the creation of a complete game using C++11 and SFML2. The end result is a playable Arkanoid/Breakout clone with a paddle, a ball and destroyable bricks.

I divided the code in 9 segments, that I analyze and execute individually.

The point of the video is showing how easy it is to create something playable thanks to the C++11 standard, and to show a possible train of thought that can be taken during game development.

I greatly appreciate comments and criticism, and ideas for future videos/tutorials.

Also, feel free to fork the game's source code here: https://github.com/SuperV1234/Tutorials

If the idea catches on, I'd love to make a video featuring the best forks.

Thanks for watching!

Boost Migrating to Git, Going Modular

The historically monolithic Boost project is (finally!) migrating to git, with each library in Boost moving into its own repository on github. The goal is to foster a more agile nimble development model and a more active library ecosystem. Create your own forks, hack, submit pull requests, and do all the good things that distributed version control lets you do. From the announcement on the Boost mailing list:

Subversion repository closing. Conversion to Git imminent.

by Beman Dawes

The Boost Steering Committee has given the final approval for the conversion from Subversion to Git, including the modularization of Boost library repositories.

The Subversion repository will be closed for all changes to all branches, including the sandbox, Sunday, November 23 2013, 00:00 hours UTC. That's 8 PM Saturday, US East Coast time, and 5 PM US West Coast time.

Please make no svn commits after that time. We will be adding a pre-commit hook that prevents commits, but please do not wait for that becomes active.

After svn is closed, the conversion will be run one last time, and then turned off. Then there is a week set aside for final validity checks, testing, and general scurrying around. When that is done, the boostorg repo on GitHub will open for business. If everything goes smoothly, it may take less than a week but if there are glitches it may take longer.

--Beman

Read the full thread here.

Basic Structure of C++ Program -- Prashant Sharma

[Ed.: This is a simple short "hello world" overview for someone starting to program in C++, and is basically correct. There are lots of expert-friendly articles, but we like and want to encourage the beginner- and intermediate-level articles as well for the benefit of the many recent newcomers to the language.]

Basic Structure of C++ Program

The easiest way to understand the basic structure of C++ program is by writing a program. The basic C++ program is as follows: ...