[PR #2287] [MERGED] Replace uses of emplace with operator=(&&) #2449

Closed
opened 2026-03-04 02:05:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2287
Author: @gaul
Created: 8/21/2023
Status: Merged
Merged: 8/22/2023
Merged by: @ggtakec

Base: masterHead: emplace-fix


📝 Commits (1)

  • 0623f36 Replace uses of emplace with operator=(&&)

📊 Changes

1 file changed (+4 additions, -4 deletions)

View changed files

📝 src/cache.cpp (+4 -4)

📄 Description

emplace does not overwrite the value if the key already exists. C++17 has insert_or_assign but C++11 only has operator= which invokes the default constructor. Follows on to 6781ef5bd1.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/2287 **Author:** [@gaul](https://github.com/gaul) **Created:** 8/21/2023 **Status:** ✅ Merged **Merged:** 8/22/2023 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `emplace-fix` --- ### 📝 Commits (1) - [`0623f36`](https://github.com/s3fs-fuse/s3fs-fuse/commit/0623f3603fc93256e2aa702b138ab5b2dd80bc0a) Replace uses of emplace with operator=(&&) ### 📊 Changes **1 file changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/cache.cpp` (+4 -4) </details> ### 📄 Description `emplace` does not overwrite the value if the key already exists. C++17 has `insert_or_assign` but C++11 only has `operator=` which invokes the default constructor. Follows on to 6781ef5bd1a86b39469366307b582f342c945c71. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:05:35 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#2449
No description provided.