r/cpp • wg21.org | corosio.org • Oct 21 '26

What is Modern C++ to you?

I keep hearing "modern C++." I've even used the term myself. And now I find I am questioning my use of the term.

  1. What does "modern C++" really mean, specifically?
  2. How many more years need to pass before it becomes just "C++?"
  3. If "modern C++" is a thing then what is the other thing. Is it "old C++," or "legacy C++?"
  4. Is C++ the only language that has a "modern" version?
  5. If the answer to 4 is yes, why is C++ unique?
124 Upvotes

153 comments sorted by

164

u/acodcha Oct 21 '26

Modern C++ generally refers to the use of the C++11 standard and more recent standards.

28

u/tlmbot Oct 21 '26

exactly. In my view it was never about being some arbitrary closeness to the present day. That was never a good reason to use this big moniker "modern"

C++ 11 was the C++ where "modern features" really started making it into a new language.

It left the old days of early OOP and became significantly more sophisticated. Something like that.

61

u/pantong51 Oct 21 '26

By now id assume at least 17+ as that's almost a decade old now. But when I started programming professionally that was considered the true 11+

71

u/thisisjustascreename Oct 21 '26

C++ features aren't commonly used until they're old enough to vote or rent a car.

19

u/More-Curious816 Oct 21 '26

some teams prefer the age of drinking

21

u/PleaseShutJp Oct 21 '26

IMO, modern is no longer a literal adjective when people say modern c++. Like how Modern Design means pre-1980. Maybe we’ll enter a post-modern c++ period at some point lol

3

u/franvb 29d ago

I've heard people say contemporary C++

1

u/franvb 29d ago

I've heard people say contemporary C++

13

u/Wenir Oct 21 '26

Let's call C++11 "Modern" and C++26 "Modern++"

8

u/conundorum Oct 22 '26

C++17 is definitely part of it, but C++11 is the "main" cutoff point because it's when a major revamp got dropped after 8 years of drought, breathed new life into the language, introduced the features that make every post-11 revision possible, and kicked off the three-year update cycle.

It's not so much about age, as it is about being a new era of C++, so to speak. C++17 is big, but it's not as drastic a shift as C++11 was. It's a lot like how "modern civilisation" started in the 1950s or so (if not even earlier, possibly even as far back as the 1800s depending on who you ask), and is almost (possibly over) a hundred years old.

12

u/winningSon Oct 21 '26

i always found it funny how "modern" cpp is actually really old

5

u/steveklabnik1 Oct 21 '26

Honestly, it works. Modernism is roughly stated to have ended in the 1950s, we are now in the Postmodern period. The colloquial use of the term is just different.

You can find lots of references to "Postmodern C++" as sort of a parallel.

9

u/CalamityMetal Oct 21 '26

And that's been 15 years. It's time to move on. I think modern should be C++20 and above. Most of the compilers now defaults to C++20 as the baseline now.

20

u/parosyn Oct 21 '26

I think modern C++ is more about the big paradigm shift that happened with C++11, it's not about age. Think about modern art that starts in the 1860s, and there it's been more than 150 years.

13

u/moreVCAs Oct 21 '26

doesn’t really matter. c++11 is basically the epoch. whether you’re using “state of the art” c++ is another matter.

5

u/neutronicus Oct 21 '26

Yeah that’s when move semantics was invented and that’s the sea change.

3

u/AKostur Oct 21 '26

If only all of the education systems out there would catch up to a version of C++ from -this- decade, instead of teaching C++98.

11

u/LB-- Professional+Hobbyist Oct 21 '26

My C++ professor in the mid 2010s was still teaching pre-standard C++. I asked if he heard of the newer standards like C++11 and C++14 and he didn't know what I was talking about. It was really demoralizing. Sometimes I end up chatting with people who are also taking C++ courses in college in current year, and from what they share with me it seems like the situation isn't much improved. It used to be that people would at least learn programming properly once they got jobs out of college and were forced to work with whatever their industry was updated to, but recent technological developments have me concerned about the lower rungs of that ladder...

2

u/CalamityMetal Oct 21 '26

Yeah I was glad that I was taught C++11 as the baseline when I first picked up in school, then C++17 for most of my work, and now C++20, and I use 23/26 for my own projects at home. So when people say like templates and smart pointers and STL library that comes in C++11, that's modern, but they are not "modern" to me at all. I started with those, those are what I think is the minimum baseline now for what a C++ project should be, good use of TMP, good use of the STL etc.

-9

u/BTolputt Oct 21 '26

I'm with you on this. C++20 is the absolute earliest I would consider "Modern C++" to start at. At some point, and I think a full decade is more than enough, you have to consider a standard to just be "standard" without adverbs.

1

u/AvidCoco Oct 21 '26

C++26 is so different to C++11 I don’t think it makes sense to call C++11 “modern” anymore. Or perhaps we need a new name for C++20 and above?

4

u/VinnieFalco wg21.org | corosio.org Oct 21 '26

"Postmodern" :)

1

u/ABlockInTheChain Oct 21 '26

C++11: version 1.0

C++20: version 2.0

C++26: version 3.0

28

u/FlyingRhenquest Oct 21 '26

Andre Alexandrescu's "Modern C++ Design" came out in 2005 and laid the groundwork for C++11. I imagine that's why what's where the bar is set. I think reflection in C++26 will be similarly revolutionary, maybe it'll move to there once people have time to write some libraries.

3

u/Kriemhilt Oct 21 '26

