uninitialized_tag in C++--Marius Elvert

Optimise or not?

uninitialized_tag in C++

by Marius Elvert

From the article:

No doubt, C++ is one of those languages you can use to squeeze out every last drop of your CPU’s processing power. On the other hand, it also allows a high amount of abstraction. However, micro-optimization seldom works well with nice abstractions...

Submit your talk to Meeting C++ 2018

The call for talks for Meeting C++ 2018 is open until June 10th:

Submit your talk to Meeting C++ 2018!

by Jens Weller

From the article:

This year its the 7th edition of Meeting C++, the 2nd time that it spans 3 days!

Speaking at Meeting C++ is a fun experience, you get to attend the speakers dinner, attend the full conference for free and enjoy the luxurious Hotelrooms the Andels offers from Wednesday to Saturday! You can look at last years schedule to get a feel for what your competition might talk about, but have in mind that you don't see the talks that were not submitted! If you want to talk about a C++ topic that wasn't covered yet, or have a unique idea for your talk, please submit!

Start speaking!

Meeting C++ encourages you to start speaking about C++, as we all like to hear more and different voices and opinions on the wide range that C++ has become since C++11. Thats why Meeting C++ has a track that is dedicated to new speakers! If this is of interest to you, please read Jon Kalbs blog post on Developing Talk Ideas, additional information on speaking and slide design is available in the speaking guidelines of Meeting C++! You'll find help with your talk in the C++ slack under #speakerscorner.
Also you can submit talks on embedded to Meeting Embedded 2018!

Learn C++ in London and Remotley

Free C++ course starting 1st May 2018.

CPPLondonUni

by CppLondonUni

About the course:

This is free course, aimed at beginners and intermediate users. Our syllabus is based on Programming: Principles and Practice Using C++, 2nd Edition.

Who can benefit from this course:

1. People who have no experience with coding

2. People that come from different languages such as Java, Python, C# etc

3. Developers that would like to refresh their C++ knowledge

Location:

London and Online

London - CodeNode 10 South Pl, London EC2M 7EB

Online - https://goo.gl/BqMCgj (Please RSVP on our host website https:://skillsmatter.com

 

When:

Every Tuesday

London - from 18:15 GMT

Online - from 18:30 GMT or soon after

 

C++17: The two line visitor explained--Marius Elvert

The power of C++17.

C++17: The two line visitor explained

by Marius Elvert

From the article:

If you have ever used an “idiomatic” C++ variant datatype like Boost.Variant or the new C++17 std::variant, you probably wished you could assemble a visitor to dispatch on the type by assembling a couple of lambda expressions like this:

auto my_visitor = visitor{
  [&](int value) { /* ... */ },
  [&](std::string const& value) { /* ... */ },
};

Quick Q: With “-fno-exceptions”, what happens with “new T”?

Quick A: The behaviour will likely stay the same.

Recently on SO:

With “-fno-exceptions”, what happens with “new T”?

The way I understand it, operator new is defined by libstdc++. If you now compile your own code with -fno-exceptions, you cannot catch any exceptions, but you will still be linking against the normal version of libstdc++, which does throw an exception.

So yes, new T will throw an exception, even with -fno-exception.

However, if you compiled libstdc++ with -fno-exception as well, things become different. Now, new T cannot throw an exception but, if I read the libstdc++ manual right it will call abort() instead.

It seems that, if you want your new T to return NULL on failure, the only way is to explicitely specify nothrow...

Boost 1.67 released

Boost 1.67 is now available:

Boost Version 1.67.0

There are two new libraries:

  • Contract: Contract programming for C++. All contract programming features are supported: Subcontracting, class invariants, postconditions (with old and return values), preconditions, customizable actions on assertion failure (e.g., terminate or throw), optional compilation and checking of assertions, etc, from Lorenzo Caminiti.
  • HOF: Higher-order functions for C++, from Paul Fultz II.

Also, many updated libraries have been updated. See the announcement for details.

 

CppCast Episode 145: Blogging and Text Processing with Bartłomiej Filipek

Episode 145 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Bartłomiej Filipek to discuss blogging, Simplifying C++ Code with C++17, and the work he's doing at Xara.

CppCast Episode 145: Blogging and Text Processing with Bartłomiej Filipek

by Rob Irving and Jason Turner

About the interviewee:

Bartłomiej Filipek (Bartek as a shorter version) is a C++ software developer at Xara where he works mostly on text features for advanced document editors. He works remotely from Cracow/Poland. Apart from graphics applications, Bartek also has experience with game development, large-scale systems for aviation, writing graphics drivers and even biofeedback. For seven years Bartek has been regularly blogging. In the early days the topic revolved around graphics programming, and now he focuses on Core C++. In his spare time, he loves assembling trains and Lego with his little son. And he's a collector of large Lego Star Wars models.

Which One Is Better: Map of Vectors, or Multimap?--Jonathan Boccara

Depends!

Which One Is Better: Map of Vectors, or Multimap?

by Jonathan Boccara

From the article:

While advising on how to make code more expressive on the SFME project, I came across an interesting case of choosing the right data structure, which I’ll share with you with the permission of the authors of the projects.

We had to associate a key with several values, and perform various operations. Should we use a map of vectors, or is a multimap more appropriate? Let’s see the case in more details, and compare the two solutions...