Skip to main content
Tour
About Us
Meta
current community
Stack Exchange
chat
Meta Stack Exchange
your communities
Sign up
or
log in
to customize your list.
more stack exchange communities
company blog
Log in
Stack Exchange
All Sites
Top 400 Users
Digests
J. Schultke
Computer Science student at TU Dresden. C++, Java, Python and Kotlin enthusiast.
top
accounts
reputation
activity
subscriptions
Top Questions
51
votes
Why is initializing a string to "" more efficient than the default constructor?
c++
clang
compiler-optimization
stdstring
libc++
asked Jun 25, 2023 at 23:40
stackoverflow.com
51
votes
What is erroneous behavior? How is it different from undefined behavior?
c++
undefined-behavior
c++26
erroneous-behavior
asked Mar 28 at 14:00
stackoverflow.com
34
votes
What are the implications of constexpr floating-point math?
c++
floating-point
constexpr
c++23
c++26
asked Jul 4, 2023 at 9:13
stackoverflow.com
34
votes
Why does division by 3 require a rightshift (and other oddities) on x86?
c++
assembly
compilation
x86-64
integer-division
asked Aug 14, 2020 at 17:55
stackoverflow.com
25
votes
Why does std::println(std::vector) fail to compile?
c++
stdvector
libc++
fmt
c++23
asked Jan 4 at 0:44
stackoverflow.com
24
votes
What happens when an assumption, i.e. [[assume]] contains UB?
c++
language-lawyer
c++23
assumption
asked Sep 1, 2023 at 15:03
stackoverflow.com
22
votes
How can you quickly compute the integer logarithm for any base?
c++
math
c++17
base
logarithm
asked Aug 14, 2020 at 10:30
stackoverflow.com
18
votes
YAML: Is it possible to have a list in the root section?
file
yaml
asked Apr 16, 2016 at 10:53
stackoverflow.com
13
votes
Why can't I std::bit_cast the contents of a string literal?
c++
clang
c++20
compiler-bug
bit-cast
asked May 9, 2021 at 0:32
stackoverflow.com
13
votes
When to use std::expected instead of exceptions
c++
exception
error-handling
c++23
std-expected
asked Jun 12, 2023 at 22:16
stackoverflow.com
1
2
3
4
next
Top Answers
55
Why is initializing a string to "" more efficient than the default constructor?
stackoverflow.com
51
What is erroneous behavior? How is it different from undefined behavior?
stackoverflow.com
40
Why is 'char -> int' promotion, but 'char -> short' is conversion (but not promotion)?
stackoverflow.com
35
What are the implications of constexpr floating-point math?
stackoverflow.com
34
How can you quickly compute the integer logarithm for any base?
stackoverflow.com
32
Why does overload resolution prefer std::nullptr_t over a class when passing {}?
stackoverflow.com
31
Will dereferencing pointers always cause memory access?
stackoverflow.com
31
What is an equivalent replacement for std::unary_function in C++17?
stackoverflow.com
29
Why are pointers to data members callable in C++?
stackoverflow.com
29
Does static constexpr variable inside a function make sense?
stackoverflow.com
28
When is C++23 auto(x) useful?
stackoverflow.com
21
Transparent search for a std::map with a std::pair as a key
stackoverflow.com
20
Can you convert std::vector to std::array at compile-time without making the vector twice?
stackoverflow.com
19
Only bitwise operations for std::byte in C++17?
stackoverflow.com
18
Why do algorithms use iterator_traits<T>::value_type instead of iter::value_type?
stackoverflow.com
18
Is it ok to use std::ignore in order to discard a return value of a function to avoid any related compiler warnings?
stackoverflow.com
18
Ambiguity between function and function in namespace with same argument
stackoverflow.com
17
Divide integers with floor, ceil and outwards rounding modes in C++
stackoverflow.com
16
Is this legal template lambda syntax?
stackoverflow.com
16
Why do GCC and Clang pop on both branches instead of only once? (Factoring parts of the epilogue out of tail-duplication)
stackoverflow.com
16
What are the rules for _ underscore variables in C++26, and what's a name-independent declaration?
stackoverflow.com
16
Why does the address of an out-of-scope variable equal zero with constexpr?
stackoverflow.com
16
Capturing a `thread_local` in a lambda
stackoverflow.com
15
What are the [[reproducible]] and [[unsequenced]] attributes in C23, and when should I use them?
stackoverflow.com
15
How can I code something like a switch for std::variant?
stackoverflow.com
15
Moving after copying in assignment of conditional operator result
stackoverflow.com
15
Implementing variadic min / max functions
stackoverflow.com
15
Can you declare static local variables in a constexpr function?
stackoverflow.com
15
Can't use operator<< with std::float128_t; how do I print it?
stackoverflow.com
15
What are the advantages of using std::array over C-style arrays?
stackoverflow.com
1
2
3
4
5
6
next