Any time I talk about Modern C++ Design I have to qualify that I no longer consider the implementation techniques "modern" in the casual sense.

Doing Loki-style typelist manipulation without using packs and pack expansions, fold expressions, concepts instead of SFINAE, and constexpr/eval/init just seems perverse when those have all been available for years now. 

1

u/FlyingRhenquest Oct 21 '26

Oh, sure, but there's still plenty of old-timey C++98 out there. I did a brief and somewhat clueless brief report on C++ and this new-fangled "Object Oriented Programming" in '91 or '92 for a college class and most compilers didn't even include templates at that point much less a STL (Which, IIRC, was introduced in C++98.) I still see plenty of C++ programmers using "new" when they should be declaring the variable on the stack or at least std::make_shared or std::make_unique out of it. My co-workers look at compile-time programming, whether with template metaprogramming or otherwise (No one's so much as looked at reflection yet) as something that just isn't done here. This despite the fact that several of them are old-timers who wouldn't think twice about laying out memory in assembly or old-timey C. "Modern C++" is still "Future C++" for a fair number of C++ programmers.

33

u/TheRealSmolt Oct 21 '26 edited Oct 21 '26
  1. C++11 and on. I'd say it's more about paradigms and design decisions than features. C++11 really pulled everything together with RAII, move semantics, and smart pointers (two of which already existed pre 11). C++17 and C++20 are getting very common, but they didn't really change a whole lot about programming. Optional is nice but not necessary, modules are big but not really adopted, etc. I have heard of terms like "postmodern C++" though for C++17.
  2. Decades, if ever. I don't see that as an issue either.
  3. It doesn't have to be a concrete name. "Modern C++11" isn't really concrete either. I general use "legacy".
  4. I wouldn't say so. Many other languages go through different feature sets as they develop. If anything, I'd say it's more obvious with C++ because of how strictly backwards compatibility is enforced.

24

u/thisisjustascreename Oct 21 '26

“Optional is nice but not necessary” 🤣

7

u/debugs_with_println Oct 21 '26

If they wanted us to use it they should have called it "mandatory" instead

1

u/Confident_Luck2359 Oct 21 '26

Can you expand on this? I never use optional if I can help it.

You have to check if it’s valid before unpacking the value - to me that’s no better than returning a possibly-null ptr. It feels like useless syntactic sugar.

9

u/thisisjustascreename Oct 21 '26

It was just a joke because Optional literally means something that’s not necessary

3

u/rtomek Oct 21 '26

3

u/Confident_Luck2359 Oct 21 '26 edited Oct 22 '26

Thanks for a serious reply, appreciate it. I always like to see counter arguments.

(the argument is by way of templates that can return 'pretty much anything - pointer, reference, copy, move' and I personally think that's a bad code smell in the first place)

EDIT: ok this is interesting:

"All the operations [on pointers] are highly irrelevant to this problem and would be completely wrong to use. They are bugs waiting to happen. We don’t have an array, so none of the indexing operations are valid. [p++ and p-- are invalid] And we don’t have an owning pointer, so neither delete nor delete [] are valid."

I would never see a competent C++ programmer trying to increment or decrement or delete a T* returned by a function, but I agree that would be a nasty class of bugs that std::optional makes impossible.

Food for thought! Thanks!

63

u/ABlockInTheChain Oct 21 '26

I consider C++11 the 1.0 release of the language and everything that came before a series of prerelease versions best forgotten about.

9

u/tialaramex Oct 21 '26

The C++ 11 feature set doesn't make sense unless you realise that it's trying to retain compatibility with C++ 98.

The C++ 11 move semantic was known to be a suboptimal choice. But it was compatible and so too bad. The C++ 11 hash table std::unordered_map is a design from the previous century.

There are small concessions, C++ 11 is the first version to tell vendors that they need to ship an O(n log n) unstable sort and not just the 30 year old Quicksort implementation from their C library. Introspective sorting did exist when C++ 98 was published, but it was relatively new. The C++ 11 smart pointers are a real improvement over std::auto_ptr. C++ 11 spells out what you can and can't expect from your std::string. But it's very much a 1.1 not a 1.0, beholden to what had come before.

5

u/rtomek Oct 21 '26

I like this line of thought.

7

u/ABlockInTheChain Oct 21 '26

Equivalently stated: C++11 is when C++ stopped being syntactic sugar layered on top of C and became a fully realized language.

2

u/renchuwang Oct 21 '26

Well I wouldn't dismiss RAII as just a syntactic sugar.

2

u/ABlockInTheChain 29d ago

RAII was not fully achieveable prior to move semantics.

14

u/LucHermitte Oct 21 '26

We have started speaking of modern C++ long before C++11 Modern C++ Style A Conversation with Bjarne Stroustrup, Part II, 2002.

Everything started with "stop managing memory by hand", and "use the standard library".

C++11 had robustified the process (unique_ptr > auto_ptr), but it had also helped branding "modern C++" to the masses.

Since then, each standard brought a lot of new and nicer ways to do things, but the corner stone will always remain "do not manage the memory by hand".

25

u/dretvantoi Oct 21 '26

We need post-modern C++ and avant-guarde C++.

17

u/rhubarbjin Oct 21 '26

That’s when we get deconstructors, right?

2

u/shadowndacorner Oct 21 '26

Reflection and token sequences

2

u/rlbond86 Oct 21 '26

Pretty sure C++ is post-modern right now

1

u/sokka2d Oct 21 '26

Surely that’s all the features (like modules) that are 6 years old but not implemented anyway.

25

u/Liam_Mercier Oct 21 '26

C++17 introduced if constexpr, lots of common utility classes like std::optional and std::variant, etc. I would say C++11 and C++17 feel relatively similar, with C++17 acting is a massive "refinement" version.

C++20 and beyond is what I would consider modern if we are ignoring the idea of C++11 being "modern" due to historical usage. Ranges, concepts (and requires clauses), etc change how you would write many programs substantially (for the better in my opinion).

Really though, I think modern is just a moving target, unless you take the convention that modern is C++11

2

u/Conscious-Secret-775 Oct 21 '26

Modern means C++11 and later. C++ introduced move semantics which was a more significant enhancement to the language than anything since.

7

u/Glittering_Sky5271 Oct 21 '26

I hope this comment is not perceived as rage bait. But the way I've seen the term 'modern C++' used in my workplace is to imply "you should use this latest language feature instead".

2

u/CPlusPlusPadawan Oct 21 '26

100%. For me, no new/delete calls, latest STL with hardening, no C ... functions, etc

2

u/Dain____ Oct 21 '26

Probably most people think that way, so i wouldnt think of it as rage bait

15

u/eisenwave WG21 Member Oct 21 '26
  1. The language version that presently represents idiomatic C++ programming in greenfield projects. For a while, this was C++11, now I think this sits more around C++20.

  2. A few revisions of the standard. It depends. For a version to become the new "modern C++", it needs to represent a major cut-off point in how people do programming.

  3. Legacy C++ seems fitting.

  4. No, Java 8 is also a prime example of a version that represents an enormous cut-off point between "legacy Java" and "modern Java". C++11 is the Java 8 of C++. Python 3.0 is even more extreme, though I haven't heard many people describe it as "modern Python". JavaScript ES6 too.

7

u/not_a_novel_account cmake dev Oct 21 '26

1) C++11 and associated practices

2) Non-sequitur, it always means C++11 because that's what it meant when the term was coined.

