Bo (2) [Avatar] Offline
#1
In listing 3.4 and 3.5 I have two suggestions.

struct empty_stack should use noexcept instead of the deprecated syntax throw() for the what() method.

Secondly, even though the emphasis in this part of the text is on the race-free pop method the push method should likely have the following interface:
void push(const T& new_value);
instead of the current copy-by-value.

Kind regards
Bo Rydberg
anthony.williams (192) [Avatar] Offline
#2
Agreed on noexcept vs throw(). Fixed.

I've changed push to use std::move internally