Skip to content

Commit

Permalink
Fix incompatibility with GCC 4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
BewareMyPower committed Jul 4, 2023
1 parent 00473ec commit 3d16f50
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Future.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class InternalState {
using Listener = std::function<void(Result, const Type &)>;
using Pair = std::pair<Result, Type>;

// NOTE: Add the constructor explicitly just to be compatible with GCC 4.8
InternalState() : completed_(false) {}

void addListener(Listener listener) {
if (completed()) {
// Allow get_future() being called multiple times, only the 1st time will wait() be called to wait
Expand Down

0 comments on commit 3d16f50

Please sign in to comment.