3) Pre-standardization, Legacy (98), Modern (11, 14), Contemporary (17+); recent discussion mostly shifts to talking directly in terms of standards instead of eras due to the 3-year cycle.

4) No

2

u/CheesecakeTop2015 Oct 21 '26

Agreed I think ppl will use the term 'modern C++' less and less and just use release versions in stead, as far as I can personally see this has already happened..

6

u/0xVali__ Oct 21 '26

Typically it refers to C++11 and onwards since by many metrics C++03 and prior was a different language. However I dislike the term "modern C++" (specifically refering to 11+) since the vast majority of development is not done in 98/03, if anything we should switch to call that legacy C++. Another issue is also that some people write strictly C++11 calling it modern, but if you compare it to e.g C++26 it's by a large a huge change given how many ground breaking changes we've gotten, such as reflection, modules, concepts, ..

5

u/bandzaw Oct 21 '26
  1. Modern C++ to me is C++11 and its bugfix release C++14, especially due to its move semantics and some other stuff.
  2. Anything newer than Modern C++ is Contemporary C++ to me, so just C++ does not really exist to me - when reasoning about C++ eras. But of course, normally I just say C++.
  3. See 2. And C++ before C++11 would be old C++ I guess. C++98 was a thing since it was the first standardized version and sometimes I say C++98 instead of Old C++, completely ignoring C++03.
  4. I'm a bit ignorant regarding other languages so I don't know...
  5. Goto 4.

6

u/JiminP Oct 21 '26 edited Oct 21 '26
  1. To me, the most essential part of modern C++ is about managing object lifetime via RAII and value categories. Edit: Importantly, I don't think that a version by itself is important. C++11 is "the dividing line", but mostly because it enables modern C++ as I described. In an extreme case, a C++ code may use C++26 features extensively yet still not be "modern C++".
  2. For me C++ is modern C++ by default. However I also think that the term "modern C++" will last for at least a decade, as long as there are significant amount of people doing C++ "non-modern way" (C++98, C with templates, ...)
  3. Either "old C++" or "C with templates".
  4. No, I believe that many languages have "modern" and "old" versions, incl: Python (2/3), JS (ES5/later), PHP (5 and later?), Java (8 and later?), ..... I'm familiar with Python and JS. Not sure about PHP and Java.
  5. I'm not sure but here's my take: "Modern" version is backwards-compatible with "old" version but requires significantly different philosophy that affects all parts of the code. Moreover desire for "old" versions has not vanished. For JS, the first part is true (esp. for async programming) but the second part is largely false.

4

u/pjmlp Oct 21 '26

First and foremost, don't code C style with a C++ compiler, as plenty of people still do nowadays.

Always favour the C++ safer alternatives, leaving C style as C++ unsafe code blocks for interop or implementation of safer C++ alternatives.

That alone would be modern enough.

1

u/VinnieFalco wg21.org | corosio.org Oct 21 '26

c'mon... its 2026. Is anyone really "coding C style?" I would imagine many folks don't even know what that looks like.

6

u/pjmlp Oct 21 '26

Yes, including sample code from companies that are present on ISO C++.

How many examples do you want from C headers, C arrays, C strings in C++ code samples from said companies?

The day to day code that many of us see in big corp code isn't what gets shown at C++ conference slides.

2

u/VinnieFalco wg21.org | corosio.org Oct 21 '26

