Search code examples
Does C++23 guarantee std::launder can be omitted in placement new scenarios?...


c++compiler-optimizationundefined-behaviorc++23stdlaunder

Read More
Is it technically UB to static_cast<A*>(memmove(dst, (void*)src, sizeof(src))) since C++20?...


c++language-lawyerc++20undefined-behaviorlifetime

Read More
Is a unique_ptr with custom deleter never invoked when initialized with nullptr...


c++undefined-behaviorunique-ptr

Read More
In Rust, is it sound to do place projections on raw pointers whose provenance overlaps a mutable ref...


pointersrustlanguage-lawyerundefined-behavior

Read More
Near constant time rotate that does not violate the standards...


c++bitwise-operatorsundefined-behaviorbit-shiftconstant-time

Read More
Is 'while(1);' undefined behavior in C?...


clanguage-lawyerinfinite-loopundefined-behavior

Read More
UB or not UB, concurrently operating on static memory in Rust...


rustconcurrencystaticsynchronizationundefined-behavior

Read More
why does the returning local variable's address in c++ not crash, but still give undefined behav...


c++pointersundefined-behavior

Read More
Does the IOC (Implicitly Object Creation) apply to my_alloc wrapping std::malloc?...


c++standardsundefined-behaviorlifetimec++23

Read More
Is it UB to skip the destructor of a derived class before doing a placement new on a base class?...


c++undefined-behaviorlifetime

Read More
What's the best C++ way to multiply unsigned integers modularly safely?...


c++portabilityundefined-behaviormultiplication

Read More
Does const char* alias with char*?...


clanguage-lawyerundefined-behavior

Read More
Is use of uninitialized static object well-defined in C++?...


c++initializationundefined-behavior

Read More
Is it safe to cast a struct pointer to a different struct pointer having a prefix of elements?...


cstructundefined-behaviormemory-alignment

Read More
Why bind member function works after object destruction?...


c++c++17undefined-behavior

Read More
Why does this implementation of strlen() work?...


cundefined-behavior

Read More
Is reinterpret_cast between unrelated polymorphic types always UB, even if the v-table layouts match...


c++language-lawyerundefined-behaviorreinterpret-casttype-punning

Read More
Why does flowing off the end of a non-void function without returning a value not produce a compiler...


c++cgccg++undefined-behavior

Read More
Is it safe to modify std::string while there exists std::string_view pointing to it, but which is no...


c++undefined-behaviorstring-view

Read More
What should happen when printing an uninitialized variable?...


c++initializationundefined-behavior

Read More
Type representations and undefined behavior in C...


clanguage-lawyerundefined-behavior

Read More
Flexible array member issues with alignment and strict aliasing...


cundefined-behaviormemory-alignmentstrict-aliasingflexible-array-member

Read More
Is this use of c_str with exception undefined behavior?...


c++exceptionc++14undefined-behaviorstack-unwinding

Read More
C++23 range-based for loop lifetime fixes interraction with `std::generator` arguments...


c++for-loopgeneratorundefined-behaviorc++23

Read More
Does start_lifetime_as forbid access to original buffer?...


c++language-lawyerundefined-behaviorlifetimetype-punning

Read More
Why does GCC sabotage intentional dereferencing of address zero?...


cgccundefined-behavior

Read More
Undefined, unspecified and implementation-defined behavior...


c++cundefined-behaviorunspecified-behaviorimplementation-defined-behavior

Read More
Is dereferencing std::span::end always undefined?...


c++iteratorlanguage-lawyerundefined-behaviorstd-span

Read More
Where in the standard to I read or deduce that vector<T>::operator[] invokes UB for out-of-bou...


c++language-lawyerindexoutofboundsexceptionundefined-behaviorstd

Read More
Getting a mutable element from a std::set, for operations that won't break the order...


c++setundefined-behaviormutableconst-cast

Read More
BackNext