No idea how it works in other countries but in the UK there are fixed-rate mortgages and variable-rate mortgages. Fixed rate ones are where the interest rate is locked in at the time the mortgage is taken out so any changes to the national base rate (positive or negative) do not change how much you have to repay, variable-rate mortgages are when the interest rate will fluctuate as the national base rate rises and falls.
Fixed-rate mortgages are time-limited (typically between 2-5 years) and after that you either switch to a variable rate mortgage or you take out a new fixed-rate mortgage based on the interest rates at the time.
People that bought properties just before COVID got dirt-cheap fixed-rate mortgages as the Bank of England base rate was 0.5%. Anyone sensible locked it in for 5 years which is typically the maximum available. After those 5 years were up, the base rate was about 5% which is a huge jump. I think most people have locked theirs in for 2 years now in the hopes that in a couple of years the base rate will be much lower.
I would assume it would be because the poster would find themselves in negative equity (depending on how much was left to repay on the mortgage) with all the potential pitfalls that come with it, such as if you want to borrow further money against the value of the property or if you want to sell up and move.
Rumour has it (not sure if this was ever confirmed) that one of the big reasons the second Xbox was called the Xbox 360 was to avoid unfavourable number comparisons with Sony. The Xbox launched vs the PS2, which meant the "Xbox 2" would compete against the PS3. As 3 is bigger than 2, it would make the second Xbox look bad. Hence, Xbox 360. Both have a 3, no number issues. For what it's worth, Robbie Bach (former Chief Xbox Officer) is on the record as saying one of the potential names for the second Xbox was just "Xbox 3" to catch up the PS3.
While officially the meaning of the "Xbox One" name was something about it being an all-in-one entertainment system, I would put money on it being chosen as some kind of subliminal naming scheme as it sounds like "Xbox Won".
A lot of programmers refer to the compiler explorer as Godbolt due to the domain name, such as saying "Godbolt link", "try it on Godbolt", etc. They do not realise that the domain name is Godbolt.org not because "Godbolt" is the name for the compiler explorer, but that the creator/maintainer's name is... Matthew Godbolt.
I personally found out the domain was named after the creator when I saw a CppCon talk about the explorer from him!
Calling it a hint is very much over-simplifying things as there are also restrictions on what a constexpr function is and is not allowed to do, although those restrictions become fewer and fewer as time goes on as compilers are so advanced that they can emulate more system level things at compile time.
Also, constexpr on a variable is not a hint - it must be evaluated at compile time, where-as a constexpr function will be evaluated at either compile time or runtime depending on the context and arguments passed to it. For a function that you either want to work at compile time or not at all (compile error), consteval is the hardened version.
Yes, sadly this means "constexpr" variables and "consteval" functions must be calculated at compile time, while "constexpr" functions can be used both at compile time and runtime. An annoying distinction.
You can also specify custom new/delete operations for your co-routine for control. I am not sure if you are allowed to delete them to guarantee elision either happens or the program fails to compile.
Much like lambdas and ranged-based for loops, co-routines are pretty much defined as a code transformation into lower-level C++ rather than being black magic.
Regarding the "inline" keyword being used to move a function's body into the caller: that is a compiler hint and not mandatory. The actual purpose of the "inline" function is to allow the implementation of a function to appear in multiple translation units without that causing linking issues (provided the implementation is identical).
In terms of "I’m curious if anyone actually finds something useful to do with these.": the modern C++ Windows Runtime API is built upon async operations and co-routines.
It is undefined behaviour to modify objects declared as const (except if those objects have mutable members, in which case the mutable members can be modified).
const int a = 1;
If you try to const_cast away the const of x to change its value, you have undefined behaviour. As for pointers, if you make a const pointer to a non-const object then all it means is that you cannot modify the object via that pointer, not that the object will never be modified.
int a = 1;
int b = &a;
const int c = &a;
a = 2;
Both b and c are now 2 and this is absolutely fine, and the compiler won't try to optimise out any reads of *c and assume its value is still 1 as const/non-const pointer aliasing is allowed (C has the restrict keyword, it's not in C++).
Provenance fence with respect to p. Returns a pointer to the same memory that p points to, but where the referent object is assumed to have a distinct lifetime and dynamic type."
It's a function for the compiler for low-level memory management and lifetime management code (i.e. code almost no C++ "end-user" writes) to turn off compile-time tracking and optimisations that might not be correct. Typically only used if you're starting the lifetime of one object over or inside another. Essentially, when you want the compiler to be dumb you launder the pointer to make the compiler intentionally forget the complex compile-time state tracking that compilers do and make the compiler pretend that pointer is actually a brand new object it knew nothing about.
Someone brought up the volatile keyword: volatile is for turning off compiler assumptions about what a value might be at run-time. For example, if you read from a regular int twice in a row with no write in between, then the compiler would likely remove the second read and reuse the first value (better code-gen) as it knows the value could not have changed. The volatile keyword is how you tell the compiler that it cannot reliably observe all changes to the variable so every read must be performed (same for writes).
launder and volatile are similar in so much that they exist to tell the compiler not to make assumptions about the values/objects, but that's about it. They are not interchangeable.
But let's all pretend this function is something everyone using C++ needs to use to farm some internet points.
This is a Windows API bug with the slim reader/writer (SRW) locks. It's just that the bug was discovered via std::shared_mutex as that is implemented using SRW locks.
A new version of C++ comes out every 3 years, and every 3 years you will get loads of blog posts giving overviews of the changes as well as YouTube videos of conference talks on different things, which I watch in general as part of my on-going learning and development.
C++ completed a cycle of related versions with C++11/14/17 so a lot of firms have settled on C++17 for now. C++20 introduced a LOT of new language features, some of which are still being explored and implemented and is still considered bleeding edge. C++23 has been finalised but is still going through the final ratification as far as I know.
It is absolutely fine to be a few years behind the curve, as unlike other languages (typically controlled by one company) where a new version ships at the same time as compiler/library support, for C++ the spec is released first and then the many different vendors implement it (in some cases approved features are implemented ahead of release - typically Microsoft gets library features implemented quick while other compilers get language features quick. Modules are the notable exception to this rule).
Yes. The main feature this is built upon is C++20's new string formatting features (very heavily inspired by the third party libfmt). C++23 just adds convinience functions to format and print at the same time.
Type detection, formatting options, positional-arguments, custom formatters for custom types and probably more are all supported.
Note for those who are not used to C++Now talks: they are intented to be a bit more informal with regular interjections from the audience (who at C++Now are also often heavily involved in the development of the C++ standard), so don't think people are being rude by jumping in!
Fixed-rate mortgages are time-limited (typically between 2-5 years) and after that you either switch to a variable rate mortgage or you take out a new fixed-rate mortgage based on the interest rates at the time.
People that bought properties just before COVID got dirt-cheap fixed-rate mortgages as the Bank of England base rate was 0.5%. Anyone sensible locked it in for 5 years which is typically the maximum available. After those 5 years were up, the base rate was about 5% which is a huge jump. I think most people have locked theirs in for 2 years now in the hopes that in a couple of years the base rate will be much lower.