Skip to content

Commit bfaf16e

Browse files
iox-#1594 Extend documentation on ScopeGuard
Signed-off-by: Simon Hoinkis <[email protected]>
1 parent e3342d2 commit bfaf16e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/website/release-notes/iceoryx-unreleased.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
- Add "inline" keyword to smart_lock method implementation [\#1551](https://github.com/eclipse-iceoryx/iceoryx/issues/1551)
4646
- Fix RouDi crash due to uninitialized `ServiceRegistry` chunk [\#1575](https://github.com/eclipse-iceoryx/iceoryx/issues/1575)
4747
- Add check in `cxx::unique_ptr::get` to avoid `nullptr` dereferencing [\#1571](https://github.com/eclipse-iceoryx/iceoryx/issues/1571)
48-
- Pass `CleanupCapacity` to underlying `cxx::function` in `ScopeGuard` (formerly know as `cxx::GenericRAII`) [\#1594](https://github.com/eclipse-iceoryx/iceoryx/issues/1594)
48+
- Pass `CleanupCapacity` to underlying `cxx::function` in `ScopeGuard` (formerly known as `cxx::GenericRAII`) [\#1594](https://github.com/eclipse-iceoryx/iceoryx/issues/1594)
4949

5050
**Refactoring:**
5151

iceoryx_hoofs/include/iceoryx_hoofs/cxx/scope_guard.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ namespace cxx
2828
/// idiom quickly. You set 2 functions, one which is called in the
2929
/// constructor and another function is called in the destructor
3030
/// which can be useful when handling resources.
31+
/// @tparam [in] CleanupCapacity The static storage capacity available to store a cleanup callable in bytes
3132
/// @code
3233
/// // This example leads to a console output of:
3334
/// // hello world
3435
/// // I am doing stuff
3536
/// // goodbye
3637
/// void someFunc() {
37-
/// auto raii{[](){ std::cout << "hello world\n"; },
38+
/// ScopeGuard myScopeGuard{[](){ std::cout << "hello world\n"; },
3839
/// [](){ std::cout << "goodbye\n"; }};
3940
/// std::cout << "I am doing stuff\n";
40-
/// // raii goes out of scope here and the cleanupFunction is called in the
41+
/// // myScopeGuard goes out of scope here and the cleanupFunction is called in the
4142
/// // destructor
4243
/// }
4344
/// @endcode

0 commit comments

Comments
 (0)