Skip to content

Commit c8d0252

Browse files
committed
add [[nodiscard]] in picsar_span.hpp
1 parent beb9374 commit c8d0252

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

multi_physics/QED/include/picsar_qed/containers/picsar_span.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ namespace picsar::multi_physics::containers
4141
* @param[in] i index of the desired element
4242
* @return a reference to the i-th element
4343
*/
44+
[[nodiscard]]
4445
PXRMP_GPU_QUALIFIER PXRMP_FORCE_INLINE
4546
T& operator [] (int i) noexcept
4647
{
@@ -53,6 +54,7 @@ namespace picsar::multi_physics::containers
5354
* @param[in] i index of the desired element
5455
* @return a const reference to the i-th element
5556
*/
57+
[[nodiscard]]
5658
PXRMP_GPU_QUALIFIER PXRMP_FORCE_INLINE
5759
const T& operator [] (int i) const noexcept
5860
{
@@ -64,6 +66,7 @@ namespace picsar::multi_physics::containers
6466
*
6567
* @return a const pointer to the underlying raw data array
6668
*/
69+
[[nodiscard]]
6770
PXRMP_GPU_QUALIFIER PXRMP_FORCE_INLINE
6871
constexpr const T* data() const noexcept
6972
{
@@ -75,6 +78,7 @@ namespace picsar::multi_physics::containers
7578
*
7679
* @return the size of the array
7780
*/
81+
[[nodiscard]]
7882
PXRMP_GPU_QUALIFIER PXRMP_FORCE_INLINE
7983
constexpr size_t size() const noexcept
8084
{
@@ -86,6 +90,7 @@ namespace picsar::multi_physics::containers
8690
*
8791
* @return a const pointer to the first element of the array
8892
*/
93+
[[nodiscard]]
8994
PXRMP_GPU_QUALIFIER PXRMP_FORCE_INLINE
9095
constexpr const T* begin() const noexcept
9196
{
@@ -97,6 +102,7 @@ namespace picsar::multi_physics::containers
97102
*
98103
* @return a const pointer to the end of the array
99104
*/
105+
[[nodiscard]]
100106
PXRMP_GPU_QUALIFIER PXRMP_FORCE_INLINE
101107
constexpr const T* end() const noexcept
102108
{
@@ -108,6 +114,7 @@ namespace picsar::multi_physics::containers
108114
*
109115
* @return a pointer to the first element of the array
110116
*/
117+
[[nodiscard]]
111118
PXRMP_GPU_QUALIFIER PXRMP_FORCE_INLINE
112119
constexpr T* begin() noexcept
113120
{
@@ -119,6 +126,7 @@ namespace picsar::multi_physics::containers
119126
*
120127
* @return a pointer to the end of the array
121128
*/
129+
[[nodiscard]]
122130
PXRMP_GPU_QUALIFIER PXRMP_FORCE_INLINE
123131
constexpr T* end() noexcept
124132
{

0 commit comments

Comments
 (0)