Skip to content

Commit

Permalink
Avoid -Wmissing-field-initializers under GCC 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Aug 23, 2024
1 parent cfb1346 commit 1a866fb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion include/boost/uuid/time_generator_v1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,21 @@ class time_generator_v1

private:

uuid::node_type node_ = {};
uuid::node_type node_ = {{}};

std::atomic<state_type>* ps_ = nullptr;

#if BOOST_WORKAROUND(BOOST_GCC, < 50000)

// Avoid -Wmissing-field-initializers under GCC 4.x
state_type state_ = { 0, 0 };

#else

state_type state_ = {};

#endif

public:

using result_type = uuid;
Expand Down

0 comments on commit 1a866fb

Please sign in to comment.