Skip to content

condition_variable::timed_wait incompatible with std::chrono::duration due to lack of is_pos_infinity #410

Description

@SpareSimian

boost::condition_variable::timed_wait() attempts to invoke wait_duration.is_pos_infinity() on its templated parameter.

The standard doesn't define a member is_pos_infinity expected by timed_wait, forcing one to use a Boost clock rather than an STL one such as steady_clock or system_clock.

https://en.cppreference.com/w/cpp/chrono/duration

Found when compiling with MSVS 2022's STL (line 200 here):

https://github.com/microsoft/STL/blob/main/stl/inc/__msvc_chrono.hpp

A possible workaround would be to define an adapter class that defines this member.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions