Declarative thinking, declarative practice - Kevlin Henney
Kevlin Henney giving a talk at Meeting C++ 2017!
Declarative thinking, declarative practice
by Kevlin Henney
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 23, 2018 07:39 AM | Tags: meetingcpp intermediate
Kevlin Henney giving a talk at Meeting C++ 2017!
Declarative thinking, declarative practice
by Kevlin Henney
By Corentin Jabot | Feb 22, 2018 11:34 PM | Tags: None
A reply to Guy Davidson’s article “Batteries not included: what should go in the C++ standard library?”.
A cake for your cherry: what should go in the C++ standard library?
by Corentin Jabot
From the article
Over the past few years there has been a push to include a graphics library into the C++ standard. It would be something a bit like cairo. Or SDL.
I do think this is a path that should not be pursued. Let me tell you why...
By Jon Kalb | Feb 22, 2018 04:14 PM | Tags: community c++now boost
C++Now 2018 will be held in Aspen, May 6–1, 2018.
C++Now 2018 Registration is Open
From the announcement:
The twelth annual C++Now Conference (formerly BoostCon) will be held at the Aspen Center for Physics in Aspen, Colorado, May 6th to 11th, 2018.
We expect C++Now to sell out again. Register immediately so you won’t miss out.
By Jon Kalb | Feb 22, 2018 04:01 PM | Tags: students community c++now boost
C++Now 2018 will be held in Aspen, May 6–1, 2018.
C++Now 2018 Accepting Student / Volunteer Applications
From the announcement:
It is my pleasure to announce the sixth year of the C++Now Student/Volunteer program! We are again inviting students with an interest in C++ to attend the May 6-11, 2018 conference in Aspen, CO as Student/Volunteers.
The Student/Volunteer program is an excellent way for students and young coders with an interest in C++ to learn about language and make lasting connections with the community.
Student/Volunteers will receive free registration and a travel stipend for their travel and lodging.
Volunteers will handle various tasks during the conference, such as assisting presenters, setting up presentation rooms, running A/V equipment, and helping with breaks and the conference picnic.
Students from all fields of study are welcome to apply. However, this conference covers advanced C++ topics, and applicants should have ample experience with the C++ programming language and be familiar with general computer science topics.
Applications will be accepted until March 9th, 2018. Application decisions will be sent out by March 16th, 2018.
By Sergey Platonov | Feb 22, 2018 11:14 AM | Tags: None
Keynotes by Jon Kalb, Andrei Alexandrescu, Daveed Vandevoorde, talks by Herb Sutter, Dietmar Kühl, Arno Schödl and others, workshops by Rainer Grimm and Ivan Čukić.
C++ Russia 2018
Saint-Petersburg, Russia, 19-20 April
From the announcement:
C++ Russia with bliny and matryoshkas! With great guests from around the world for two days. The conference is for experienced developers!
By Blog Staff | Feb 22, 2018 09:48 AM | Tags: None
A few months ago, Bjarne Stroustrup received one of the most distinguished engineering prizes in the world: the Faraday medal.
Last night, the U.S. National Academy of Engineering (NAE) presented Stroustrup with the United States' top engineering honor, the Charles Stark Draper Prize, for his work designing and implementing the C++ programming language. (Note: This is the second Draper prize awarded for a programming language; the first was to John Backus for Fortran, awarded in 1993.)
Please join us in congratulatating Dr. Stroustrup! He is the reason we are all here, and able to do what we do every day as C++ developers.
From the announcement:
Stroustrup’s development of C++ has helped bridge the gap between a problem and its computing elements through the use of visualization for engineers and members of varying disciplines, such as biologists, medical doctors, mathematicians, economists and politicians.
Stroustrup, a visiting professor in computer science at Columbia University, was elected to the National Academy of Engineering in 2004. He is a fellow of IEEE, the Association of Computing Machinery, the Computer History Museum and Churchill College, Cambridge, and is managing director in the technology division of Morgan Stanley in New York City.
The Charles Stark Draper Prize is a $500,000 biannual award that honors engineers whose accomplishments have significantly benefited society. It is considered the Nobel Prize of engineering.
C++ revolutionized the software industry by enabling a variety of software development techniques, including object-oriented programming, generic programming and general resource management, to be deployed at industrial scale. According to industry analysts, C++ is one of the most widely used programming languages in the world, with applications in communications, computer graphics, games, user interfaces, embedded systems, financial systems, medical systems, avionics, scientific computation and many other areas.
By Meeting C++ | Feb 22, 2018 06:45 AM | Tags: meetingcpp design concepts c++20
A view on the future of C++ with concepts:
Concepts driven design
by Kris Jusiak
By Guy | Feb 21, 2018 09:44 AM | Tags: None
With the next standardisation meeting coming up, now is a good time to consider what the limits of the standard library should be.
Batteries not included: what should go in the C++ standard library?
By Guy Davidson
From the article:
About forty Christmases ago I was absolutely delighted to open a slot car racing set from my parents. I feverishly set everything up, created a track reminiscent of Brands Hatch, and went to plug everything in, only to discover that I needed batteries to operate the controllers. This was Great Britain in the 1970s...
By Meeting C++ | Feb 21, 2018 05:56 AM | Tags: meetingcpp constexpr c++17 c++14 c++11
Jason Turner about using constexpr in his own codebase:
Practical constexpr
by Jason Turner
By Adrien Hamelin | Feb 20, 2018 08:48 AM | Tags: advanced
Quick A: This happen by default.
Recently on SO:
How can a class template store either reference or value?
You already wrote it (minus the required template <typename T>). The deduction rules for a forwarding reference preserve value category as follows:
- If t is bound to an lvalue of type T2, then T = T2&.
- If t is bound to an rvalue of type T2, then T = T2.
It's those deduction rules that std::forward relies on to do its job. And why we need to pass the type to it as well.
The above means that you instantiate holder directly with T2 in the rvalue case. Giving you exactly what you want. A copy is made.
As a matter of fact, two copies are made. Once to create the constructor argument t, and the other copy is to initialize obj_m from it. But we can get rid of it with some clever use of type_traits:
template <class T> class holder { T obj_m; // should be a reference if possible... public: holder(std::add_rvalue_reference_t<T> t) :obj_m { std::forward<T>(t) } {} }; template<typename T> auto hold_this(T && t) { return holder<T>(std::forward<T>(t)); }See it live. We use add_rvalue_reference_t to make t be of the correct reference type in each case. And "simulate" the argument deduction which would make obj_m { std::forward<T>(t) } resolve to initializing obj_m from the correct reference type.
I say "simulate" because it's important to understand the constructor argument for holder cannot be a forwarding reference because the constructor itself is not templated.
By the way, since you tagged c++17, we can also add a deduction guide to your example. If we define it as follows (with the feedback from T.C. incorporated):
template <class T> class holder { T obj_m; // should be a reference if possible... public: holder(T&& t) :obj_m { std::forward<T>(t) } {} }; template<typename T> holder(T&&) -> holder<T>;Then this live example shows you can define variables as hold h1{t}; and hold h2{test()};, with the same deduced types as the function return values from before.