File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,11 @@ class mutex {
125125 IPC_UNUSED_ std::lock_guard<std::mutex> guard {info.lock };
126126 auto it = info.mutex_handles .find (name);
127127 if (it == info.mutex_handles .end ()) {
128- it = info.mutex_handles .emplace (name,
129- curr_prog::shm_data::init{name}).first ;
128+ it = info.mutex_handles
129+ .emplace (
130+ std::piecewise_construct, std::forward_as_tuple (name),
131+ std::forward_as_tuple (curr_prog::shm_data::init{name}))
132+ .first ;
130133 }
131134 mutex_ = &it->second .mtx ;
132135 ref_ = &it->second .ref ;
Original file line number Diff line number Diff line change @@ -55,8 +55,12 @@ class mutex {
5555 IPC_UNUSED_ std::lock_guard<std::mutex> guard {info.lock };
5656 auto it = info.mutex_handles .find (name);
5757 if (it == info.mutex_handles .end ()) {
58- it = info.mutex_handles .emplace (name,
59- curr_prog::shm_data::init{name, sizeof (pthread_mutex_t )}).first ;
58+ it = info.mutex_handles
59+ .emplace (std::piecewise_construct,
60+ std::forward_as_tuple (name),
61+ std::forward_as_tuple (curr_prog::shm_data::init{
62+ name, sizeof (pthread_mutex_t )}))
63+ .first ;
6064 }
6165 shm_ = &it->second .shm ;
6266 ref_ = &it->second .ref ;
You can’t perform that action at this time.
0 commit comments