Skip to content

Commit 5eadafd

Browse files
committed
file/Address: add ShallowCopy constructor
This makes the default copy constructor available with the ShallowCopy tag struct. Not used currently, but may be some day.
1 parent ea3ecca commit 5eadafd

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/file/Address.hxx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
#pragma once
66

7+
#include "util/TagStructs.hxx"
8+
79
#include <cstddef>
810
#include <span>
911
#include <string_view>
@@ -51,6 +53,9 @@ struct FileAddress {
5153
{
5254
}
5355

56+
FileAddress(ShallowCopy, const FileAddress &src) noexcept
57+
:FileAddress(src) {}
58+
5459
/**
5560
* Copy from an existing #FileAddress instance, but override the
5661
* path.
@@ -62,7 +67,10 @@ struct FileAddress {
6267

6368
FileAddress(AllocatorPtr alloc, const FileAddress &src) noexcept;
6469

65-
FileAddress(const FileAddress &) = delete;
70+
private:
71+
constexpr FileAddress(const FileAddress &) noexcept = default;
72+
73+
public:
6674
FileAddress &operator=(const FileAddress &) = delete;
6775

6876
[[gnu::pure]]

0 commit comments

Comments
 (0)