File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -198,9 +198,14 @@ class basic_control_block final {
198198 using control_block_storage_type =
199199 typename observer_policy_queries<Policy>::control_block_storage_type;
200200
201- static constexpr control_block_storage_type highest_bit_mask =
202- control_block_storage_type{1 }
203- << control_block_storage_type{sizeof (control_block_storage_type) * 8 - 1 };
201+ static constexpr control_block_storage_type get_highest_bit_mask () {
202+ // NB: This is put in a function to avoid a spurious MSVC warning.
203+ return static_cast <control_block_storage_type>(1 )
204+ << static_cast <control_block_storage_type>(
205+ sizeof (control_block_storage_type) * 8 - 1 );
206+ }
207+
208+ static constexpr control_block_storage_type highest_bit_mask = get_highest_bit_mask();
204209
205210 control_block_storage_type storage = 1 ;
206211
You can’t perform that action at this time.
0 commit comments