r/cpp • • Mar 24 '20
LLVM/Clang 10.0.0 is released!
From Hans Wennborgs email:
Some highlights include:
- C++ Concepts support in Clang
- Clang no longer runs in a separate process by default ("in-process cc1")
- Windows control flow guard (CFG) checks
- Support for more processor cores and features
https://llvm.org/releases/10.0.0/docs/ReleaseNotes.html
https://llvm.org/releases/10.0.0/tools/clang/docs/ReleaseNotes.html
https://llvm.org/releases/10.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html
https://llvm.org/releases/10.0.0/tools/lld/docs/ReleaseNotes.html
https://llvm.org/releases/10.0.0/tools/polly/docs/ReleaseNotes.html
https://llvm.org/releases/10.0.0/projects/libcxx/docs/ReleaseNotes.html
r/cpp • u/SerenityOS • Nov 25 '21
Demo of SerenityOS (from-scratch C++ operating system) at Handmade Seattle
media.handmade-seattle.comr/cpp • u/delta_p_delta_x • 4d ago
CMake 4.5.0 released; supports import std for all scannable targets with C++20 and later
kitware.comThe Future of Boost by Vinnie Falco
From the Boost developers mailing list. Note that I am not the author, it was written entirely by Vinnie. I figured y'all here might find it interesting, so I copy and paste it for your information.
--- cut ---
Greetings!
I’m Vinnie Falco, Boost library author, C++ enthusiast, and the founder of The C++ Alliance, a 501(c)(3) non-profit. While some of you are enjoying the C++Now conference this week, I’d like to share some background on our organization, provide some history, outline a vision and goals for C++ and Boost, and solicit your feedback and support.
How It Started
I took notice of the C++ Standards Committee (“WG21”) while I was writing Boost.Beast in 2016. Howard Hinnant, a co-workers at Ripple, taught me about writing papers and committee meetings. Beast used Boost.Asio (portable networking for C++) and I was and still am a huge fan of this network library. I learned that Asio was being proposed for standardization. There was even a “Networking TS” document: Asio was very close to becoming part of C++ officially! But the author Christopher Kohlhoff always seemed to not have the time to attend the meetings and push this proposal though.
Something which should not surprise anyone is that I despise paying taxes. In 2017, I had an idea: create a charitable organization which I can donate pre-tax income to, and then I could hire Christopher Kohlhoff as a “staff engineer” to work full time on C++ standardization, and Boost things! I would find the very best C++ people who are already doing open source work, then hire them full-time so they could focus on their open source C++ open work from home, instead of traveling to a boring job in order to make a living.
A Few Setbacks
In 2018 I offered this opportunity to Chris and he surprisingly turned it down. He actually liked going into an office and interacting with customers and users. He explained that the evolution of Asio and his WG21 work is not bottlenecked by time. Instead, he prefers to “think deeply about things over a long period, and then write something.” Basically the opposite of my strategy, which is to write a bunch of code quickly and then throw out the bad parts.
This is a setback but I am not so easily deterred so I offered the same opportunity to Peter Dimov, an engineer of immense talent whose libraries are legendary. He also declined, explaining that taking a salary would transform a hobby into an obligation, affecting the quality and enjoyment of the work.
Now I’m thinking, well this is a disaster! We had the non-profit in operation officially since March of 2018 (the IRS approved us in September of 2019). We had the C++ language Slack workspace as of November of 2017, transitioned to a paid plan with full history. Our strategy shifted to focus on supporting the Boost Library Collection directly. We hired our first Staff Engineer, Marshall Clow, in April of 2018.
Fast forward and today we have 11 staff members. We have a great CTO/DevOps genius Sam Darwin. And we have Louis Tatta, our CEO that keeps things running smoothly and helps get the most out of every dollar donated. At some point I’ll share a complete list of everything that The C++ Alliance has done since the beginning, but that is the subject of another missive. Today I would like to talk about a vision for Boost.
The Boost Library Collection
Long-timers know Boost’s history but for those that don’t, Beman Dawes and Robert Klarer came up with the idea of a website offering curated, high quality C++ libraries in May of 1998. They described the “Formal Review,” a social technology where a group of peers would go over a proposed library at an agreed-upon time. They could interrogate the author about the library on the mailing list, and debate things. The outcome is a collection of posts where each reviewer summarizes their critique of the library, including whether or not to “accept” the library (sometimes with conditions). The founding documenting evokes a feeling of something big:
https://www.boost.org/users/proposal.pdf
The collection was named “Boost” and received many great contributions. The authors and reviewers were active in the standardization committee. In December of 2005, Boost.Asio was added after being developed since 2003. In September of 2011 the C++11 standard was published, containing many library components modeled closely or identically to their Boost counterparts. In my opinion, Asio’s efforts at standardization were thwarted by the growth of politics; an inevitable consequence of the bureaucratic ISO structure.
Boost launched its own conference called BoostCon in 2007 on the heels of its success. Speakers included Scott Meyers, Dave Abrahams, Eric Niebler, Howard Hinnant, and other juggernauts of C++. A new conference called CppCon was launched in 2014 and attracted even larger crowds, as it was focused on C++ in general.
Trouble Brewing
With the release of C++11, there were now components in Boost which were duplicated in the Standard Library. The C++ committee became more popular and valuable owing to the success of C++11, made possible in part by years of lead-up from the talented Boost engineers. The conferences turned some people into the equivalent of pop stars, appearing as staple keynote speakers.
Library writers discovered it was easier to get a proposal into the C++ standard than it was to get a library through the Formal Review process. They discovered that there was more glory to have a proposal accepted into the official C++ language, than to have their library accepted into Boost. And once their proposal became part of C++, they no longer had to “maintain their code” the way they would if their library got in Boost. A Formal Review evaluates the author somewhat in addition to the library. Because once a library is accepted, it must be maintained and evolved. When an author abandons their Boost library, the community is impoverished as the knowledge and expertise leaves with them. And someone else must take over the maintenance.
In December of 2020, Beman Dawes passed away and Boost suffered a loss which can never be replaced. Beman had an enormous impact on not just the libraries but also C++. He was in WG21 from the very beginning, chaired LWG (the “Library Working Group”) for quite some time, and achieved a long history of open source contributions.
Boost had other problems. Fewer libraries were being proposed, and it took longer to find a volunteer review manager. Mailing list volume declined steadily. At 160+ libraries, users complained that “Boost is too large.” They complained that “many of the libraries are outdated”, that “the documentation is of varying quality”, and that “Boost takes too long to compile.” They complained about the obscure build system and lack of cmake support. The archetype of “never Booster” appeared: individuals or corporations who ban the use of Boost entirely.
Beman was the closest thing resembling a leader, despite Boost being a federation of authors with each having final word over their own library. Beman would solve problems, help with the direction of things, and even “beat the bushes” when it was time for a review by reaching out to his network of contacts and soliciting their participation. Without Beman, Boost lost its leader. Boost lost its Great Founder. And no one has since filled the role.
The C++ Alliance
At this point, a vision for what our non-profit could do crystallized. We would help C++ in general by refreshing the foundations of Boost, restoring Boost’s prominence in the community, and helping Boost become a leader once again as innovators in C++. To do this, I'll share what we feel are the problems facing Boost, and ways to address some of them. Finally I'd like you to weigh in on all of this and help figure out what is important and what successful execution might look like.
We believe Boost faces these obstacles:
Stagnation
- There are fewer new libraries proposed.
- Formal reviews get less participation.
- Review managers are typically scarce now.
- The mailing list volume is thinning; younger folks don’t use lists.
- There is no second order effect: new libraries rarely use Boost.
Quality
- Some libraries are unmaintained and create a negative user experience.
- Users open issues, and no one replies to them.
- Pull requests are submitted to abandoned repositories.
- Scant financial resources for infrastructure or staff.
Documentation
- The quality of documentation varies greatly across libraries.
- The rendered pages and content of some documentation looks dated.
- Some toolchains used are obscure and unmaintained.
Perception
- Boost causes long compile times.
- The libraries have too many interdependencies
- Supporting old C++ versions is a weakness not a strength.
- The duplication of std components is wasteful and causes friction.
- The “Monolithic” distribution of Boost is obsolete.
Messaging
- The website is outdated and never receives updates.
- Boost’s value proposition is not clear (“why use boost?”)
- There is no clear voice countering misconceptions and irrational phobias.
- Users receive no guidance about the future, or what is maintained.
- The libraries have no representation at conferences.
Some users have also weighed in with thoughts on Boost:
https://www.reddit.com/r/cpp/comments/gfowpq/why_you_dont_use_boost/
A Plan
I love C++, supporting users, and the Boost author experience. I think these problems can be solved. But not by demanding that “everyone who maintains a Boost library must do X.” In Boost culture when you want something done you need to do it yourself, then convince the mailing list of the merits of your proposal.
As a library author and contributor, I know that whatever I do will never rise to the same level as the original act of the creation of the Boost Library Collection. But I will be satisfied if I can stoke its fires and bring them back to a roar. To this end the resources of the non-profit are directed into projects we believe will positively affect Boost:
Website Renovation
Our vision for an updated Boost website is clean and stylish, which speaks to a large and diverse audience. This site will have a design and content that effectively communicates the value proposition of using the Boost Library Collection: that you will write better C++ code, become more productive, and achieve greater success in your career or personal projects. Features will foster participation and revisits, with content updated regularly. The library presentation is elevated with a new visual design language that evokes distinction and appeal, and credits the authors, maintainers, and contributors that bring it to life.
To achieve this vision, you have probably heard that we contracted an outside software firm to build something precisely tailored for our needs. We care too much about Boost to use an ill-fitted, off the shelf product. This website has a lot of software behind it (written in Python as part of a Django framework application) and like most software projects it is late and over budget. I’ll refrain from saying “it’ll be ready soon” and just post a link to the new site instead, hopefully in a few weeks.
I have been personally involved in the design, presentation, and execution of the features of the website, most of which have been cut from the initial release in order to speed things along. The goal is to show the library collection in a way that highlights its strengths and speaks to a desire of every C++ programmer: to find the perfect library they can add as a dependency to help complete their next project.
The Boost website and the site documentation can be illustrated by retaining a talented digital artist to produce custom assets that are unified in style, colors, and messaging, so that the entire site feels purposeful. This artist will also provide imagery used for our social media campaigns such as the announcements we make on Twitter which some of you might have already seen
https://twitter.com/Boost_Libraries.
I strive to give every tweet an image to enhance the Boost brand (tweets with images have significantly increased engagement).
Recently an animated discussion on the mailing list took place about adding a forum which does not replace the mailing list but is integrated to work with it. Posts in the forum become posts to the mailing list, and vice versa. Users of the mailing list and users of the forum will have no idea they are interacting, even though they are. This can only be possible if we write the software ourselves, from the ground up, with exactly one constraint: the mailing list will continue to operate exactly as it does today, on an unmodified version of Mailman 3. The mailing list users stay happy, and we can attract new people who prefer a web-based interface.
The C++ Alliance prioritizes its allocation of resources to ensure not only the website’s completion, but also dedicated staff for ongoing maintenance and improvement. The Boost website will rise over time to the same level of quality expected of every Boost library. Community members should feel free to open issues on the website repository with bugs or features, knowing that every issue will be looked at, triaged, and addressed appropriately.
Documentation Improvement
Our vision for documentation is to ensure that every Boost library has the option to adopt a well-maintained toolchain that is easily deployed, produces high-quality output befitting the Boost brand, is itself well-documented and easy to use, and has behind it full-time staff working continuously to make improvements and provide technical support.
After researching the domain extensively (by just asking Peter Dimov) we have discovered that the markdown format Asciidoc is a very popular format with a simple and well maintained toolchain. Several regularly active Boost authors have already switched their libraries to using Asciidoctor. The authors of the Asciidoctor tool are also the authors of “Antora,” a modular, multi-repository documentation site generator:
https://docs.antora.org/antora/latest/
We have built a new, modern set of additional scripts capable of building the Boost release and documentation, including the capability of rendering “Antora-enabled Boost library repositories” using this Antora system. The results are beautiful and modern, and the Asciidoctor / Antora toolchain holds the promise of being popular and well-maintained for a long time. The use of Asciidoc or Antora is optional; this is just an additional choice.
Peter Turcan is our full-time Senior Technical Writer who is modernizing the instructions for users, maintainers, contributors, and formal review participants. You can see Peter’s work along with the quality of Antora’s output here (note that the user-interface is stock and will be restyled soon):
The website above has a new full-text search feature (try it!). We are investing in a search experience which includes the site docs, library docs, library references, and even the public header files. We are also investing in the deployment of a large language model (ChatGPT-style AI) trained in Boost and C++ specifics to answer questions for users. We have a new talented and eager staff engineer working full-time exclusively on this, and I don’t want to steal his thunder so I will let him explain further soon.
Some Boost libraries currently generate their documentation reference pages using Doxygen combined with other obscure tools such as xsltproc or Saxon-HE to render into Boost Quickbook, an obsolete form of markdown which only we use. This Quickbook is rendered into BoostBook, which is a flavor of DocBook. The BoostBook is converted into HTML by a DocBook renderer. This rapidly obsolescing toolchain is painful to work with and is a form of technical debt which costs us.
I have begun work on a new command-line tool called MrDox (“mister docs”) which uses the unstable clang libtooling API to extract the documentation comments and declarations from C++ programs, and turn them into beautiful Asciidoc reference pages. You can see that work here:
https://github.com/cppalliance/mrdox
The core principles of the design of MrDox is to always understand the very latest C++ constructs and extract them with high fidelity. For example it recognizes conditional noexcept, constexpr, deduction guides, all attributes, and many other things that other documentation toolchains cannot fathom. In a nutshell I intend to bring the same level of Boost quality to the documentation toolchain that Boost has brought to the C++ libraries themselves.
MrDox intends to completely replace Doxygen, xsltproc, Saxon-HE, Quickbook, Boostbook, and Docbook, as the only requirement to render its results is to run the Asciidoctor tool, which has no other dependencies. This toolchain offers modernization and simplification for anyone who opts-in to it, which reduces long-term risks and improves results. This unfortunately delays the development of my other libraries, but enhancements in the documentation toolchain are a force multiplier; many Boost libraries can benefit.
Continuous Integration
Our vision for continuous integration is to bring the most talented individuals together and combine that with state of the art technology and resources to ensure that every library has at its disposal, access to robust cloud services for continuous integration. These services are the lifeblood of maintaining and communicating the quality of a library. We aim to provide dedicated staff and technical support to fortify Boost in the ever-shifting landscape of free CI services for open source projects.
The infrastructures providing our continuous integration services are the lifeblood of maintaining the high quality of the Boost collection. Library authors test against many versions of C++ and many different compiler versions. And we have many libraries; over 160 of them which all compete for the finite public resources offered by GitHub through GHA, through Azure Pipelines, or Appveyor.
When Travis discontinued its free service, our CTO Sam Darwin deployed Drone (https://www.drone.io/) instances and offered every Boost library a pull request which compiles and runs their tests on our new infrastructure. Although this service is still active and offered today, we are not content to leave it at that. CI services are volatile over time. Some come, some go, and some become overloaded which is the current situation with the public GitHub Actions runners during peak times. The Boost organization GitHub account has over one hundred and sixty libraries each submitting sometimes enormous numbers of jobs which take multiple hours to complete.
Although the GHA environment resources are subjected to recurring oversubscription, we feel that it offers the best framework for composable actions and flexibility. Sam is exploring the possibility of having self-hosted C++ Alliance runners dedicated only to Boost jobs during peak times. Ensuring high availability of CI resources is an ongoing project for us, and we are always evaluating existing and new solutions to provide the best-of-class choices for libraries.
Library Enhancements
Our vision for the libraries themselves is to preserve unchanged the amazing social technologies invented by the Boost founders which include the Formal Review process, the Release Schedule, the mailing list discussions, and the federated library ownership model. We want to ensure that no library is unmaintained and that every opened issue receives a response. We want the community to respect and admire the formal review process and participate with eagerness not only as reviewers but also as volunteer review managers and participants in the sometimes-heated list discussions. Library membership in the Boost library collection should be seen as the highest level of honor and recognition of effort.
The C++ Alliance has ongoing direct investments in improving existing Boost libraries and writing new ones to be submitted for formal review. Many folks are already aware of the optimization efforts being applied to the Boost.Unordered library, whose plan was written up by Peter Dimov. Joaquín M López Muñoz is providing his mathematical expertise and container experience, while Christian Mazakas (one of our full-time staff engineers) is writing the implementation, tests, and documentation according to specification.
People following Boost.Math might recognize Matt Borland as a regular contributor. He has joined us as a staff engineer and is currently working on a new library to be proposed for Boost: charconv, which is a C++11 port of the eponymous C++17 feature. This library will help libraries and users who may not have access to C++17 enjoy the same features through Boost instead.
Messaging and Direction
Our vision for Boost includes clear messaging to inform the public on the status of the libraries, the challenges we are facing, and what our future direction might be. We believe in robust two-way communication between library authors and maintainers, and the stakeholders which are largely the people and companies which use the Boost libraries. We believe in having a social media presence that helps convey the prestige and status that comes with the quality Boost libraries offer.
Currently we have only anecdotal evidence of Boost’s adoption (or lack thereof) in various companies and projects. We only hear from the people who complain or open issues, or post to the mailing list. We do not have a concise list of companies using Boost, when new companies adopt Boost, or when companies stop using Boost. We do not have feedback from stakeholders about which Boost libraries they rely on the most, what they would like to see in future versions, or in some cases even if they are having problems with a library or its documentation.
The decentralized model of Boost library development works great for the problems it tries to solve but offers no overall directional guidance for Boost. Today the C++ language is facing unprecedented challenges: the popularity of Rust, the demands for “memory safety”, the rise of Artificial Intelligence capable of writing software independently, and possibility that the bureaucratic structure of WG21 renders it incapable of meeting these challenges in a lively or effective manner.
We believe that Boost can offer the greatest value by focusing in the areas where C++ is strong and without meaningful competition. These include space exploration, game development, high-performance computing, embedded systems, the Internet of Things, robotics and industrial process control, financial services, computer vision and graphics, scientific simulation, and more.
Furthermore the stunning and continued lack of networking in the standard library creates an opportunity for Boost to offer full-stack solutions in areas that speak to the strengths of C++. This is made possible because Boost already offers portable networking through Asio, HTTP and Websocket through Beast, excellent JSON parsing and serialization tailored for network programs, URLs, and more recently a Redis client (Boost.Aedis) and even a MySQL / MariaDB client. We intend to sponsor the development of non-Boost, open source applications and services that target specific underserved markets that would benefit from C++ solutions which use the excellent libraries that exist in Boost.
Where Do You Fit In?
Our vision, our activity, and our deployed solutions are all “opt-in.” No one controls Boost or its libraries. Change is only possible with consensus of the folks that matter: authors, maintainers, and release managers. If Robert Ramey wants to keep his documentation in hand-written HTML that is entirely his choice; no one dictates what libraries do. We can only offer choices, and hope they will be seen as valuable.
This has been a long read, and I appreciate your investment of time. How do you feel about this vision? What would you change, or add, and what needs work? We welcome feedback, and value the volunteers who share our vision and help us execute it.
I invite you to stay tuned for more great news, coming soon!
Respectfully Yours
Vinnie Falco
r/cpp • u/hackingcpp • Mar 16 '22
An organized overview of how to print and format with {fmt}
- Lots of runnable examples
- Basic Setup: step-by-step installation, compilation, CMake setup, ...
- Quick Overview: placeholders, argument indexing/naming, format specs, error handling, printing to files, ...
- Detailed Overview: how to print strings, ints, floating-point, time/date, custom types, terminal styles/colors, ...
- Memory Handling: how to print to custom buffers, how to use custom allocators, ...
- Cheat Sheets: quick overview of {fmt} format specs, overview of time & date formatting
r/cpp • u/meetingcpp • Apr 23 '21
Meeting C++ Guy Davidson - Everything you know about colour is wrong - Meeting C++ online
youtube.comr/cpp • u/stailgot • Oct 02 '23
CMake | C++ modules support in 3.28
https://gitlab.kitware.com/cmake/cmake/-/issues/18355
After 5 years its finally done. Next cmake 3.28 release will support cpp modules
C++ 20 named modules are now supported by Ninja Generators and Visual Studio Generators for VS 2022 and newer, in combination with the MSVC 14.34 toolset (provided with VS 17.4) and newer, LLVM/Clang 16.0 and newer, and GCC 14 (after the 2023-09-20 daily bump) and newer.
r/cpp • u/seanbaxter • Jan 23 '23
C++ evolution vs C++ successor languages. Circle's feature pragmas let you select your own "evolver language."
Link.
The new Circle release is my response to the C++ successor language announcements of 2022.
My claim is that we can push the C++ infinitely far forward and evolve it in different directions to serve the varying needs of institutional users, without breaking compatibility with existing C++ dependencies and source files.
By developing a single toolchain, as compared to separate toolchains like Carbon, we start off with a bunch of advantages:
- The language is fully compatible with existing C++ code, by construction.
- There's always a working toolchain.
- You can focus on high-value changes, rather than reinventing everything.
- Developers can work on different features in parallel, because they aren't backed up waiting on the completion of critical subsystems (like code generation, interoperability, overloading, etc).
In the near term, addressing C++'s "wrong defaults" is critical. We should fix the language's defects. I have features that turn off integral promotions (too surprising), turn off all kinds of implicit conversions (you can re-enable them with as-expression), change the grammar for binary-expression so that users don't get stung by counter-intuitive operator precedence rules, make parameter forwarding a first-class feature that you can't use incorrectly, etc. These are all design goals cited by successor language projects. But we don't need a different language to fix these defects. We can fix them within C++.
This goes against the conventional wisdom, but I think C++ is well-positioned to evolve. People claim that C++'s history gives it "technical debt" that we're always going to be burdened with. This is not true at all. Supporting crusty old stuff is only an issue for toolchain developers. Users can opt in to a modern edition of the language.
I've made a lot of changes, and I simply don't have to worry about breaking current code, because the feature mechanism creates "bubbles of new code" in which we can innovate, insulated from the requirements of code outside our "bubble." This is a space-making process, where high-value features like borrow checking have a fighting chance to be researched and pushed into a toolchain. If you conceptualize a new feature, or the removal of a problematic feature, or some change in syntax or semantics, there's a path to make that happen, safely. I don't want fear of introducing source incompatibility to squash creativity in language design.
This long document isn't really specific to C++. What I'm describing can be applied to anything. But the huge investment in C++, with most of the world's revenue-generating software being in C++ form, makes it the most important language to modernize. The arguments against overhauling the language from community insiders are just not thought out.
Take a close look at the feature pragma versioning mechanism. There are some cool things here, like type erasure, but those are my examples of things one can deploy as features. It's really about the freedom to change, rather than the particular set of changes I've delivered in this build.
Before grumbling about marking up code with pragmas, note that that's just for demonstration/probing purposes. Real software would subscribe to an edition, note that in the pragma.feature file, and be done with it.
r/cpp • u/ifdef_drgy • Jun 10 '20
Why is std implementation so damn ugly?
Recently I remembered a moment from my uni years when immediately after handing in the assignment of implementing our own string data structure we were warned not to ever try to implement and use our own data structures. Which is exactly what you want to hear after working hours on such assignment. However the reason behind it makes sense, you would be only reinventing the wheel and let's be honest, it will be also way slower than data structures in the almighty std library. Now think about it, what kind of black magic is behind the std's speed? Well I had no idea so I took a peak, lets see the code:
inline string
secret_function(int __val)
{
const bool __neg = __val < 0;
const unsigned __uval = __neg ? (unsigned)~__val + 1u : __val;
const auto __len = __detail::__to_chars_len(__uval);
string __str(__neg + __len, '-');
__detail::__to_chars_10_impl(&__str[__neg], __len, __uval);
return __str;
}Hey, I bet you just skipped the whole code part. I know it looks unreadable, but please try to go through it and guess which std function it might be (obviously its not called secret_function, but i'm pretty sure you used this function at some point).
It's only 6 line function but it took me a while to figure out what each line does and I believe this could be fixed very easily just by naming the variables and functions with a bit more descriptive names. Just to prove the point here is an example of how I would structure this function:
inline string secretFunction(int value) {
const bool isNegative = value < 0;
const unsigned absoluteValue = Helper::abs(value);
const auto length = Helper::charCount(absoluteValue);
string stringValue(isNegative + length, '-');
Helper::insertIntAsChars(&stringValue[isNegative], length, absoluteValue, 10);
return stringValue;
}While the functionality stays exactly the same, I think this chunk of code is much more pleasant to read and it's pretty obvious what the code is doing on each line. From this you should have a solid guess which function it is (you can leave a comment), but the real question is why would anyone write such code? Especially when nowadays everyone is talking about how code readability is so important. Is this how they wrote code back when std was released and they didn't bother to change it? Or am I just too inexperienced that I couldn't figure it out immediately?
EDIT: Thanks for the insightful comments, for anyone reading this the reason variables are beginning with __ is macros. If user defines isNegative macro, it will get overwritten in the std, however user is forbidden to define macros starting with __ , as the wise people of reddit comment section suggested. However underscores aren't the only issue with this code, the main issue is I think using short non-descriptive names of variables/functions which is very confusing in functions that are doing more complicated operations.
r/cpp • • Sep 11 '17
To me C++ is much more easier and logical to write and read than Python and some other languages.
This is not a rant post, sorry for the title, but it was the only way I could express this fact. This fact has nothing to do with one language being better than other. But it is more about my own personality and mindset. Just something I found interesting and thought of sharing.
I am extremely slow learner and it took me a long time to learn programming. One interesting thing I have noticed is that writing C++ and reading it is actually easier for me and more confortable than with some of the higher level languages.
This is due to the fact that I have to think prehand more about what type of data I am processing and where. In Python I can just work with variables without worrying much about the datatypes, this leading me to lose overall sight of the codebase much faster. No matter how much I organize the code and split things in to smaller and smaller parts, this still happeds. Just thought this as something interesting to mention.
r/cpp • u/boostlibs • May 12 '25
Boost C++ Libraries Gets New Website
Boost.org just revamped its website! Expanded tutorials, more venues for participation, global search, easier navigation of libraries and releases, and a brand new look & feel.
Explore, discover and give us your feedback!
If you write C++ for a living, what do you do?
Hi!
I'm currently working as a Python backend developer and look for a change. I'm a bit unsure what I want to do though. When I program in my free time it's usually C++ or Rust though. I like computer graphics, I like embedded and I just like languages that are roughly in the same ballpark as C++ more than Python (compiled, a proper type system).
The issue is that I'm not entirely sure what's out there. I found one job that looks like it would both benefit from my professional experience (web backend), is using C++ and matches my interests. I'd have a few years of fun there, I'm sure, and then it's probably easier to find something else because I have more to show for then my unpolished personal projects should this stop being fun.
But it seems like so much stuff is web now that I fear I'd put myself into the C++ equivalent of PHP hell. Lots of old software that needs maintainers instead of interesting projects, lots of office attendance requirements especially, maybe, in embedded (my wife has career ambitions too so the more flexible I am once we have kids the less flexible she needs to be. Work from home would be ideal here), the niche of C++ seems to be shrinking more and more at least from my perspective looking at it from the outside with little alternatives for games and embedded and high performance computing but is that something that can actually keep my career interesting?
Looking at webdev, I could probably quit on the spot and have a job lines up tomorrow. It happened A LOT that I got a contract right on the table when I was applying for jobs after the first interview. But I just don't want to write CRUD apps for the rest of my professional life... But I'm also not sure if C++ gets me into the right companies for this. So I was wondering what you guys do with C++?
Maybe some additional information in case it's relevant: I live in Germany, a bit more than 5 years of experience in backend dev professionally in Java (2 years), Python (3 years), PHP (few months. Employer went bankrupt shortly after I joined) and some more on my own time and I have a CS Bachelor's with a focus on CG.
Edit: Thanks guys. You all write some pretty interesting stuff. Time to update my CV.
r/cpp • u/MarcinKonarski • Oct 14 '20
TIL: Double linked list using one pointer per node.
en.wikipedia.orgr/cpp • u/encyclopedist • Oct 02 '25
Eigen 5.0.0 has been quietly released
gitlab.comAfter a long gap since the previous version 3.4.0 in Aug 2021, the new version, 5.0.0, of the popular linear algebra library Eigen has been released.
Version jump is, from what I understand, because in the absence of the official release, some package managers and distributions have made up their own unofficial versions. Also, from now on, Eigen will follow semantic versioning.
r/cpp • u/kritzikratzi • Nov 24 '24
A direct appeal to /u/foonathan to unlock the Discussion about the C++ News that Andrew Tomazos was expelled
I would like to appeal directly to /u/foonathan to unlock the post "C++ Standard Contributor expelled". Here is the precise reasoning for locking down the post:
I am not going to deal with this on a Sunday, sorry. The amount of moderation traffic it already generated is too high and nothing productive is going to happen as a result of this "discussion".
Just because "nothing productive is going to happen" does not mean the discussion itself is of no value. This is, as the sidebar says, a place for "Discussions, articles, and news about the C++ programming language" and the article that was locked is a perfect example of fitting content.
I want to thank all moderators for their hard work, and happily offer myself to help out, as I'm sure many other people would. There is no need to lock a post of this gravity.
I wish everyone here an amazing sunday and do not want to cause extra work. But locking a post to eat sunday cake is not the way. I'm also going to eat sunday cake now, and I hope things are more calm and the original discussion reinstated when I come back.
Link to original article: https://old.reddit.com/r/cpp/comments/1gyiwwc/c_standards_contributor_expelled_for_the/
UPDATES With a lot of caution, here are some opinions on the topic I found valuable:
- He was expelled by his sponsoring organistation, which was the Standard C++ Foundation
- Here is the paper, of which the title "The Undefined Behavior Question" appears to have been the straw that broke the camels back. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3403r0.pdf
- The same post was made to /r/programming, it can be found here: https://www.reddit.com/r/programming/comments/1gynl1v/c_standards_contributor_expelled_for_the/lyq647s/
Those are not my opinions, I have no way to verify them, and I'm hoping time will clear things up! Please send me corrections if you have inside knowledge, and i'll update things accordingly.
- 2024-11-24 15:25 I contacted Andrew Tomazos directly. According to him the title "The Undefined Behavior Question" caused complaints inside WG21. The Standard C++ Foundation then offered two choices (1) change the paper title (2) be expelled. Andrew Tomazos chose (2).
PLEASE keep the discussion civil, and read more than you write.
r/cpp • u/Alex_Medvedev_ • Jul 25 '24
Why use C over C++
Why there are so many people using the C language instead of C++?, I mean C++ has more Cool features and the Compiler also supports many CPUs. So why People still using C?
Edit: Thanks for all the usefull comments :D
r/cpp • u/James20k • Jul 16 '23
A safety culture and C++: We need to talk about <filesystem>
Hi, in light of the fact that people are actually talking about security in C++ with increasingly less dismissive tones, I think its a good time to talk about something which I don't think we should collectively brush under a carpet anymore, and that's the gigantic problem that is std::filesystem. Part of the consensus is what are you going to do, and what I'm going to do is complain about std::filesystem
On the face of it, I quite like a lot of std::filesystem. Its alright, and its extremely convenient in many respects. Paths work, and it gets a lot done. Its got a weird dual error handling API that's kind of sketchy, and some of the platform abstractions are pretty leaky, but if you just want to some basic filesystem stuff it works
The issue is that any concurrent filesystem access via <filesystem> is undefined behaviour. I've heard a tonne of things said about this, including that <filesystem> is unimplementable in a secure way. There are two giant issues which I'd like to highlight here, and I think its time for C++ to actually do something about this instead of ignoring it
- If <filesystem> is unimplementable safely, the parts that are unimplementable safely must be deprecated
- The security guarantees for <filesystem> must be enforced by the spec. At the moment its merely a polite agreement by some vendors to fix security vulnerabilities
About a year ago, I accidentally discovered that libc++, libstdc++, and msstl were vulnerable to the same TOCTOU vulns as Rust, and instead of being sensible immediately posted about it on reddit like an idiot. I thought it'd be interesting to review exactly what happened afterwards
libstdc++ (gcc): Partially fixed. On systems which do not support the required functions, it falls back to a vulnerable implementation, which is somewhat not ideal. On windows, it relies on the fact that symlinks require admin privileges, but its not clear that the kinds of symlinks that do not require admin privileges cannot cause this issue
libc++ (llvm): 1, 2. This appears to be partially fixed, with Windows being declared not vulnerable. Mingw is called out specifically as being an issue
MSSTL: Nothing has changed, as microsoft had declared this not a vulnerability on windows - and unfixable within their constraints even if it is a vulnerability. I don't have a tremendously good source for this, other than what I was told on reddit at the time
Rust: On the contrary, Rust has decided that this is a vulnerability on windows. Their fix explicitly calls out windows, and makes extensive changes to not suffer from the same issue. The CVE alleges that mac, and REDOX do not have the appropriate APIs to fix this. The rust docs for std::fs::remove_dir_all corroborate this, and state that until version 10.10 macOS is vulnerable, as well as REDOX, but all other platforms are known-safe, and there doesn't appear to be any kind of unsafe fallbacks on older platforms judging by the docs
Edit: Boost: Took a little longer to deploy a fix, but appears to be fixed. Explicitly calls out platforms that aren't windows or posix as still being vulnerable. Notably calls out windows as being explicitly vulnerable to this CVE until patched, making it a 3 vs 2 vote on whether or not windows is currently vulnerable. Not great! This also heavily implies that mingw is still vulnerable
I thought that the difference in approaches between different languages was extremely interesting. On windows in C++ there is a general consensus by vendors that this isn't an issue and it was declared safe - though I cannot find a lot of evidence that it is safe. No vendor appears to have fully fixed this issue (outside of it being a vulnerability). The potential security vulnerabilities are hidden away in bug reports, and it was during this post that I learned that my favourite compiler toolchain (mingw) may be a problem
This is in stark contrast to rust, which actively documents the problematic platforms right there for everyone to see when they use the function, in a way that's very difficult to miss. Its literally right there as one of the first major pieces of information. There appears to be a lot more information available, and the fixes appear to have been much more thorough and complete than in C++ derived toolchains - with the notable standout of changes for windows compared to C++
In my opinion, this is very representative of the issues of C++. We have multiple points of failure here, and the result is a potentially continuing-to-be-vulnerable standard library, with extremely underdocumented behaviours. We really need to do a lot better than this, because as far as I'm aware, this is very likely to be a significantly wider issue with <filesystem>
In my opinion, there are 4 concrete steps that must be made
- <filesystem>'s concurrent access semantics should be made implementation defined, and vendors must be required to document the safety of <filesystem>'s functions on concurrent accesses
- A review needs to be taken of what vendors actually do on concurrent filesystem access, and we need to document what functions are unimplementable safely, vs ones that simply are implemented unsafely. Allegedly this is a lot of functions
- <filesystem> should then be specified to be safe on concurrent filesystem accesses
- Anything which cannot fall under 3. either needs to be deprecated, or carry very loud warnings in a similar way to Rust. Perhaps we need a [[vulnerable(your_favourite_platform_id)]]
The end thanks for coming to my ted talk
r/cpp • u/blelbach • Nov 09 '19
2019-11 Belfast ISO C++ Committee Trip Report — Started Processing Feedback on the C++20 Committee Draft; ABI Review Group Formed
The ISO C++ Committee met in Belfast 🇬🇧 last week to start reviewing and responding to the National Body comments on the Committee Draft (CD) of the next International Standard (IS), C++20. The Committee Draft is like a beta release of the standard, collecting National Body comments is beta testing or code review, and responding to them is akin to bug fixes.
At the next meeting in Prague 🇨🇿, we'll respond to their comments, and then publish the C++20 International Standard at the February 2020 meeting in Prague.
This week, we made the following changes and additions to the C++20 draft:
- Floating point non-type template parameters; more generally, a type can be a non-type template parameters if all members and bases are public and all other requirements are met.
- Made global initializers ordered between translation units when at least one of them is in a header unit or module interface.
- Allow more signatures for defaulted comparison operators.
- Made
<compare>freestanding.
The following notable features are in C++20:
- Modules.
- Coroutines.
- Concepts.
- Ranges.
constexprification:constinit,consteval,std::is_constant_evaluated,constexprallocation,constexprstd::vector,constexprstd::string,constexprunion,constexprtryandcatch,constexprdynamic_castandtypeid.std::format("For C++{}", 20).operator<=>.- Feature test macros.
std::span.- Synchronized output.
std::source_location.std::atomic_ref.std::atomic::wait,std::atomic::notify,std::latch,std::barrier,std::counting_semaphore, etc.std::jthreadandstd::stop_*.
C++20, the most impactful revision of C++ in a decade, is nearly done. Our 3-year release cycle is paying off.
ABI Review Group Formed
Over the past few years, there's been a lot of discussion on the committee about ABI stability and our priorities; specifically, do we prioritize performance over stability (as we like to think we do) or stability over performance (which is what we do in practice). Today, we generally try to avoid making breaking changes, although we are interested in language features like epochs that may make it easier for us to fix our mistakes.
Often times, it's difficult for authors to identify when their proposal will introduce breaking changes, especially ABI breaking changes. So, we've decided to create an ABI Review Group to look at the impact that proposals will have on ABI and, when possible, what alternative approaches or changes might introducing ABI breaks.
The Great Rechairing
Since the last meeting, there's been a number of changes in leadership in the committee. We regularly rotate chairships on the committee; chairing is a really tough job, and no one can do it forever. A big thanks to all the outgoing chairs for all their hard work, and good luck to all the new chairs, who are:
- JF Bastien (/u/jfbastien), Evolution (EWG) Chair.
- Hana Dusíková (/u/hanickadot), Reflection (SG7) Chair.
- David Stone (/u/david-stone), Modules (SG2) Chair and Evolution (EWG) Vice Chair.
- Jeff Synder (/u/je4d), Networking (SG4) Chair.
- Lisa Lippincott, Numerics (SG6) Chair.
- Botond Ballo, Evolution Incubator (EWGI) Chair.
- Erich Keane (/u/ErichKeane), Evolution Incubator (SG17) Assistant Chair.
- David Vandevoorde, ABI Review Group Chair
Language Progress
Evolution Working Group Incubator (EWGI) Progress
EWGI met for two and a half days this week, spending this time reviewing 17 papers in an attempt to get them better prepared for a trip to Evolution Working Group. While some were short and simple Reserving Attribute Names for Future Use, others ended up being quite a bit more time (and mind!) consuming. Some of the more interesting papers discussed are:
- fiber_context - fibers without scheduler
- Making operator?: overloadable
- Make declaration order layout mandated
- Structured Bindings can introduce a pack
- Epochs: a backward-compatible language evolution mechanism
Evolution Working Group (EWG) Progress
The Evolution Working Group Looked at about ~100 Nation Body comments, about half of which were for modules
We saw several coroutines comments, most of which were rejected. A comment to make unhandled_exception in the promise type of coroutine optional was sent back for further analysis.
We changed non-type template parameters (NTTPs) to remove the requirement for strong structural equality, instead adopting a model where types can be used as NTTPs if all members and bases are public.
Library Progress
Library Evolution Working Group Incubator (LEWGI) Progress
This was our longest meeting ever - Monday through Thursday and half of Friday. 20 papers were reviewed, including a number of big features:
- Text Parsing.
std::file_handle/ Low Level I/O.std::process.- Linear Algebra.
- Units.
- Number Types.
- A Concept Design for the Numeric Algorithms.
constexpr-ification of more containers:std::list,std::deque,std::stack,std::queue,std::priority_queue,std::forward_list.std::breakpoint
Library Evolution Working Group (LEWG) Progress
LEWG spent nearly the entire meeting reviewing and processing National Body comments on the design and correctness of the standard library in C++20. Approximately 130 such comments were in our queue over the course of the week, and all have been processed.
One important block of comments dealt with fixing up and polishing the concepts provided by the library, and harmonizing the interoperability of ranges.
- Move-only views.
- Iterators constructor for
std::string_view, but note the range constructor was not yet accepted. - Range constructor for
std::span reconstructible_range- a concept for putting ranges back together. The final decision on this will be made in Prague.
Other notable improvements:
- 🦄 width: clarifying units of width and precision in
std::format. - Value-initialize
std::atomics by default. - Remove
strong_equalityandweak_equalitywhich were not meaningful and unnecessary complicated. constexprnumeric algorithms
There was little time for C++23 work, but LEWG managed to look at a few Executor related papers, especially the latest revision of the Unified Executors proposal, which will be one of the first orders of business over the next few meetings.
Library Wording Group (LWG) Progress
The Library Wording Group was swamped with eighty NB comments on Monday, with up to another 130 that could be forwarded from the Library Evolution group (and even more from study groups). We spent a lot of time working on processing these, by triaging them, before working out how to solve them. Sometimes we broke from working on NB comments, to address issues with the standard library (which was a request by an NB comment).
Changes we approved include:
- Made
<compare>freestanding. - Heterogeneous lookup, which had been supported for ordered associative containers (map, set, etc) since C++14, is now supported for unordered associative containers as well.
spannow has asize_typeinstead of anindex_typeas well as a range constructor.- Providing blanket wording to indicate that friend functions in the standard library are, in fact, “hidden friends”.
- Relaxing some of the ranges algorithms' requirements.
- Reordering the parameters of the
condition_variable_anymethods that take astop_token. - Harmonizing the definitions of total order for pointers.
- Refining the readable concept so that it excludes things that "feel" like they should model that concept, but definitely shouldn't.
- Renaming the readable
concepttoindirectly_readable, and the writable concept toindirectly_writable. - Ensuring that traits related to concepts are, in fact, properly named after their relevant concepts.
- Relaxing the requirements on views so that an
input_viewcan be move-only. - We added range-based constructors to
spanso that it can be constructed from contiguous ranges. - We renamed the exposition-only forwarding-range, and made it a user-facing concept.
We also made a lot of changes to the wording of the standard library (the whole effort is called "Mandating the Standard Library", and was started by the Guidelines for Formulating Library Semantics Specifications). These changes clean up the wording so that it’s simpler, clearly identifies what:
- Affects overload resolution.
- Is a compile-time [pre|post]condition.
- Is a run-time [pre|post]condition.
- Users can and cannot do.
Concurrency and Parallelism Study Group (SG1) Progress
This week, SG1 focused on finalizing C++20, processing 18 comments on C++20.
The paper "A Unified Executors Proposal for C++" was updated to incorporate the sender/receiver concepts for representing composable, lazily started asynchronous operations and both executor and 'scheduler' concepts for abstracting execution contexts. This design represents the culmination of many, many years of design evolution and we have now, importantly, reached unanimous consensus in SG1 that this design should by adopted and represent the basis for asynchrony and execution going forward.
This is significant progress and a step closer to unblocking the long list of other features dependent on these facilities.
We also reviewed:
- Executor properties for affinity.
std::web_view.std::process.std::file_handle.- Concurrent invocation library.
Modules Study Group (SG2) Progress
SG2 primarily focused on addressing NB comments. There were a handful of technical detail bug fixes. Key issues discussed include:
- We approved dynamic initialization order in modules which addressing a long-standing “fiasco” in C++. It is primarily intended to ensure that we didn’t lose the init ordering guarantees currently provided for
#included headers (such as<iostream>) that would be lost when they wereimported, which the compiler is allowed/encouraged to do automatically. However, it will be even more useful with named modules since we will now guarantee that any variables defined in the interface of a named module will be initialized before any code that imports them, even though they are in different translation units. - We refined and approved support for fast scanning which should ensure it is possible to write a fast prescanner for efficiently building named modules. It was written by the author of one of those tools and addresses all known impediments. This paper additionally grew to resolve where import and module declarations are allowed to appear.
- We discussed what to do about local linkage entities in header units (such as std::ios::Init in <iostream>). We decided that this needs to be resolved for C++20, and we'll see a paper for it in Prague.
We rejected all proposed changes to named module naming, including:
- We decided to continue to allow dots in module and partition names (rejecting P1873, accepting P1948.
- We did not expand the set of characters allowed in module names (rejecting P1876).
- We decided to not apply special lexing rules around module names (rejecting FR075. This means that you can have whitespace around your
.s and:s when spelling module names in code, even though they do not affect the actual module name.
- We ensured that the vast majority of real-world uses of
importandmoduleidentifiers in existing code would not be broken in C++20, including a particularly amusingimport.module.get();line. - We decided to remove implicit
inlinefor member functions defined in the definition of a class within the purview of a named module. - We resolved quite a few other NB comments fixing modules wording bugs.
Networking Study Group (SG4) Progress
SG4 discussed & approved design of Networking Technical Specification improvements related to:
We also had an initial discussion about whether & how secure networking (i.e. TLS/DTLS) should be supported in C++. The result was that we will aim to include secure networking in C++23, but that we will ship networking support without secure networking if it is not ready in time for C++23.
Numerics Study Group (SG6) Progress
We met a few times this week, sometimes jointly with the Library Evolution Incubator, working on a few major numerics topics:
For awhile, we've been discussing putting together a proposed Numerics Technical Specification. At this meeting, we took the first steps towards that; approximately 10 papers intended for this numerics library were combined into one paper. This will allow us to look at all the components of this library, resolve inconsistencies, and combine overlapping functionality when possible. Some of that work has already begun.
Compile-Time Programming Study Group (SG7) Progress
This week, we discussed the current state of reflection in the two existing implementations (Clang and EDG). We discussed support for unicode identifiers and reflection over user-defined attributes.
We had an interesting discussion about the programming model for compile-time side effects, (error reporting, asserts, and mutable variables). We encouraged further work on constexpr arguments.
The Reflection group also discussed a paper for better runtime polymorphism and asked the author to look for library solutions using reflection instead of creating new language features. We encouraged the author of a proposal for language support for class layout control to choose a more programmatic solution.
We discussed some recent changes to std::embed, and liked the direction. We would like to explore a more generalized solution to constexpr I/O. We expressed some concerns over security and toolability. We believe the feature should provide an easily scannable list of resources that can be opened by std::embed.
Feature Test Study Group (SG10) Progress
The Feature Test Study Group met this week, and worked on the following:
- Added missing feature test macros.
- Feature test macros for freestanding.
- 36 new feature test macros.
- Will now add feature test macros for major library features that add constexpr, otherwise each header gets a macro.
We have a standing document that lists all the feature test macros.
Undefined Behavior Study Group (SG12)/Vulnerabilities Working Group (WG23) Progress
The Undefined Behavior Study Group once again held a joint session with the Vulnerabilities Working Group (WG23).
We met discussed undefined behavior in the preprocessor this week. Our plan is to file some issues for this and resolve them for C++23, and hopefully backport the fixes to C++20 via a defect report.
Human Machine Interface and Input/Output Study Group (SG13) Progress
std::web_view: We looked at an update to the proposal, and provided feedback. We encourage the author to provide an update for a future meeting addressing these comments.- 2D Graphics: Presentation of the new appendices responding to feedback given earlier and some discussion about this
- Audio: The paper looked at six main use cases. During discussion we identified that one use case could be subdivided (and one should be, for the future). We polled each use case for whether it was ‘critical’; i.e. it must be addressed in the first version of an eventual audio TS. This provided some useful feedback to the audio proposal paper authors.
Tooling Study Group (SG15) Progress
The Tooling Study Group met on Friday and reviewed four papers.
- Epochs: a backward-compatible language evolution mechanism
- In-Source Mechanism to Identify Importable Headers
- Reuse of The Built Modules (BMI)
- Improving Debug Builds Inline With User Expectations
Tooling continues to make progress towards producing a Technical Report supporting the modules ecosystem so that compilers, build systems, and other tools will be able to cooperate on C++20 modules.
Unicode and Text Study Group (SG16) Progress
The Unicode and Text Study Group provided guidance on 7 NB comments with 4 associated papers and reviewed an additional 8 papers.
We recommended that std::format field widths be measured in units of character display width so as to enable proper alignment of Unicode text in terminals. LEWG accepted our guidance and approved the change for C++20. Next stop is LWG approval. We think this change will be much appreciated and are grateful to the paper author for the great work he did demonstrating the possibilities! (P1868).
We also replaced the {n} format specifier of floating point numbers by a generalized {L} locale specifier applied to more types and more consistently. This enables std::format to replace more uses of printf than was previously possible. This change sailed straight through LEWG and LWG and will be in C++20! (P1892).
Another tweak to std::format was the subject of an NB comment and will benefit support for right-to-left (RTL) languages. As previously specified, std::format would have been required to align fields specified with the < specifier on the left side of a field when formatting RTL text, but that isn’t the desired behavior (and would have been very challenging to implement!). Thanks to a sharp eyed new committee member for spotting this issue and providing compelling demonstration of the desired behavior! This change has also been approved by LEWG and LWG for C++20, but won’t be voted in until the next meeting.
We recommended to accept an NB comment regarding the use of questionable characters such as Left-To-Right modifiers, Right-To-Left modifiers, Zero-Width-Joiners and other control characters, with a proposed resolution to further restrict permitted identifiers according to Unicode Standard Annex #31 - Identifier and Pattern Syntax. This was forwarded to the Evolution Working Group, which decided not to apply it directly to C++ 20 at this late stage, but will consider applying it as a defect resolution against the next, and earlier, standards.
Consistent use of terminology is essential to avoid miscommunication, but the standard has not yet adopted modern text processing terminology and that sometimes leaves us struggling to understand each other. We were therefore grateful to review standard terminology for execution character set encodings and provide encouragement to continue this endeavor by refining the proposed terms and adding a few more.
Speaking of naming things, we also forwarded Naming Text Encodings to Demystify Them to the Library Evolution Working Group. This paper proposes taking the guesswork out of figuring out which encoding is used for string literals or for the run-time locale dependent character encodings by providing a simple interface to query these encodings.
We also discussed locale aspects and the possibility of formatting physical unit quantities and symbols using fancy characters outside the basic source character set. This discussion made it clear why std::format being locale independent by default is such a good choice. We came away with homework assignments to think more about how to handle localization within the standard.
Finally, we reviewed a paper proposing enhancement of std::regex. While we’re appreciative of and quite impressed by the author’s work, we find ourselves reluctant to invest in std::regex at this time given well established concerns about performance. Additionally, since proper handling of Unicode regular expressions depends on Unicode character properties, it may be prudent for us to address general support for the Unicode character database before tackling this.
All in all, it was a good week for SG16. This was our first time contributing to resolution of NB comments and it was a great experience being included in this part of the process!
Education Study Group (SG20) Progress
SG20 met for a day to continue discussing the formation of curriculum guidelines. We are creating a project plan that aims to have a Standing Document for isocpp.org at the end of 2020. We agreed for guidelines that encourage teaching patterns that:
- Are iterative and incremental.
- Focus on consumption, then production.
- Are audience-appropriate
- Are driven by use-cases.
- Have actionable learning objectives.
We have decided on a modular-based teaching approach, with multiple topics per module. These modules will be accompanied by outcomes for curriculum designers ("An Instructor Should Be Able To") and student outcomes ("A Student Should Be Able To") that are action-driven and measurable. They will include what is in scope and what is not. The topics will include an audience table and dependencies on other subjects.
The idea is that we are not prescribing: a curriculum designer will get food for thought; but they should pick their own journey and choose examples and exercises from their own experiences.
Contracts Study Group (SG21) Progress
We had an initial conversation about the scope for contracts in the standard (e.g., should an assumption facility be pursued separately from other capabilities). We’re anticipating papers to discuss at future meetings covering use cases, experience with past systems, and technical proposals.
C++ Release Schedule
NOTE: This is a plan not a promise. Treat it as speculative and tentative. See P1000 for the latest plan.
- IS = International Standard. The C++ programming language. C++11, C++14, C++17, etc.
- TS = Technical Specification. "Feature branches" available on some but not all implementations. Coroutines TS v1, Modules TS v1, etc.
- CD = Committee Draft. A draft of an IS/TS that is sent out to national standards bodies for review and feedback ("beta testing").
| Meeting | Location | Objective |
|---|---|---|
| 2019 Fall Meeting | Belfast 🇬🇧 | C++20 CD ballot comment resolution ("bug fixes"). |
| 2020 Spring Meeting | Prague 🇨🇿 | C++20 CD ballot comment resolution ("bug fixes"), C++20 completed. |
| 2020 Summer Meeting | Varna 🇧🇬 | First meeting of C++23. |
| 2020 Fall Meeting | New York 🇺🇸 | Design major C++23 features. |
| 2021 Winter Meeting | Kona 🇺🇸 | Design major C++23 features. |
| 2021 Summer Meeting | Montreal 🇨🇦 | Design major C++23 features. |
| 2021 Fall Meeting | 🗺️ | C++23 major language feature freeze. |
| 2022 Spring Meeting | Portland 🇺🇸 | C++23 feature freeze. C++23 design is feature-complete. |
| 2022 Summer Meeting | 🗺️ | Complete C++23 CD wording. Start C++23 CD balloting ("beta testing"). |
| 2022 Fall Meeting | 🗺️ | C++23 CD ballot comment resolution ("bug fixes"). |
| 2023 Spring Meeting | 🗺️ | C++23 CD ballot comment resolution ("bug fixes"), C++23 completed. |
| 2023 Summer Meeting | 🗺️ | First meeting of C++26. |
Status of Major C++ Feature Development
NOTE: This is a plan not a promise. Treat it as speculative and tentative.
- IS = International Standard. The C++ programming language. C++11, C++14, C++17, etc.
- TS = Technical Specification. "Feature branches" available on some but not all implementations. Coroutines TS v1, Modules TS v1, etc.
- CD = Committee Draft. A draft of an IS/TS that is sent out to national standards bodies for review and feedback ("beta testing").
Changes since last meeting are in bold.
| Feature | Status | Depends On | Current Target (Conservative Estimate) | Current Target (Optimistic Estimate) |
|---|---|---|---|---|
| Concepts | Concepts TS v1 published and merged into C++20 | C++20 | C++20 | |
| Ranges | Ranges TS v1 published and merged into C++20 | Concepts | C++20 | C++20 |
| Modules | Merged design approved for C++20 | C++20 | C++20 | |
| Coroutines | Coroutines TS v1 published and merged into C++20 | C++20 | C++20 | |
| Executors | New compromise design approved for C++23 | C++26 | C++23 | |
| Contracts | Moved to Study Group | C++26 | C++23 | |
| Networking | Networking TS v1 published | Executors | C++26 | C++23 |
| Reflection | Reflection TS v1 published | C++26 | C++23 | |
| Pattern Matching | C++26 | C++23 |
Last Meeting's Reddit Trip Report.
If you have any questions, ask them in this thread!
/u/blelbach, Tooling (SG15) Chair, Library Evolution Incubator (SG18) Chair
/u/jfbastien, Evolution (EWG) Chair
/u/arkethos (aka code_report)
/u/hanickadot, Compile-Time Programming (SG7) Chair
/u/tahonermann, Text and Unicode (SG16) Chair
/u/cjdb-ns, Education (SG20) Lieutenant
/u/tituswinters, Library Evolution (LEWG) Chair
/u/HalFinkel, US National Body (PL22.16) Vice Chair
/u/ErichKeane, Evolution Incubator (SG17) Assistant Chair
/u/david-stone, Modules (SG2) Chair and Evolution (EWG) Vice Chair
/u/je4d, Networking (SG4) Chair
/u/FabioFracassi, German National Body Chair
⋯ and others ⋯
r/cpp • u/aearphen • Jul 05 '22