> C++17 > Works with or without exceptions Is anyone using C++17 features with exceptions disabled? I thought the “no exceptions” people were generally only using C++ as C-with-classes?
All of Google's codebase, including Chromium, is OO C++ without exceptions. https://google.github.io/styleguide/cppguide.html#Exceptions
TOML for Modern C++
11–20 of 48 posts
Re: TOML for Modern C++
#12Re: TOML for Modern C++
#13> C++17 > Works with or without exceptions Is anyone using C++17 features with exceptions disabled? I thought the “no exceptions” people were generally only using C++ as C-with-classes?
All of Google's codebase, including Chromium, is OO C++ without exceptions. https://google.github.io/styleguide/cppguide.html#Exceptions
Do you know if there are any parts of the C++17 language or standard library that are disallowed in Google’s code because those parts don’t work without exceptions?
Re: TOML for Modern C++
#14Re: TOML for Modern C++
#15> C++17 > Works with or without exceptions Is anyone using C++17 features with exceptions disabled? I thought the “no exceptions” people were generally only using C++ as C-with-classes?
If anything exceptions are declining in popularity, due to non-obvious and non-local effects.
Exceptions are an uber-goto, that can jump outside entire functions. Some people still like that, but very disciplined code bases (of which there are a lot in C++) tend to avoid them.
At the very least, utility libraries like this one tend to err on the side of most compatible: header only, no exceptions, user-chosen allocators, etc.
Re: TOML for Modern C++
#16I don't get why C++ programmers like to keep the namespace prefixes around. I'd just add lots of "using ..." statements and make my code more readable. What's the chance of conflicts anyway when you are already dealing with a tiny fraction of the code in the current file?
Besides the header issue mentioned in the sibling, sometimes the context is important too, for an example from Python, no one would `from os.path import join`— you always use `os.path.join` in its entirety.
Re: TOML for Modern C++
#17Earlier quoted context omitted.
It's a header-only library, it would effectively add "using" statements anything that included the library.
Ouch. Seems like an unsolvable limitation at this point. Nice catch.
Re: TOML for Modern C++
#18Earlier quoted context omitted.
All of Google's codebase, including Chromium, is OO C++ without exceptions. https://google.github.io/styleguide/cppguide.html#Exceptions
In other words, that codebase is without exceptions, without exception.
Re: TOML for Modern C++
#19> C++17 > Works with or without exceptions Is anyone using C++17 features with exceptions disabled? I thought the “no exceptions” people were generally only using C++ as C-with-classes?
Yes, plenty, including Google. If anything exceptions are declining in popularity, due to non-obvious and non-local effects. Exceptions are an uber-goto, that can jump outside entire functions. Some people still like that, but very disciplined code bases (of which there are a lot in C++) tend to avoid them. At the very least, utility libraries like this one tend to err on the side of most compatible: header only, no…
Re: TOML for Modern C++
#20Earlier quoted context omitted.
All of Google's codebase, including Chromium, is OO C++ without exceptions. https://google.github.io/styleguide/cppguide.html#Exceptions
Thanks - I’d seen that section before, but hadn’t noticed that elsewhere the document says “code should target C++17“. Do you know if there are any parts of the C++17 language or standard library that are disallowed in Google’s code because those parts don’t work without exceptions?