Namespaces
Variants
Actions

User talk:Ybab321

From cppreference.com

front page proposal

The one on User:Yaossg has a much better chance, I think: it needs to be shorter than what is currently at Main_Page, not longer, to work as a usable landing page. Even if one were to build a page where all second-level links are brought to the front page, why hide std::copy and show std::time_put_byname? --Cubbi (talk) 06:55, 19 December 2017 (PST)

That's all completely fair and I agree that Yaossg's proposal is superior. My objective was to expose all of the classes out onto the front page, as that's usually what I'm looking for when I come onto cppreference; I had no idea there would be so many of them in the end! Ultimately, the version I have on my user page is preferable for my particular usage and I'm not proposing to replace the main page contents with it. I'd like to let it live without putting a maintenance burden on anyone else, but if you or anyone else would prefer for it to be removed or erased, I'm happy to download the page as is and use it as an offline bookmark. --Ybab321 (talk) 07:37, 19 December 2017 (PST)
Ah, I thought you were preparing a competing proposal. Of course you can have whatever on a user page. --Cubbi (talk) 08:18, 19 December 2017 (PST)
I'm happy to hear that and glad we could resolve the confusion. --Ybab321 (talk) 08:24, 19 December 2017 (PST)

operator new confusion

nothrow is implemented by

try
{
    operator new(sz)
}
catch(std::bad_alloc const&)
{
    return nullptr;
}


1. It still introduces the runtime of C++ exceptions which bloats your binary size for 100 kb. bad_alloc is still there internally.

2. nothrow const& is terrible since you pass a reference to a null object. That is a total waste of register. You pass an address to an empty object which is absurd.

3. std::bad_alloc is terrible since you have no way to handle allocation failure safely. Many OS has the overcommit mechanism. -- Cqwrteur

Absolute non-sense. Just implement void* operator new(std::size_t count, const std::nothrow_t&) if you don't want to throw, this wiki is for generally applicable standard conforming code --Ybab321 (talk) 03:29, 12 February 2021 (PST)