New answers tagged c++17
0
votes
Design a set to classes to report battery/power status of different Alexa devices
Well, I feel like this deserves an answer somewhere, even if it's probably off-topic here. So I'm just going to write an answer and mark it as a community-wiki:
The task:
Depending on how this stage ...
Community wiki
2
votes
C++ custom string class implementation
You Can Add private Member Functions and friend Functions
At least, I think you can. That doesn’t change the the public API one ...
2
votes
C++ custom string class implementation
Overview:
I found one bug.
Your move constructor puts the object into an invalid state, where you can then potentially invoke undefined behavior.
You have a small memory leak in the ...
4
votes
C++ custom string class implementation
This looks quite good, I see you have thought about most of the corner cases. However, a few were missed:
new can throw
When you allocate memory with ...
2
votes
std::chrono compatible clock using CLOCK_MONOTONIC_RAW
The source code looks good.
Merge to main and ship it.
Consider writing test code which highlights observed
behavior difference between this and competing time ...
5
votes
Accepted
std::chrono compatible clock using CLOCK_MONOTONIC_RAW
The implementation looks correct to me. I do want to address some potential misunderstanding though:
Since steady_clock is affected by certain clock adjustments, […...
Top 50 recent answers are included
Related Tags
c++17 × 561c++ × 546
algorithm × 67
beginner × 58
template-meta-programming × 58
programming-challenge × 47
template × 37
performance × 34
reinventing-the-wheel × 32
multithreading × 22
iterator × 22
strings × 19
object-oriented × 17
variadic × 17
c++11 × 16
memory-management × 16
pointers × 14
c++14 × 12
boost × 12
parsing × 11
linked-list × 11
collections × 11
array × 9
game × 9
sorting × 8