Closed chrullrich closed 5 years ago
https://github.com/boostorg/thread/blob/a645ef761ddf4c9811eb707c479363a79ae4534e/include/boost/thread/win32/thread_primitives.hpp#L105
The bitwise-or operator has higher precedence than the ternary, so this line compiles as
type ? create_event_manual_reset : ( ( 0 | state ) ? create_event_initial_set : 0 )
Creating an initially-set manual-reset event is therefore not possible. What is probably meant is:
( type ? create_event_manual_reset : 0 ) | ( state ? create_event_initial_set : 0 )
Right, thanks for the report.
PR is welcome.
https://github.com/boostorg/thread/blob/a645ef761ddf4c9811eb707c479363a79ae4534e/include/boost/thread/win32/thread_primitives.hpp#L105
The bitwise-or operator has higher precedence than the ternary, so this line compiles as
Creating an initially-set manual-reset event is therefore not possible. What is probably meant is: