basics

Meeting C++ 2013

The recent Meeting C++ 2013 was a blast, the 2nd Meeting C++ conference was with over 200 guests a full success!

Meeting C++ 2013

by Jens Weller

Additional Online Resources:

Stephen Kelly about CMake for Qt and Boost

The talks from Peter Sommerlad

Sven Johannsens HTML based talk about STL11 is online.

Available slides are linked in the talk descriptions.

Learn How To Program... with C++ -- Kate Gregory

kate-gregory-v2.jpgDo you know a beginner who'd like to learn C++? Or even just learn how to program... using C++?

Recently, C++ author and trainer Kate Gregory made a new 7-hour course available via Pluralsight. And not just any introductory course, but teaching C++ the way it should be taught... not "C and pointers first."

It's highly-rated, as with all of Kate's courses. Know about it and recommend it to newcomers.

Learn How to Program with C++

Instructor: Kate Gregory

If you've never programmed before, and you think you'd like to learn C++, why not learn it first? This course covers what you need to start writing real applications in C++.

Why does C++ not allow multiple types in one auto statement? -- StackOverflow

Recently on SO:

Why does C++ not allow multiple types in one auto statement?

The 2011 C++ standard introduced the new keyword auto, which can be used for defining variables instead of a type, i.e.

auto p=make_pair(1,2.5);                   // pair<int,double>
auto i=std::begin(c), end=std::end(c);     // decltype(std::begin(c))

In the second line, i and end are of the same type, referred to as auto. The standard does not allow

auto i=std::begin(container), e=std::end(container), x=*i;

when x would be of different type. My question: why does the standard not allow this last line? ...

Compiling and Linking in C++ -- Rusty Ocean

Selection_101.pngLife'n'gadget just published a nice overview of the basic C++ compilation model, useful for people who are new to programming in C++.

Compiling and Linking in C++

by Rusty Ocean

From the article:

When you write a C++ program, the next step is to compile the program before running it. The compilation is the process which convert the program written in human readable language like C, C++ etc into a machine code, directly understood by the Central Processing Unit. There are many stages involved in creating a executable file from the source file. The stages include Preprocessing, Compiling and Linking in C++...

No Runtime Overhead -- Bulldozer00

sharedunique.pngA little nugget about the free-as-in-no-overhead-ness of unique_ptr and std::move:

No Runtime Overhead

by Bulldozer00

From the article:

Unless I really need shared ownership of a dynamically allocated object, which I haven’t so far, I stick to the slimmer and more performant std::unique_ptr. ...

What are the semantics of =delete? -- StackOverflow

The question, rephrased: Does =delete mean "make the compiler skip this function and keep looking," or "make this function unusable and make the caller fix their code" -- and why?

What's the exact semantics of a deleted function in C++11?

struct A
{
    A();

    A(const A&);
    A& operator =(const A&);

    A(A&&) = delete;
    A& operator =(A&&) = delete;
};

struct B
{
    B();

    B(const B&);
    B& operator =(const B&);   
};

int main()
{
    A a;
    a = A(); // error C2280

    B b;
    b = B(); // OK
}

My compiler is VC++ 2013 RC.

error C2280: 'A &A::operator =(A &&)' : attempting to reference a deleted function

I just wonder why the compiler doesn't try A& operator =(const A&); when A& operator =(A&&) is deleted?

Is this behavior defined by the C++ standard?

Papers for Chicago: Concurrency

The start of my series about the papers for the upcoming Chicago meeting, starting with C for Concurrency:

C++ Papers for Chicago: Part 1 -- Concurrency

by Jens Weller

From the article:

As I did write a series about the papers for Bristol, this is the start of the series for Chicago, as at the end of this month the C++ committee will meet again for standardization. I try to...

C++ Conferences This Fall

I've created a short overview over the C++ Conferences this Fall:

  • Going Native (Seattle, 4.th-6.9) SOLD OUT
  • International Workshop on OpenMP (Canberra (AU), 16-18.9)
  • (not a conference, but...) Fall ISO C++ meeting (Chicago, 23-28.9)
  • QtDevDays Europe (Berlin, 7th - 9.10)
  • QtDevDays US (San Francisco, 6th-8.11)
  • Meeting C++ 2013 (Düsseldorf, 8th-9.11)
  • C++ and Beyond (Snoqualmie Falls (WA/US), 9th-12.12) SOLD OUT

More details at Meeting C++

by Jens Weller