Skip to content

Commit 8f7a1d2

Browse files
delete msvc specific
1 parent 40629b1 commit 8f7a1d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/beman/scope/scope.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ class [[nodiscard]] scope_guard
315315
}
316316

317317
private:
318-
[[msvc::no_unique_address]] ScopeExitFunc m_exit_func;
319-
[[msvc::no_unique_address]] InvokeChecker m_invoke_checker;
318+
ScopeExitFunc m_exit_func;
319+
InvokeChecker m_invoke_checker;
320320

321321
template<typename T>
322322
static constexpr bool check_can_invoke(const T& obj) // noexcept?? how??
@@ -339,13 +339,13 @@ class [[nodiscard]] scope_guard
339339
//==================================================================================================
340340

341341
template<std::invocable ExitFunc, scope_invoke_checker InvokeChecker>
342-
scope_guard(ExitFunc, InvokeChecker) -> scope_guard<ExitFunc, InvokeChecker>;
342+
scope_guard(ExitFunc&&, InvokeChecker&&) -> scope_guard<std::decay_t<ExitFunc>, std::decay_t<InvokeChecker>>;
343343

344344
template<std::invocable ExitFunc, typename InvokeChecker>
345345
scope_guard(ExitFunc) -> scope_guard<ExitFunc, InvokeChecker>;
346346

347347
template<std::invocable ExitFunc>
348-
scope_guard(ExitFunc) -> scope_guard<ExitFunc>;
348+
scope_guard(ExitFunc&&) -> scope_guard<std::decay_t<ExitFunc>, ExecuteAlways>;
349349

350350

351351
//==================================================================================================

0 commit comments

Comments
 (0)