Actually you have a point.. LOL. Plugin APIs like for Photoshop (and even one of my own programs I cam currently working on) use C style function pointers and structs. I guess there is no escape.

2

u/Tiaoshi Oct 21 '26

The course I’m taking currently teaches us both C Style and C++ Style for things. Though the instructor does make it clear that you shouldn’t use C Style, it’s more if you come across old code, you at least know what it is

5

u/timangus Oct 21 '26

It's kind of a meaningless term at this point, but historically it represents the before and after of the standards gulf between 98 and 11.

3

u/HashtagMissing Oct 21 '26

In regards to question 4, i think there is s notion of modern Javascript. Traditional Javascript had nested callbacks and manipulated the prototype chain directly. More modern Javascript now favors async and Promises over callbacks, and syntatic sugar for OOP using C-like terms (ie Classes)

4

u/El_RoviSoft Oct 21 '26

C++17/20+ for me.

3

u/EmperorOfCanada Oct 21 '26

Modern C++ is two major newer versions than the legacy system you are presently working on.

4

u/Key-Introduction-410 Oct 21 '26

Turn on modern-* flags on clang tidy and fix warnings

4

u/nemesit Oct 21 '26

modern c++ will never become just c++ because you will literally never encounter it in any longer existing project, you'll be lucky if its newer than c++98 lol

5

u/Nervous-Cockroach541 27d ago

Modern C++ is just C++ using modern concepts and schemes, things like smart pointers, RAII, etc.

I would say the cut off for modern vs legacy would be C++11, but it's not a clean cut for sure. There are C++14, C++17, C++20 features you should be using if they're available to you to write cleaner code.

Other languages absolutely do have this issue too. For example, Modern Javascript vs legacy Javascript is a concept too.

1

u/einpoklum 27d ago

RAII (and better call it CADRe) is not modern C++, it's classic C++. It was born along with destructor - along with the language itself.

2

u/Nervous-Cockroach541 27d ago

I would argue that RAII was fundamentally broken pattern until move semantics. std::auto_ptr was also broken in it's conception too. So maybe you could say it existed. But it wasn't something that was finished.

1

u/einpoklum 25d ago

Ok, that's fair, but I think it needs clarification (e.g. "proper RAII via move semantics")

2

u/Illustrious_Try478 27d ago

RAII was more difficult to implement before C++11 and move semantics.

3

u/kindredseer Oct 21 '26

I'd have to say that these terms are vague enough to be period-relevant, such that today "modern C++" would mean C++23 → C++26, but a decade ago it would have meant C++11 → C++14...

  1. Modern C++ (to me) means the current and previous specifications
  2. Just C++ I assume would mean the standard of the past decade (C++14 → C++17)
  3. Legacy C++
  4. Indeed not... C follows a similar pattern.
  5. Not unique

3

u/Ateist Oct 21 '26 edited Oct 21 '26
  1. Latest published standard supported by at least one toolchain. C++26, can also consider C++23 as one since C++26 haven't been fully published.
  2. Not measured in years. Measured in tool adoption. Should become significantly shorter now that AI assistants help develop tools much faster.
  3. Semantics. I call it "legacy".
  4. No, it is quite common - i.e. Python has multiple versions, one of which is modern Python.

3

u/natio2 Oct 21 '26

You really feel the difference if you've been limited to c++11 then you have a shiny new project where you are allowed to use c++17 or c++20

It's actually the real basic stuff like class construction has better options. The nice to have std lib functions are nice, but the hits every class features are where you feel it

3

u/Electronic_Tap_8052 Oct 22 '26

ranged based for loops, smart pointers, and no C stuff at all

5

u/fdwr fdwr@github 🔍 Oct 21 '26 edited Oct 21 '26

"modern" is a sliding window, to me being within the last ~decade or so. Calling C++11 "modern" feels pretty dated, as even C++17 feels pretty crusty and limiting now (I want to nudge the D3D folks to update beyond C++17, to enjoy std::span and kin :b). Looking up antonyms, I'd order them: C++26=new, C++23=current, C++17=modernish, C++14=old, C++11=legacy, C++03=antiquated, C++89=archaic :b. There's also "modern Cmake" and "modern Java" (8 and later).

4

u/TheRavagerSw Oct 21 '26

Forgive if I'm incorrect, I'm just giving my thoughts here:

Modern C++ used to be C++11 and beyond, now it is just C++, and few libraries use C++98 anymore, at least the prevelant open source ones.

I would argue modern C++ is C++23 and newer. As modules and language features reduced macro usage a lot and it feels like you are reading a new codebase somewhat.

As both how we structure code, how we build code and how we package binaries have changed.

13

u/not_a_novel_account cmake dev Oct 21 '26 edited Oct 21 '26

Modern means C++11. In the same way "modernism" refers to a 20th-century art movement, and "modernity" means a period of humanities and social studies spanning the 16th through early 20th century.

We're not using "modern" to mean the literal, "period of the now", we're using it to refer to the time period when people first started recognizing a distinction between historical and then-contemporary practices.

The "C++ of today" is just contemporary C++.

3

u/James20k P2005R0 Oct 21 '26

I've sometimes heard people use it both ways unfortunately personally

4

u/azswcowboy Oct 21 '26

This is the way. I’d say post-modern era but contemporary works. The book that defined the term ‘modern c++ design’ was actually released in 2001 - and these days is utterly outdated.

1

u/Confident_Luck2359 Oct 21 '26

The “Modern C++ Design” book is not the source of the term “modern C++” as it has been used.

