boostorg / boostorg/boost

interprocess build failure in semaphore_timed_wait when passsing boost::posix_time::pos_infin

Open
#750 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
8.6k
Forks
1.9k
Avg merge
39m
Merged PRs (30d)
2

Description

While investigating a build issue with fast_dds with boost >= 1.77 I discovered that

template
inline bool semaphore_timed_wait(sem_t * handle, const TimePoint & abs_time)

in boost/interprocess/sync/posix/semaphore_wrapper.hpp

Fails to compile[with TimePoint = boost::date_time::special_values.

I would expect that is case should compile if the value passed in is "boost::posix_time::pos_infin" as there is a special case in the function:

if (ipcdetail::is_pos_infinity(abs_time)) { ...}

However, several lines lower the folloing fails to compile due to a missing overload:

timespec tspec = timepoint_to_timespec(abs_time);

I am compiling with gcc 11.3.0 on RHEL8 and Pop!_OS 22.04

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.