C++: Unexpected Behaviour - Antonio Mallia, Jaime Alonso
New video from Meeting C++ 2017!
C++: Unexpected Behaviour
by Antonio Mallia and Jaime Alonso
June 16-21, Sofia, Bulgaria
September 13-19, Aurora, CO, USA
October 25, Pavia, Italy
November 6-8, Berlin, Germany
November 16-21, Kona, HI, USA
By Meeting C++ | Feb 15, 2018 03:02 AM | Tags: meetingcpp intermediate
New video from Meeting C++ 2017!
C++: Unexpected Behaviour
by Antonio Mallia and Jaime Alonso
By Adrien Hamelin | Feb 14, 2018 10:16 PM | Tags: basics
Quick A: Welcome to undefined behaviour.
Recently on SO:
Vector going out of bounds without giving error
STL vectors perform bounds checking when the
.at()
member function is called, but do not perform any checks on the[]
operator.When out of bounds, the
[]
operator produces undefined results.
By bfilipek | Feb 14, 2018 07:20 AM | Tags: None
Let’s see how classes can register themselves in a factory and what are the examples where it’s used.
Factory With Self-Registering Types
by Bartlomiej Filipek
From the article:
In this post, I’ve covered a type of factory where types register themselves. It’s an opposite way of simple factories where all the types are declared upfront. Such approach gives more flexibility and removes dependency on the exact list of supported classes from the factory.
By onqtam | Feb 13, 2018 09:42 AM | Tags: None
Most scripting languages have REPLs (read-eval-print-loop) - an interactive console.
Read-Compile-Run-Loop - a tiny embeddable REPL analog for C++
by Viktor Kirilov
From the article:
Ever wanted to modify some value or execute some (complex) statement while your C++ program is running just to test something out? Something that cannot be done through the debugger or wouldn’t be trivial? Scripting languages have REPLs and it's time for C++ to get one too.
By Meeting C++ | Feb 13, 2018 05:41 AM | Tags: tools meetingcpp intermediate efficiency dependencies
New talk from Meeting C++ 2017!
Dealing with software dependencies
by Kiki de Rooij & Peter Bindels
By Adrien Hamelin | Feb 12, 2018 10:55 PM | Tags: intermediate
Good question.
To RAII or Not to RAII?
by Jonathan Boccara
From the article:
RAII is a central concept in C++, that consists in relying on the compiler to call destructors automatically in certain cases. Putting appropriate code in such destructors then relieves us from calling that code – the compiler does it for us.
RAII is an idiomatic technique of C++, but can we use RAII for everything? Is it a good idea to shift every possible piece of code to the destructor of some class, to leave the work to the compiler and make calling code as light as can be?
Since this question comes down to asking if the proverbial hammer is a tool fit for every single task, the answer to that question is probably the proverbial No.
But then, in which cases would RAII improve the design of a piece of code?
In this article we’ll see a case where RAII is adapted, then a case where RAII is NOT adapted. And after that we’ll see a case open to discussion. We’ll then conclude with how to use levels of abstractions to make the decision to RAII or not to RAII...
By Adrien Hamelin | Feb 12, 2018 10:49 PM | Tags: community
ACCU’s Overload journal of February 2018 is out. It contains the following C++ related articles.
Overload 143 is now available
From the journal:
Hapaxes, Singletons and Anomalies
Programmers can be odd. Frances Buontempo celebrates many manifold peculiarities. by Frances Buontempo
A Wider Vision of Software Development
Is code a hopeful arrangement of bytes? Charles Tolman brings his Organising Principles series to a close. by Charles Tolman
An MWSR Queue with Minimalist Locking
Multithreaded queues come in many flavours. Sergey Ignatchenko describes his implementation of a multiple writer single reader queue. by Sergey Ignatchenko
Testing: Choose the Right Level
Testing can be easy. Andy Balaam considers levels to keep your focus just right. by Andy Balaam
CTAD – What Is This New Acronym All About?
What is class template argument deduction? Roger Orr elucidates this new C++17 feature. by Roger Orr
C++ with Meta-classes?
Meta-classes will allow us to detail class requirements. Francis Glassborow compares them to developments of C++ in the 1990s. by Francis Glassborow
Practical Scale Testing
Everyone wants scalable systems. Arun Saha explores methods for testing scalability. by Arun Saha
Functional Error-Handling with Optional and Expected
Exceptions should be exceptional. Simon Brand shows modern alternatives from the standard library and ways to improve them. by Simon Brand
By Adrien Hamelin | Feb 12, 2018 10:47 PM | Tags: experimental community
You can read it or watch it.
Introduction to the C++ Ranges Library
by Jonathan Boccara
From the article:
Do you know the ranges library in C++?
This video will show what limitations of the STL it solves, and how it can make C++ code more expressive.
Since some of you expressed that they liked text more than videos, I’ve included a transcript of the video. I’d be glad to know if you find this useful, and if you’d like to have a transcript for other videos...
By Marian Luparu | Feb 12, 2018 09:37 AM | Tags: None
The VC++ team is asking for your perspectives, whichever compiler you're using and whatever platform you're targeting:
Make your C++ voice heard! Cross-industry survey from the VC++ team
C++ is evolving, and so are our plans around it here at Microsoft. Recent investments by our team include the new cross-platform Visual Studio Code editor, CMake and Linux support in Visual Studio, a C++ language service which, when editing, can match your C++ compiler of choice, and support for remote debugging on any platform.
We would like to hear from you on what are your next set of challenges. Please take our survey to help shape our cross-platform C++ plans
By Marco Arena | Feb 12, 2018 03:50 AM | Tags: community
The Italian C++ Conference is back:
Italian C++ Conference 2018: Call for papers and Call for sponsors
June 23, Milan
The Italian C++ Conference is the biggest event in Italy on C++ development, where professionals, companies and students meet and share experience. The conference is free and organized by the Italian C++ Community.
For an overview of the previous edition, including statistics and technical contents, read the wrap-up post.
Submit your talk by March 24!
We accept talk proposals in both English and Italian. One track will be in English.
Read here and submit your proposal
Call for sponsors
Since the event is free to attend, sponsors will cover the main consts. If you are interested in sponsoring the biggest and most important event about C++ development in Italy, please get in touch.
Next steps, agenda and registrations
After March 24, attendees from our past events, Italian C++ Community staff, and this year speakers will be involved in a voting process. Decisions will be sent to speakers by April 17.
The registrations will open in April and the agenda will be published ~2 months before the event date.