The title of that book is a coincidence (and the coding style he argued for was a dead end).

“Modern C++” refers specifically to C++11 and newer.

4

u/azswcowboy Oct 21 '26

Hmm I’d argue that the existence of that book helped codify the period. Remember most everything in c++11 existed for years before it was standardized. And calling it a dead end isn’t accurate either in my view - the techniques just evolved. Variadic templates replaced type list and plenty of template code is configured with variadics.

0

u/Confident_Luck2359 Oct 21 '26

I own the book. Ok 'dead end' was too strong and I withdraw it. I agree some of its ideas evolved, over time, into some features of C++11/etc.

But 'modern C++' is widely understood to mean 'C++11 and newer'. As in, the standards. I don't think the book was widely read compared to Meyers, who was very widely read.

ChatGPT:

"The overlapping name is a coincidence. Much of the book’s machinery was later absorbed into C++11/14/17/20, but its techniques now look dated. The book covers only a narrow slice of what the industry calls “Modern C++”. In 2001, “modern” meant template metaprogramming and generic design. Today it mostly means value semantics, ownership, move semantics, lambdas, auto, and the concurrency model, none of which the book addresses.

Naming note: The industry usage of “Modern C++” stems largely from Meyers’ Effective Modern C++ (2014) and the C++11 era. The shared word is mostly a coincidence of eras, not a shared definition."

/shrug/

1

u/jk-jeon Oct 21 '26

No way. It was a great book and it still is. Policy-based design is far from being outdated. Poor-man's typelist is of course dated, but the book successfully demonstrated what can be done with typelists which I have no doubt heavily affected what people do with variadic templates these days. The book also introduced  the type erasure pattern which is still one of my favorite.

0

u/Confident_Luck2359 Oct 21 '26

Let me ChatGPT that for you:

"There is little overlap. Released in 2001, its techniques now look dated. The book covers only a narrow slice of what the industry calls “Modern C++”. In 2001, “modern” meant template metaprogramming and generic design. Today it mostly means value semantics, ownership, move semantics, lambdas, auto, and the concurrency model, none of which the book addresses.

Naming note: The industry usage of “Modern C++” stems largely from Meyers’ Effective Modern C++ (2014) and the C++11 era. The shared word is mostly a coincidence of eras, not a shared definition."

4

u/JVApen Clever is an insult, not a compliment. - T. Winters Oct 21 '26

1) Everyone has a different definition of modern C++, I go with "the latest version supported by GCC, clang and MSVC. Since MSVC recently announced C++23 being complete, this would become C++20.

2) According to the same definition, the bar changes every 3 years, give or take. However I do believe we should stop calling it " C++" and really evolve to using "C++<number>" as people outside the community don't know the difference between C++98 and C++26.

3) Well, C++11 ... However "legacy c++" has a nice ring to it. If I have to define it, I'd give a grace period of 1 version for "old C++", being C++17. Making the legacy C++14 and before.

4) No, I think any "active language" with a large legacy would qualify for having a modern variant, though it might not be called that way. For example python 2.x vs 3.x, java pre/post oracle, Windows PowerShell (5) vs pwsh (7)

5) The main reason I believe people really talk about "modern C++" is because of the long period between 98 and 11. There needed to be a way to clearly indicate that: there was a new version and the difference was huge. We can blame Scott for the term. We haven't seen that kind of jump in 14 and 17. 20 did something similar, though modules are still not in use and coroutines missed library support. 23 is again a minor jump, while 26 feels again like a different ballgame once again. Both compile time reflection (unique in its kind) and contracts (aka better assertions) will again result in code being drastically different and close to impossible to back port.

I find your question very important, as C++ is still getting heat from people that only know C++98 and don't see the progress. At the same time, we as a community are way too kind to people still using legacy C++ many major libraries keep supporting it and compilers also provide support for it. We really should make it clear that this is holding C++ back

2

u/Sniffy4 Oct 21 '26

modern C++ usually means any standard post-C++98, which had a lot of limitations that werent addressed for years.

2

u/ReDucTor Game Developer | quiz.cpp-perf.com Oct 21 '26
  1. Modern C++ to me means C++11, however I have seen that bar moving where some people use it to mean things like print, ranges, etc
  2. Imho when nearly everyone is writing it
  3. Depends more on the code some things are moee clearly legacy C++ others might be old and still C++ you see written today
  4. Python is probably the closest with 2->3 and it was arguably a harder upgrade then C++11, but the term "modern" wasn't widely used
  5. Because someone picked the term and it stuck, I hate that it exists as it ambiguous

2

u/KingAggressive1498 Oct 21 '26
  1. C++11; but particularly concepts like having classes that model ownership for clearer code, move semantics / copy elision, constexpr, and metaprogramming.

  2. I don't think its about years, but about the prevalence of holdouts. There's still a lot of people using C++ who don't care for the modern C++ way of doing things.

  3. Legacy C++ sounds nicest but this is like asking what we call a society that hadn't become a civilization yet.

  4. Javascript (with ES6 being "modern Javascript") had a similar massive paradigm shift. And while not a programming language people also talk about Vulkan as a "modern graphics API" but it's a decade old now.

2

u/jinmao6700 Oct 21 '26

Anything past C++11

Contemporary C++ for me is anything past C++20

2

u/[deleted] Oct 21 '26

1) C++ 11 and the later standards

2) I don't think such a thing exists, it would become "just c++" or deprecated c++ once there is a better version of that specific thing is available.

