diff options
Diffstat (limited to 'include/winapi/debug')
| -rw-r--r-- | include/winapi/debug/call_stack.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/winapi/debug/call_stack.hpp b/include/winapi/debug/call_stack.hpp index e5b8c41..a9a9d43 100644 --- a/include/winapi/debug/call_stack.hpp +++ b/include/winapi/debug/call_stack.hpp @@ -38,16 +38,21 @@ public: void dump(std::ostream& os, const DbgHelp&) const; - const std::array<Address, max_length> frames; - const std::size_t length; + std::size_t length() const { return _length; } const Address* begin() const { return frames.data(); } const Address* cbegin() const { return begin(); } - const Address* end() const { return begin() + length; } + const Address* end() const { return begin() + _length; } const Address* cend() const { return end(); } private: CallStack() = default; + + CallStack(std::array<Address, max_length>&& frames, std::size_t length) + : frames{std::move(frames)}, _length{length} {} + + std::array<Address, max_length> frames; + std::size_t _length; }; } // namespace winapi |
