diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-07-01 19:18:42 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-07-01 19:18:42 +0100 |
| commit | 378dd663a402fe196f2b56c6413eb3f623aecbbf (patch) | |
| tree | 6d13f14ff8f9bff7c55a30eb046af489d0f677a2 /nihil.generator/manual_lifetime.ccm | |
| parent | 2e2d1bd3b6c7776b77c33b94f30ead89367a71e6 (diff) | |
| download | nihil-378dd663a402fe196f2b56c6413eb3f623aecbbf.tar.gz nihil-378dd663a402fe196f2b56c6413eb3f623aecbbf.tar.bz2 | |
cli: refactoring
Diffstat (limited to 'nihil.generator/manual_lifetime.ccm')
| -rw-r--r-- | nihil.generator/manual_lifetime.ccm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nihil.generator/manual_lifetime.ccm b/nihil.generator/manual_lifetime.ccm index 4a383ad..44bc0a8 100644 --- a/nihil.generator/manual_lifetime.ccm +++ b/nihil.generator/manual_lifetime.ccm @@ -64,14 +64,14 @@ private: }; template <typename T> -class manual_lifetime<T &> { +struct manual_lifetime<T &> { manual_lifetime() noexcept = default; ~manual_lifetime() = default; auto construct(this manual_lifetime &self, T &value) noexcept -> T & { self.m_value = std::addressof(value); - return self.m_value; + return value; } auto destruct(this manual_lifetime &) noexcept -> void @@ -88,7 +88,7 @@ private: }; template <typename T> -class manual_lifetime<T &&> { +struct manual_lifetime<T &&> { manual_lifetime() noexcept = default; ~manual_lifetime() = default; |