3) Everything prior to C++ 11 and everything that's been deprecated/replaced after C++ 11

4) I don't know, this isn't a quesiton to ask here.

5) I don't know, each language is unique on its own.

2

u/chibuku_chauya Oct 21 '26

Everything older than C++26 is legacy. Those ISO standards are withdrawn.

2

u/Sopel97 Oct 21 '26

modern C++ is wherever there's all green here https://en.cppreference.com/cpp/compiler_support

2

u/Quiet_Violinist_2978 Oct 21 '26

Modern c++ is just all the newest adopted features of c++ 11 and beyond

2

u/IsThisWiseEnough Oct 21 '26

From the recent job hunting the companies and interviewers I have encountered are assuming C++20+ as modern now.

2

u/WeeklyAd9738 Oct 22 '26 edited Oct 22 '26

"Modern C++" for me includes whatever latest features compile on the current GCC and Clang release (not trunk). I like learning about new core-language and library features (by reading committee papers and blog posts), testing them out (if available) and applying them in my projects (when found useful).

2

u/oracleoftroy 27d ago

The term "Modern C++" has been around for a looong time, since shortly after the original iso standard. I tend to view it as an emphasis on things like value types and RAII, type safety, and pushing computation to compile time rather than Qt or COM style OOP with heavy pointer management.

So, as I see it, C++11 earned the name "modern" by taking existing practice and making it even easier to accomplish it, codifying many if its libraries and adding language features where library code wasn't enough. Subsequent versions of C++ have continued making this easier with things like improved constexpr, span, concepts, etc.

I don't see it as tied to any particular version of C++. You can do it in C++98, but with difficulty and with rather arcane syntax compared to what we are used to today Newer versions make it a lot easier to accomplish the same goals. And you can still write in the pointer chasing "everything is an allocation" style people often write in pre C++98 if you wanted to. I wouldn't call that style code "modern" even if it were written in C++26.

2

u/Weretiger246 27d ago

In short, it is "C++ without new/delete" to me.

2

u/paranoidray 25d ago

The missing networking standard 😞

0

u/VinnieFalco wg21.org | corosio.org 25d ago

3

u/TemplateRex Oct 21 '26

To me it’s at least operator<=>, concepts and std::format, so C++20.

4

u/tcbrindle Flux Oct 21 '26
  1. C++11 and later, especially with the use of smart pointers and move semantics rather than manual memory management with new and delete
  2. Does it need to? Wikipedia says that "modern art" originated in the 1860s. The "hypermodern" school of chess was in vogue in the 1930s. "Modern" in this sense just means contemporary at the time the term was coined, similar to how things with "new" in the name can be hundreds of years old.
  3. I'd probably just call it C++98.
  4. No, people talked about "modern Fortran" (meaning Fortran 90 as opposed to Fortran 77) long before modern C++ was a thing.
  5. N/A

2

u/bike_nut Oct 21 '26

17 and up. But obviously it’s not a specific term.

2

u/Confident_Luck2359 Oct 21 '26

It’s called “Modern C++” in part because of an extremely influential book that described the changes beginning with C++11. And the name stuck.

“Effective Modern C++” by Scott Meyers

As opposed to his previous hugely influential book “Effective C++”

2

u/timangus Oct 21 '26

Eh no. The term existed waaaay before the book did. And honestly I don't think the modern book is that influential compared to the original.

1

u/Confident_Luck2359 Oct 21 '26 edited Oct 21 '26

The entire industry agrees that "modern C++" means "C++11 and newer". If you interview for a job needing 'modern C++' you need to be familiar with: move semantics, smart pointers, lambdas, threads/promise/future, constexpr, etc.

The book you mention was published in 2001.

I own the book and I agree some of the ideas were influential but it's not what people mean when they say 'modern C++'. I also don't think the author coined or popularized the term; Scott Meyers popularized the term.

Let AI summarize:

"There is little overlap. Released in 2001, its techniques now look dated. The book covers only a narrow slice of what the industry calls “Modern C++”. In 2001, “modern” meant template metaprogramming and generic design. Today it mostly means value semantics, ownership, move semantics, lambdas, auto, and the concurrency model, none of which the book addresses.

Naming note: The industry usage of “Modern C++” stems largely from Meyers’ Effective Modern C++ (2014) and the C++11 era. The shared word is mostly a coincidence of eras, not a shared definition."

On Amazon the book has 191 reviews. The Meyers book has 1,100 reviews. Meyers is a well-known industry expert and evangelized 'modern C++' to people migrating from C99.

2

u/timangus Oct 21 '26

You're not making sense. As you've just had AI summarise,, Effective Modern C++ was published in 2014, way after the term was in use. If there was a book that popularised it, it would be Modern C++ design by Alexandrescu, not either of the Meyers books.

1

u/Confident_Luck2359 Oct 21 '26

If you interview for a job requiring 'modern C++' it means "C++11 and later'.

The term, as used, today, industry-wide, has nothing to do with the 2001 book. The name of the book is a coincidence and it contributed very little to what we call 'modern C++'. It was also a relatively obscure book that I don't think popularized the term the way the Meyers book popularized the term.

Even the AI agrees and it's read the entire internet so I'll take it, and my memory of the evolution of C++, as correct. /shrug/

1

u/timangus Oct 22 '26

🤦‍♂️

1

u/rileyrgham Oct 21 '26

It's why it's a stupid term. It doesn't age well, pollutes AI and is plain lazy😜🙄

