Skip to content

Commit 74c543d

Browse files
committed
Add documentation
1 parent bd26ef8 commit 74c543d

File tree

4 files changed

+31
-4
lines changed

4 files changed

+31
-4
lines changed

src/xtd.core/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ add_sources(
176176
include/xtd/double
177177
include/xtd/double_object.hpp
178178
include/xtd/double_object
179+
include/xtd/dynamic_extent.hpp
180+
include/xtd/dynamic_extent
179181
include/xtd/enum.hpp
180182
include/xtd/enum
181183
include/xtd/enum_attribute.hpp
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#pragma once
2+
#include "dynamic_extent.hpp"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/// @file
2+
/// @brief Contains xtd::dynamic_extent field.
3+
/// @copyright Copyright (c) 2025 Gammasoft. All rights reserved.
4+
#pragma once
5+
#include "size.hpp"
6+
#include <limits>
7+
8+
/// @brief The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
9+
namespace xtd {
10+
/// @name Static Fields
11+
12+
/// @{
13+
/// @brief Represents the constant of type xtd::size signifying that the span has dynamic extent
14+
/// @remarks xtd::dynamic_extent is a constant of type xtd::size that is generally used to indicate that any type using xtd::dynamic_extent will dynamically store its value (e.g., size) rather than having the value statically known in the type.
15+
/// @par Header
16+
/// ```cpp
17+
/// #include <xtd/dynamic_extent>
18+
/// ```
19+
/// @par Namespace
20+
/// xtd
21+
/// @par Library
22+
/// xtd.core
23+
/// @ingroup xtd_core system
24+
inline constexpr xtd::size dynamic_extent = std::numeric_limits<xtd::size>::max();
25+
/// @}
26+
}

src/xtd.core/include/xtd/span.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,18 @@
66
#include "collections/generic/helpers/wrap_pointer_reverse_iterator.hpp"
77
#include "argument_null_exception.hpp"
88
#include "argument_out_of_range_exception.hpp"
9+
#include "dynamic_extent.hpp"
910
#include "iequatable.hpp"
1011
#include "is.hpp"
1112
#include "null.hpp"
1213
#include "object.hpp"
1314
#include "ptrdiff.hpp"
14-
#include "size.hpp"
1515
#include "typeof.hpp"
16-
#include <limits>
1716
#include <type_traits>
1817
#include <vector>
1918

2019
/// @brief The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
2120
namespace xtd {
22-
inline constexpr xtd::size dynamic_extent = std::numeric_limits<xtd::size>::max();
23-
2421
template<class type_t, xtd::size extent = dynamic_extent>
2522
class span : public xtd::object, public xtd::iequatable<xtd::span<type_t, extent>> {
2623
public:

0 commit comments

Comments
 (0)