Considerations for choosing the parallel computing strategy - Dori Exterman - @meetingcpp 2015
A new video from Meeting C++ 2015:
Considerations for choosing the parallel computing strategy
by Dori Exterman
By Meeting C++ | Feb 9, 2016 08:34 AM | Tags: performance multithread multiprocess intermediate efficiency c++11 advanced
A new video from Meeting C++ 2015:
Considerations for choosing the parallel computing strategy
by Dori Exterman
By Adrien Hamelin | Feb 8, 2016 06:11 AM | Tags: intermediate efficiency
What is the best thing to return?
Sometimes you get things wrong
by Marshall Clow
From the article:
A few years ago, Sean Parent challenged me to provide an implementation of Boyer-Moore searching in C++. I did that, first in boost and then, later as part of the proposed Library Fundamentals Technical Specification.
The idea here is that you have a searcher object, which encapsulates the actual searching. You construct it with the pattern that you want to search for, and then you call the searchers operator() with the corpus that you want to search, and it will return to you the start of the pattern in the corpus, if it exists, and the end of the corpus, if it does not (this is the same set of rules that std::search follows).
But this weekend I realized that this is not the right thing to return. The searcher (and std::search for that matter) should return a “range” (ok, a pair of iterators) denoting the beginning and end of the pattern in the corpus. (Yes, you can get the end of the pattern by incrementing the returned iterator by the length of the pattern, but that’s an O(N) operation if you only have forward iterators...
By Mark | Feb 7, 2016 11:41 PM | Tags: advanced
From NDC Oslo 2015:
Fundamentals of Type-Dependent Code Reuse
by Mark Isaacson
About the video:
This talk surveys different code reuse problems that can be solved by leveraging type information. Mark talks about how you can optimize your algorithms so that certain types use a "fast path", all while hiding that complexity from your users. He also talks about various ways to create "opt-in" functions for your classes. The talk is accessible to novices but builds gradually to complex ideas, including a theoretical C++17 "Mixer" class that allows users to add arbitrary functions to any type, including ints, on an instance by instance granularity.
By Boris Kolpackov | Feb 7, 2016 11:38 PM | Tags: repository package intermediate build
build2
is an open source, cross-platform toolchain for building and packaging C++ code. It includes a build system, package manager, and repository web interface. There is also cppget.org, a public repository of open source C++ packages.
build2
— C++ Build Toolchain
From the announcement:
This is the first alpha release and currently it is more of a technology preview rather than anything that is ready for production. It has been tested on various Linux'es, Mac OS, and FreeBSD. There is no Windows support yet (but cross-compilation is supported).
By Blog Staff | Feb 7, 2016 09:05 AM | Tags: None
A new WG21 paper is available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: P0225R0
Date: 2016-02-05
Why I want Concepts, and why I want them sooner rather than later
by Ville Voutilainen
Excerpt:
This paper provides highly-opinionated statements, anecdotes and personal opinions explaining why the author thinks Concepts should go into C++17 even if no Conceptified standard library parts are included in C++17.
By Meeting C++ | Feb 4, 2016 10:00 AM | Tags: intermediate efficiency c++14 c++11 basics
A new post on the Meeting C++ blog, this time on <algorithm>
Raw loops vs. STL algorithms
by Jens Weller
From the article:
Since last week I am working on my CMS for static HTML pages again, and so the series about Building applications with Qt and boost continues. Today its about using STL algorithms, or how Sean Parent once said "no raw loops!". Now, I am not Sean Parent, and not event the implementers of the STL are perfect. Most code which I write is application code, which then powers Meeting C++. Also, I don't know all STL algorithms, and some times its just to tempting to write a little loop instead of searching the STL for the specific algorithm. Yesterday I had such a case.
By Meeting C++ | Feb 3, 2016 07:49 AM | Tags: qtdev qt intermediate c++11 basics
A new video from Meeting C++ 2015
Effective Qt
Marc Mutz
By Blog Staff | Feb 2, 2016 01:09 PM | Tags: None
A new WG21 paper is available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: N4573
Date: 2016-02-02
February 2017 WG21 Meeting
by Tom Plum
Excerpt:
The February 2017 WG21 meeting is sponsored by Plum Hall and the Standard C++ Foundation. The meeting will take place at the Royal Kona Resort, in Kailua-Kona Hawaii, Monday Feb 27 to Saturday Mar 04.
By Adrien Hamelin | Feb 2, 2016 10:09 AM | Tags: c++14 advanced
How to use tuple return values with ease?
Emulating C++17 Structured Bindings in C++14
by John Bandela
From the article:
Bjarne Stroustrup back in Novemeber wrote a nice progress report, available here, of the Kona meeting. One of the proposals considered is called structured binding. The proposal addresses one of the inconveniences of returning multiple values from a function using tuples. While, it is very easy for a function to return multiple values, it is harder for the caller to use them. Here is an example from the write up.
consider the following function
tuple<T1,T2,T3> f() { /*...*/ return make_tuple(a,b,c); }If we want to split the tuple into variables without specifying the type, we have to do this;
auto t = f(); auto x = get<1>(t); auto y = get<2>(t); auto z = get<3>(t);The proposal puts forth the following syntax instead
auto {x,y,z} = f(); // x has type T1, y has type T2, z has type T3I am excited for this feature, and for C++17 in general. While waiting for C++17, I decided to see how close I could get with C++14. Here is the result.
auto r = AUTO_TIE(x,y,z) = f(); // x has type T1, y has type T2, z has type T3 // Unlike the C++17 feature, you need to use r.x instead of just x std::cout << r.x << "," << r.y << "," << r.z << "\n";
By Meeting C++ | Feb 2, 2016 08:58 AM | Tags: iot embedded basics
A new video from Meeting C++ 2015:
Developing an embedded application for the IoT
by Diego Rodriguez-Losada