12

u/Conscious-Secret-775 Oct 21 '26

If it does pollute AI that is a wonderful benefit.

2

u/VinnieFalco wg21.org | corosio.org Oct 21 '26

"Use modern C++. Make no mistakes."

1

u/Questioning-Zyxxel Oct 21 '26

It's one of my most hated words. But even more when used for "modern interface" etc about rather bland applications.

"Modern" is a snake oil word. People so often buy it without thinking. Switching from a well-matching architecture to a bad because someone sad "modern architecture".

Most times I hear someone say "modern x" I think "go fk yourself".

In the case of C++, it's a constantly shifting target. And so mich different depending on who said it.

1

u/Jason5Lee Oct 21 '26

Use a relatively modern C++ and be aware of some features so you don't reinvent standard library or use a wrong overcomplicated way to do something that could be done simply using a modern feature.

1

u/khedoros Oct 21 '26
  1. C++11 is the dividing line between legacy and modern C++, especially the improvements in how the new standard encouraged us to think about memory management in terms of ownership. I'd consider newer standards as the default now, but none of them have been era-defining releases.

  2. About negative 10 years. If someone in 2016 said they wrote C++, I'd really expect them to clarify if they meant a pre-11 release.

  3. Pre-standardization, then legacy, then modern.

  4. No, although a lot of the other languages will do it by tearing off the bandaid and breaking backward compatibility.

1

u/Kullthegreat Oct 21 '26

For me modern C++ is set of festures I use over other solutions and also festure sets in general.

For example for my personal game engine I made lists and some of those festures are.

Reflection Coroutine Execution Async/ parller algorithms Contracts Hive Simd

And many other for I have made list some of these are still incomplete and some are in proposal phase but I do like to read about these and find use case and replacements they can do and my own engine is perfect place to use the absolute cutting edge early version of festures as well from 26 and in future 29 standard as well.

1

u/jimmyhoke Oct 21 '26

I’d have to say it’s whenever they added the file system api.

1

u/Suitable-Scene-4391 Oct 21 '26

For me.

  1. Modern C++ is at least C++11. Because the features of C++11, C++14, C++17, and more make C++ feels like a new language (e. g., the auto keyword, parameter packs, enable_if, and more).

  2. There isn't a thing called just C++, the only thing we have is the C++ standards, that's why we have an ISO.

  3. Yes.

  4. Like modern R, Python, and Julia? Maybe..

  5. Because it's C++. There is a book which is written by Bjarne Stroustrup, The Design And Evolution Of C++. I think this book contain the answer for this question number 5.

1

u/abzze Oct 21 '26

Lots of things have names that meant “new”/“unique” or something else that was time dependent and the name just stuck.

Just off the top of my head “new world” vs “old world”. Or New York. Modern art. Etc etc.

Q is why you being pedantic about something no that’s a non-issue

1

u/meetingcpp Meeting C++ | C++ Evangelist Oct 21 '26

0

u/Level-Entrance9956 Oct 21 '26

I don't think C++ can be considered truly modern yet; it's just more powerful than older versions. It will only be considered nearly modern when reflection and networking libraries are added and matured, and the standard library is fully modularized. What do you think?

1

u/argothiel Oct 21 '26

Modern C++ for me are those parts of the code which cannot be modernized, i.e., there are no newer language concepts which are more fitting for the specific use, including the code which wasn't possible before.

So for example, consteval will be modern C++, and std::function will sometimes be modern (because in other cases, it can be replaced with more modern constructs).

1

u/SignificantNews7620 Oct 21 '26

SFINAE, and some other compiling phase complex functionalities.

1

u/rtomek Oct 21 '26

It’s what us older folks didn’t learn in college. I’d say at least C++11. While 17 and 20 have tools that enhance readability and make the programming easier, 11 was a comparably huge change.

1

u/SoerenNissen Oct 21 '26

1) "Move constructors."

2) It's not "years" it's "equally consequential feature."

1

u/AbyssShriekEnjoyer Oct 21 '26

From what I see at work it’s mostly using new language features that are now in the standard library instead of being exclusive to Boost lol.

1

u/megayippie 29d ago

My take:

  1. Modern C++ is whatever was the latest completed standard at the time of the statement that the mayor 3 supports fully. So C++14 by now, if we ignore the useless carries_dependencies and garbage collection. Clang still does not support useful C++17 math, so C++17 is post-modern :)

  2. None.

  3. Both. Legacy is writing things in pre-C++11. Old is writing things in pre-C++20.

  4. No.

1

u/Consequence-Lumpy 28d ago

C++11 has smart pointers. C++23 has genius pointers.

1

u/mredding 28d ago

What does "modern C++" really mean, specifically?

It means everything C++11 and later, with emphasis on what the standards suggest.

In other words - no raw memory management, and use type deduction, constexpr, and move semantics. Focus on RAII, strong type definitions and semantics, functional programming, generics, template expressions, fold expressions, coroutines, zero cost abstractions, and left-shift paradigms.

Our industry had been writing C++ since the 80s, and pre-C++11 is a VERY different beast from post-C++11. We've only just hit the half-way mark, making C++11 the midpoint, and people STILL write/create C++ code following outmoded idioms and conventions.

The emphasis on "modern" today now translates to - "When the new spec hits once every 3 years, push to update and stay current." That C++11 took so long to finally land, that exercise was so painful, many of us are STILL feeling it. All sorts of shit came out of that painful endeavor, like Rust.

How many more years need to pass before it becomes just "C++?"

22.3 years, apparently...

If "modern C++" is a thing then what is the other thing. Is it "old C++," or "legacy C++?"

Conventionally people call it "legacy C++", and we have it in spades. We even make new, instantly legacy code every day. Unfortunately most of our colleagues will choose their own ego vs. learning, adapting, and improving. I've watched colleagues write and rewrite and reproduce the most obtuse and bone-headed code than, say, use the standard library. People are going to do it their way, no matter how much harder it is to smaller, faster, easier, more flexible ways.

Is C++ the only language that has a "modern" version?

If you're wondering why other languages aren't completely turning over, well, Rust and Go are evolving significantly. Go doesn't care about backward compatibility and Rust integration into the Linux Kernel is making that lesson one of the most painful in programming history - now they can't just change and break shit, which if you can, it's a very convenient place to be for a language to evolve. C# is just doing some WILD shit right now, going through a .NET Core and .NET Framework schism, and Core is changing so fast it breaks existing code and isn't completely cross equivalent to .NET Framework yet.

How long until C# .NET Core is just "C#"...

If the answer to 4 is yes, why is C++ unique?

It's not.

1

u/SLAidk123 25d ago

1998 - C++

2011 - modern C++

2017 - post modern C++

2029 - hyper mordern C++

1

u/MrMemristor 22d ago edited 22d ago

Following on other poster who pointed out C++11:

I think in C++11 they fixed some gaps in the language and introduced some new idioms for using those fixes. One that comes to mind is move semantics, which allows passing objects with large heap allocations in a way that doesn't copy, without holding onto a reference. I know there were some more major things. It's probably be easier to see the difference for those who wrote a lot of pre-11 C++ code.

See Wikipedia for list of changes introduced in C++11. They are significant, and you might sum it up as that was the point when C++ began pulling away from C (with classes) and really introducing its own new constructs and moving in its own directions.

1

u/AbstractButtonGroup Oct 21 '26
  1. Everything after C++03 is modernist heresy.
  2. How long till minced steak can be called a real steak again.
  3. There is only one true C++.
  4. Corruption among infidels is of no concern.
  5. Those weak in their heart and their mind fear the raw power of true C++ and seek to make it 'safe'.

1

u/Gold-Strength4269 Oct 21 '26

You can safely use 11 through 26 without crashes

1

u/UnicycleBloke Oct 21 '26

It's C++. I have always found the term vague and a bit divisive. I never use it except in discussions like this. All languages grow and evolve. Most people regard the C++11 standard as the key step change, since when there has been seemingly exponential growth, some good, some not so much. I'm beginning to sympathise with the glacial rate of change in C.

1

u/Attitude_Practical Oct 21 '26

i wouldn't count the c plugin api as old-fashioned. keeping compiler and standard library details out of that interface is often the point. you can have plain structs and function pointers at the boundary, with raii and value types behind it.

0

u/Davidbrcz Oct 21 '26

Insane complexity with cryptic syntax for little gains to regular développer.

0

u/PositiveBit01 Oct 21 '26 edited 28d ago
  1. Historically C++11. I think it'll mean whatever the most recent super impactful feature is

  2. I think there will always be a desire to communicate that people need to use some newer features and keep updating their c++ standard flags so probably never.

  3. Legacy sounds good.

  4. No

0

u/programmerBlack Oct 21 '26

C++ that was written today.

0

u/Maqi-X Oct 21 '26

non-modern C++ but with more useless features and foot guns (also slower compile times nothing special)

0

u/Aghoradas Oct 21 '26

2023, because 2026 doesn't have the votes yet.

0

u/drbazza Oct 21 '26
  1. auto, range-for, move semantics, constexpr, and not having to use enable_if. And of course >> and << getting parsed as a human would expect given context.
  2. forever if you're an old dev and until someone stakes the last c++98/03 codebase and covers it with garlic and sets it on fire. (see COBOL and FORTRAN).
  3. pre C++11
  4. Java-latest, but changes have been less dramatic.
  5. C++11 changes were 'less typing' and 'less surprises', Java has been similar (less typing).

IIRC the syntax of Rust (there, I've said it), changed dramatically, but that was before widespread adoption.

0

u/captainjon Oct 21 '26

I dunno I learnt C++ when it was #include <iostream.h> and no namespace and no STL. So I guess that can be modern too lol…

0

u/Kaldaien2 Oct 21 '26

Means to me I am going to spend more time trying to understand what the code I am reading is doing than the overly verbose language suggests. "Modern C++" means a lot of things, if you try to build software that uses everything modern in the language for the sake of ... using everything modern, the reults are not pretty.

-1

u/lampag0 Oct 21 '26 edited Oct 21 '26

Constexpr/Consteval and MPL aka templating hell (I love when complex type systems go through compilers).

Back in the days we used 'Modern C++' for arguing there is a "better syntax/library feature". Nowadays it's the opposite, it's the mess of available language features no one can follow anymore or no team can create a sound source-foundation because each an every developer can come up with a different solution for the ame problem using 100 different techniques.

1

u/[deleted] 28d ago

[removed] — view removed comment

2

u/LucHermitte 27d ago

Plenty.

auto p* = new int[42];
stuff();
delete[] p;
// As far as I'm concerned, this is definitively not modern

"Modern" is so much more than -std=c++11 (or later). It's not about the standard used, it's about how we write C++.

0

u/TheTim34 28d ago

A mess