Coverage Report

Created: 2026-03-11 06:24

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/botan/build/include/public/botan/concepts.h
Line
Count
Source
1
/**
2
 * Useful concepts that are available throughout the library
3
 * (C) 2023 Jack Lloyd
4
 *     2023 René Meusel - Rohde & Schwarz Cybersecurity
5
 *
6
 * Botan is released under the Simplified BSD License (see license.txt)
7
 */
8
9
#ifndef BOTAN_CONCEPTS_H_
10
#define BOTAN_CONCEPTS_H_
11
12
#include <botan/exceptn.h>
13
14
#include <concepts>
15
#include <iosfwd>
16
#include <ranges>
17
#include <span>
18
#include <type_traits>
19
20
namespace Botan {
21
22
template <typename T, typename Tag, typename... Capabilities>
23
class Strong;
24
25
template <typename... Ts>
26
struct is_strong_type : std::false_type {};
27
28
template <typename... Ts>
29
struct is_strong_type<Strong<Ts...>> : std::true_type {};
30
31
template <typename... Ts>
32
constexpr bool is_strong_type_v = is_strong_type<std::remove_const_t<Ts>...>::value;
33
34
template <typename T0 = void, typename... Ts>
35
struct all_same {
36
      static constexpr bool value = (std::is_same_v<T0, Ts> && ... && true);
37
};
38
39
template <typename... Ts>
40
static constexpr bool all_same_v = all_same<Ts...>::value;
41
42
namespace detail {
43
44
/**
45
 * Helper type to indicate that a certain type should be automatically
46
 * detected based on the context.
47
 */
48
struct AutoDetect {
49
      constexpr AutoDetect() = delete;
50
};
51
52
}  // namespace detail
53
54
namespace ranges {
55
56
/**
57
 * Models a std::ranges::contiguous_range that (optionally) restricts its
58
 * value_type to ValueT. In other words: a stretch of contiguous memory of
59
 * a certain type (optional ValueT).
60
 */
61
template <typename T, typename ValueT = std::ranges::range_value_t<T>>
62
concept contiguous_range = std::ranges::contiguous_range<T> && std::same_as<ValueT, std::ranges::range_value_t<T>>;
63
64
/**
65
 * Models a std::ranges::contiguous_range that satisfies
66
 * std::ranges::output_range with an arbitrary value_type. In other words: a
67
 * stretch of contiguous memory of a certain type (optional ValueT) that can be
68
 * written to.
69
 */
70
template <typename T, typename ValueT = std::ranges::range_value_t<T>>
71
concept contiguous_output_range = contiguous_range<T, ValueT> && std::ranges::output_range<T, ValueT>;
72
73
/**
74
 * Models a range that can be turned into a std::span<>. Typically, this is some
75
 * form of ranges::contiguous_range.
76
 */
77
template <typename T>
78
concept spanable_range = std::constructible_from<std::span<const std::ranges::range_value_t<T>>, T>;
79
80
/**
81
 * Models a range that can be turned into a std::span<> with a static extent.
82
 * Typically, this is a std::array or a std::span derived from an array.
83
 */
84
// clang-format off
85
template <typename T>
86
concept statically_spanable_range = spanable_range<T> &&
87
                                    decltype(std::span{std::declval<T&>()})::extent != std::dynamic_extent;
88
89
// clang-format on
90
91
/**
92
 * Find the length in bytes of a given contiguous range @p r.
93
 */
94
11.2M
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
11.2M
   return std::span{r}.size_bytes();
96
11.2M
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm4EEEEEmRKT_
Line
Count
Source
94
108k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
108k
   return std::span{r}.size_bytes();
96
108k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm32EEEEEmRKT_
Line
Count
Source
94
54.2k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
54.2k
   return std::span{r}.size_bytes();
96
54.2k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm18446744073709551615EEEEEmRKT_
Line
Count
Source
94
206k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
206k
   return std::span{r}.size_bytes();
96
206k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEEEEmRKT_
Line
Count
Source
94
80.0k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
80.0k
   return std::span{r}.size_bytes();
96
80.0k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm1EEEEEmRKT_
Line
Count
Source
94
1.53M
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
1.53M
   return std::span{r}.size_bytes();
96
1.53M
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEmRKT_
Line
Count
Source
94
704k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
704k
   return std::span{r}.size_bytes();
96
704k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayIjLm16EEEEEmRKT_
Line
Count
Source
94
91.9k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
91.9k
   return std::span{r}.size_bytes();
96
91.9k
}
Unexecuted instantiation: _ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayIjLm8EEEEEmRKT_
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIjLm1EEEEEmRKT_
Line
Count
Source
94
10.7k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
10.7k
   return std::span{r}.size_bytes();
96
10.7k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEmRKT_
Line
Count
Source
94
365k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
365k
   return std::span{r}.size_bytes();
96
365k
}
Unexecuted instantiation: _ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm2EEEEEmRKT_
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIjLm18446744073709551615EEEEEmRKT_
Line
Count
Source
94
397
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
397
   return std::span{r}.size_bytes();
96
397
}
Unexecuted instantiation: _ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm2EEEEEmRKT_
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayIhLm16EEEEEmRKT_
Line
Count
Source
94
2.31k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
2.31k
   return std::span{r}.size_bytes();
96
2.31k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayIhLm8EEEEEmRKT_
Line
Count
Source
94
60.3k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
60.3k
   return std::span{r}.size_bytes();
96
60.3k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm9EEEEEmRKT_
Line
Count
Source
94
5.39k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
5.39k
   return std::span{r}.size_bytes();
96
5.39k
}
Unexecuted instantiation: _ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanItLm1EEEEEmRKT_
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__16vectorImNS_16secure_allocatorImEEEEEEmRKT_
Line
Count
Source
94
3.65M
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
3.65M
   return std::span{r}.size_bytes();
96
3.65M
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm4EEEEEmRKT_
Line
Count
Source
94
31.0k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
31.0k
   return std::span{r}.size_bytes();
96
31.0k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm6EEEEEmRKT_
Line
Count
Source
94
13.2k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
13.2k
   return std::span{r}.size_bytes();
96
13.2k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm48EEEEEmRKT_
Line
Count
Source
94
70
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
70
   return std::span{r}.size_bytes();
96
70
}
Unexecuted instantiation: _ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm6EEEEEmRKT_
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm8EEEEEmRKT_
Line
Count
Source
94
9.28k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
9.28k
   return std::span{r}.size_bytes();
96
9.28k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm64EEEEEmRKT_
Line
Count
Source
94
28
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
28
   return std::span{r}.size_bytes();
96
28
}
Unexecuted instantiation: _ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm8EEEEEmRKT_
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm9EEEEEmRKT_
Line
Count
Source
94
21.2k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
21.2k
   return std::span{r}.size_bytes();
96
21.2k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm18EEEEEmRKT_
Line
Count
Source
94
4.26M
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
4.26M
   return std::span{r}.size_bytes();
96
4.26M
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanImLm3EEEEEmRKT_
Line
Count
Source
94
4.63k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
4.63k
   return std::span{r}.size_bytes();
96
4.63k
}
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm24EEEEEmRKT_
Line
Count
Source
94
30
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
30
   return std::span{r}.size_bytes();
96
30
}
Unexecuted instantiation: _ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__15arrayImLm3EEEEEmRKT_
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm28EEEEEmRKT_
Line
Count
Source
94
7.00k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
7.00k
   return std::span{r}.size_bytes();
96
7.00k
}
Unexecuted instantiation: _ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm72EEEEEmRKT_
_ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm66EEEEEmRKT_
Line
Count
Source
94
6.52k
inline constexpr size_t size_bytes(const spanable_range auto& r) {
95
6.52k
   return std::span{r}.size_bytes();
96
6.52k
}
Unexecuted instantiation: _ZN5Botan6ranges10size_bytesITkNS0_14spanable_rangeENSt3__14spanIhLm98EEEEEmRKT_
97
98
/**
99
 * Check that a given range @p r has a certain statically-known byte length. If
100
 * the range's extent is known at compile time, this is a static check,
101
 * otherwise a runtime argument check will be added.
102
 *
103
 * @throws Invalid_Argument  if range @p r has a dynamic extent and does not
104
 *                           feature the expected byte length.
105
 */
106
template <size_t expected, spanable_range R>
107
6.57M
inline constexpr void assert_exact_byte_length(const R& r) {
108
6.57M
   const std::span s{r};
109
6.57M
   if constexpr(statically_spanable_range<R>) {
110
6.57M
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
6.57M
   } else {
112
470
      if(s.size_bytes() != expected) {
113
0
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
0
      }
115
470
   }
116
6.57M
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm32ETkNS0_14spanable_rangeENSt3__14spanIhLm32EEEEEvRKT0_
Line
Count
Source
107
166
inline constexpr void assert_exact_byte_length(const R& r) {
108
166
   const std::span s{r};
109
166
   if constexpr(statically_spanable_range<R>) {
110
166
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
166
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm32ETkNS0_14spanable_rangeENSt3__14spanIKhLm32EEEEEvRKT0_
Line
Count
Source
107
108k
inline constexpr void assert_exact_byte_length(const R& r) {
108
108k
   const std::span s{r};
109
108k
   if constexpr(statically_spanable_range<R>) {
110
108k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
108k
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm32ETkNS0_14spanable_rangeENSt3__15arrayImLm4EEEEEvRKT0_
Line
Count
Source
107
89.4k
inline constexpr void assert_exact_byte_length(const R& r) {
108
89.4k
   const std::span s{r};
109
89.4k
   if constexpr(statically_spanable_range<R>) {
110
89.4k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
89.4k
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIKhLm8EEEEEvRKT0_
Line
Count
Source
107
3.02M
inline constexpr void assert_exact_byte_length(const R& r) {
108
3.02M
   const std::span s{r};
109
3.02M
   if constexpr(statically_spanable_range<R>) {
110
3.02M
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
3.02M
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIhLm8EEEEEvRKT0_
Line
Count
Source
107
1.24M
inline constexpr void assert_exact_byte_length(const R& r) {
108
1.24M
   const std::span s{r};
109
1.24M
   if constexpr(statically_spanable_range<R>) {
110
1.24M
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
1.24M
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__14spanIKmLm1EEEEEvRKT0_
Line
Count
Source
107
704k
inline constexpr void assert_exact_byte_length(const R& r) {
108
704k
   const std::span s{r};
109
704k
   if constexpr(statically_spanable_range<R>) {
110
704k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
704k
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm64ETkNS0_14spanable_rangeENSt3__14spanIKhLm18446744073709551615EEEEEvRKT0_
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKhLm4EEEEEvRKT0_
Line
Count
Source
107
21.5k
inline constexpr void assert_exact_byte_length(const R& r) {
108
21.5k
   const std::span s{r};
109
21.5k
   if constexpr(statically_spanable_range<R>) {
110
21.5k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
21.5k
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIhLm4EEEEEvRKT0_
Line
Count
Source
107
631k
inline constexpr void assert_exact_byte_length(const R& r) {
108
631k
   const std::span s{r};
109
631k
   if constexpr(statically_spanable_range<R>) {
110
631k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
631k
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__14spanIKjLm1EEEEEvRKT0_
Line
Count
Source
107
365k
inline constexpr void assert_exact_byte_length(const R& r) {
108
365k
   const std::span s{r};
109
365k
   if constexpr(statically_spanable_range<R>) {
110
365k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
365k
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIhLm2EEEEEvRKT0_
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIKtLm1EEEEEvRKT0_
_ZN5Botan6ranges24assert_exact_byte_lengthILm64ETkNS0_14spanable_rangeENSt3__14spanIKhLm64EEEEEvRKT0_
Line
Count
Source
107
183k
inline constexpr void assert_exact_byte_length(const R& r) {
108
183k
   const std::span s{r};
109
183k
   if constexpr(statically_spanable_range<R>) {
110
183k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
183k
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm128ETkNS0_14spanable_rangeENSt3__14spanIKhLm128EEEEEvRKT0_
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__15arrayItLm1EEEEEvRKT0_
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm1ETkNS0_14spanable_rangeENSt3__15arrayIhLm1EEEEEvRKT0_
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm1ETkNS0_14spanable_rangeENSt3__14spanIhLm1EEEEEvRKT0_
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm4ETkNS0_14spanable_rangeENSt3__15arrayIjLm1EEEEEvRKT0_
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm16ETkNS0_14spanable_rangeENSt3__14spanIhLm16EEEEEvRKT0_
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__15arrayIhLm8EEEEEvRKT0_
Line
Count
Source
107
24.4k
inline constexpr void assert_exact_byte_length(const R& r) {
108
24.4k
   const std::span s{r};
109
24.4k
   if constexpr(statically_spanable_range<R>) {
110
24.4k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
24.4k
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm16ETkNS0_14spanable_rangeENSt3__14spanIKhLm16EEEEEvRKT0_
Line
Count
Source
107
475
inline constexpr void assert_exact_byte_length(const R& r) {
108
475
   const std::span s{r};
109
475
   if constexpr(statically_spanable_range<R>) {
110
475
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
475
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm16ETkNS0_14spanable_rangeENSt3__14spanImLm2EEEEEvRKT0_
_ZN5Botan6ranges24assert_exact_byte_lengthILm8ETkNS0_14spanable_rangeENSt3__15arrayImLm1EEEEEvRKT0_
Line
Count
Source
107
120k
inline constexpr void assert_exact_byte_length(const R& r) {
108
120k
   const std::span s{r};
109
120k
   if constexpr(statically_spanable_range<R>) {
110
120k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
120k
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm2ETkNS0_14spanable_rangeENSt3__14spanIKhLm2EEEEEvRKT0_
_ZN5Botan6ranges24assert_exact_byte_lengthILm16ETkNS0_14spanable_rangeENSt3__15arrayImLm2EEEEEvRKT0_
Line
Count
Source
107
872
inline constexpr void assert_exact_byte_length(const R& r) {
108
872
   const std::span s{r};
109
872
   if constexpr(statically_spanable_range<R>) {
110
872
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
872
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm16ETkNS0_14spanable_rangeENSt3__14spanIKhLm18446744073709551615EEEEEvRKT0_
Line
Count
Source
107
470
inline constexpr void assert_exact_byte_length(const R& r) {
108
470
   const std::span s{r};
109
   if constexpr(statically_spanable_range<R>) {
110
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
470
   } else {
112
470
      if(s.size_bytes() != expected) {
113
0
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
0
      }
115
470
   }
116
470
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm16ETkNS0_14spanable_rangeENSt3__15arrayIhLm16EEEEEvRKT0_
Line
Count
Source
107
470
inline constexpr void assert_exact_byte_length(const R& r) {
108
470
   const std::span s{r};
109
470
   if constexpr(statically_spanable_range<R>) {
110
470
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
470
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm64ETkNS0_14spanable_rangeENSt3__14spanIhLm64EEEEEvRKT0_
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm32ETkNS0_14spanable_rangeENSt3__14spanImLm4EEEEEvRKT0_
_ZN5Botan6ranges24assert_exact_byte_lengthILm48ETkNS0_14spanable_rangeENSt3__15arrayImLm6EEEEEvRKT0_
Line
Count
Source
107
13.6k
inline constexpr void assert_exact_byte_length(const R& r) {
108
13.6k
   const std::span s{r};
109
13.6k
   if constexpr(statically_spanable_range<R>) {
110
13.6k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
13.6k
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm48ETkNS0_14spanable_rangeENSt3__14spanIKhLm48EEEEEvRKT0_
Line
Count
Source
107
35
inline constexpr void assert_exact_byte_length(const R& r) {
108
35
   const std::span s{r};
109
35
   if constexpr(statically_spanable_range<R>) {
110
35
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
35
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm48ETkNS0_14spanable_rangeENSt3__14spanImLm6EEEEEvRKT0_
_ZN5Botan6ranges24assert_exact_byte_lengthILm64ETkNS0_14spanable_rangeENSt3__15arrayImLm8EEEEEvRKT0_
Line
Count
Source
107
8.16k
inline constexpr void assert_exact_byte_length(const R& r) {
108
8.16k
   const std::span s{r};
109
8.16k
   if constexpr(statically_spanable_range<R>) {
110
8.16k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
8.16k
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm64ETkNS0_14spanable_rangeENSt3__14spanImLm8EEEEEvRKT0_
_ZN5Botan6ranges24assert_exact_byte_lengthILm72ETkNS0_14spanable_rangeENSt3__15arrayImLm9EEEEEvRKT0_
Line
Count
Source
107
20.6k
inline constexpr void assert_exact_byte_length(const R& r) {
108
20.6k
   const std::span s{r};
109
20.6k
   if constexpr(statically_spanable_range<R>) {
110
20.6k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
20.6k
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm24ETkNS0_14spanable_rangeENSt3__15arrayImLm3EEEEEvRKT0_
Line
Count
Source
107
6.58k
inline constexpr void assert_exact_byte_length(const R& r) {
108
6.58k
   const std::span s{r};
109
6.58k
   if constexpr(statically_spanable_range<R>) {
110
6.58k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
6.58k
}
_ZN5Botan6ranges24assert_exact_byte_lengthILm24ETkNS0_14spanable_rangeENSt3__14spanIKhLm24EEEEEvRKT0_
Line
Count
Source
107
15
inline constexpr void assert_exact_byte_length(const R& r) {
108
15
   const std::span s{r};
109
15
   if constexpr(statically_spanable_range<R>) {
110
15
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
15
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm24ETkNS0_14spanable_rangeENSt3__14spanImLm3EEEEEvRKT0_
_ZN5Botan6ranges24assert_exact_byte_lengthILm28ETkNS0_14spanable_rangeENSt3__14spanIKhLm28EEEEEvRKT0_
Line
Count
Source
107
3.50k
inline constexpr void assert_exact_byte_length(const R& r) {
108
3.50k
   const std::span s{r};
109
3.50k
   if constexpr(statically_spanable_range<R>) {
110
3.50k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
3.50k
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm72ETkNS0_14spanable_rangeENSt3__14spanIKhLm72EEEEEvRKT0_
_ZN5Botan6ranges24assert_exact_byte_lengthILm66ETkNS0_14spanable_rangeENSt3__14spanIKhLm66EEEEEvRKT0_
Line
Count
Source
107
3.26k
inline constexpr void assert_exact_byte_length(const R& r) {
108
3.26k
   const std::span s{r};
109
3.26k
   if constexpr(statically_spanable_range<R>) {
110
3.26k
      static_assert(s.size_bytes() == expected, "memory region does not have expected byte lengths");
111
   } else {
112
      if(s.size_bytes() != expected) {
113
         throw Invalid_Argument("Memory regions did not have expected byte lengths");
114
      }
115
   }
116
3.26k
}
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm98ETkNS0_14spanable_rangeENSt3__14spanIKhLm98EEEEEvRKT0_
Unexecuted instantiation: _ZN5Botan6ranges24assert_exact_byte_lengthILm72ETkNS0_14spanable_rangeENSt3__14spanImLm9EEEEEvRKT0_
117
118
/**
119
 * Check that a list of ranges (in @p r0 and @p rs) all have the same byte
120
 * lengths. If the first range's extent is known at compile time, this will be a
121
 * static check for all other ranges whose extents are known at compile time,
122
 * otherwise a runtime argument check will be added.
123
 *
124
 * @throws Invalid_Argument  if any range has a dynamic extent and not all
125
 *                           ranges feature the same byte length.
126
 */
127
template <spanable_range R0, spanable_range... Rs>
128
inline constexpr void assert_equal_byte_lengths(const R0& r0, const Rs&... rs)
129
   requires(sizeof...(Rs) > 0)
130
5.19M
{
131
5.19M
   const std::span s0{r0};
132
133
5.19M
   if constexpr(statically_spanable_range<R0>) {
134
3.17M
      constexpr size_t expected_size = s0.size_bytes();
135
3.17M
      (assert_exact_byte_length<expected_size>(rs), ...);
136
3.17M
   } else {
137
2.02M
      const size_t expected_size = s0.size_bytes();
138
2.02M
      const bool correct_size =
139
2.02M
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
2.02M
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
2.02M
   }
145
5.19M
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm4EEETpTkNS0_14spanable_rangeEJNS2_4spanIhLm32EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm4EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm32EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
108k
{
131
108k
   const std::span s0{r0};
132
133
108k
   if constexpr(statically_spanable_range<R0>) {
134
108k
      constexpr size_t expected_size = s0.size_bytes();
135
108k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
108k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm32EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
70.4k
{
131
70.4k
   const std::span s0{r0};
132
133
70.4k
   if constexpr(statically_spanable_range<R0>) {
134
70.4k
      constexpr size_t expected_size = s0.size_bytes();
135
70.4k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
70.4k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
34.7k
{
131
34.7k
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
34.7k
   } else {
137
34.7k
      const size_t expected_size = s0.size_bytes();
138
34.7k
      const bool correct_size =
139
34.7k
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
34.7k
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
34.7k
   }
145
34.7k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKhLm18446744073709551615EEES6_EEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
33.7k
{
131
33.7k
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
33.7k
   } else {
137
33.7k
      const size_t expected_size = s0.size_bytes();
138
33.7k
      const bool correct_size =
139
67.4k
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
33.7k
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
33.7k
   }
145
33.7k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
9.10k
{
131
9.10k
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
9.10k
   } else {
137
9.10k
      const size_t expected_size = s0.size_bytes();
138
9.10k
      const bool correct_size =
139
9.10k
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
9.10k
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
9.10k
   }
145
9.10k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKmLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
29.8k
{
131
29.8k
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
29.8k
   } else {
137
29.8k
      const size_t expected_size = s0.size_bytes();
138
29.8k
      const bool correct_size =
139
29.8k
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
29.8k
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
29.8k
   }
145
29.8k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
1.51M
{
131
1.51M
   const std::span s0{r0};
132
133
1.51M
   if constexpr(statically_spanable_range<R0>) {
134
1.51M
      constexpr size_t expected_size = s0.size_bytes();
135
1.51M
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
1.51M
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm8EEETpTkNS0_14spanable_rangeEJNS3_IKmLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
704k
{
131
704k
   const std::span s0{r0};
132
133
704k
   if constexpr(statically_spanable_range<R0>) {
134
704k
      constexpr size_t expected_size = s0.size_bytes();
135
704k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
704k
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIjLm16EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKjLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
52.8k
{
131
52.8k
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
52.8k
   } else {
137
52.8k
      const size_t expected_size = s0.size_bytes();
138
52.8k
      const bool correct_size =
139
52.8k
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
52.8k
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
52.8k
   }
145
52.8k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIjLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
10.7k
{
131
10.7k
   const std::span s0{r0};
132
133
10.7k
   if constexpr(statically_spanable_range<R0>) {
134
10.7k
      constexpr size_t expected_size = s0.size_bytes();
135
10.7k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
10.7k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm4EEETpTkNS0_14spanable_rangeEJNS3_IKjLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
365k
{
131
365k
   const std::span s0{r0};
132
133
365k
   if constexpr(statically_spanable_range<R0>) {
134
365k
      constexpr size_t expected_size = s0.size_bytes();
135
365k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
365k
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm2EEETpTkNS0_14spanable_rangeEJNS3_IKtLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIjLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
794
{
131
794
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
794
   } else {
137
794
      const size_t expected_size = s0.size_bytes();
138
794
      const bool correct_size =
139
794
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
794
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
794
   }
145
794
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIjLm16EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm64EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
183k
{
131
183k
   const std::span s0{r0};
132
133
183k
   if constexpr(statically_spanable_range<R0>) {
134
183k
      constexpr size_t expected_size = s0.size_bytes();
135
183k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
183k
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIjLm16EEETpTkNS0_14spanable_rangeEJNS3_IKhLm64EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm16EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm128EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm2EEETpTkNS0_14spanable_rangeEJNS3_ItLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm1EEETpTkNS0_14spanable_rangeEJS4_EEEvRKT_DpRKT0_QgtsZT0_Li0E
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJS4_EEEvRKT_DpRKT0_QgtsZT0_Li0E
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm4EEETpTkNS0_14spanable_rangeEJNS3_IjLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm1EEETpTkNS0_14spanable_rangeEJNS3_IhLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
24.4k
{
131
24.4k
   const std::span s0{r0};
132
133
24.4k
   if constexpr(statically_spanable_range<R0>) {
134
24.4k
      constexpr size_t expected_size = s0.size_bytes();
135
24.4k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
24.4k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm2EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm16EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
475
{
131
475
   const std::span s0{r0};
132
133
475
   if constexpr(statically_spanable_range<R0>) {
134
475
      constexpr size_t expected_size = s0.size_bytes();
135
475
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
475
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm16EEETpTkNS0_14spanable_rangeEJNS2_4spanImLm2EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS2_6vectorIhNS_16secure_allocatorIhEEEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
1.62k
{
131
1.62k
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
1.62k
   } else {
137
1.62k
      const size_t expected_size = s0.size_bytes();
138
1.62k
      const bool correct_size =
139
1.62k
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
1.62k
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
1.62k
   }
145
1.62k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm8EEETpTkNS0_14spanable_rangeEJNS3_ImLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
120k
{
131
120k
   const std::span s0{r0};
132
133
120k
   if constexpr(statically_spanable_range<R0>) {
134
120k
      constexpr size_t expected_size = s0.size_bytes();
135
120k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
120k
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanItLm1EEETpTkNS0_14spanable_rangeEJNS3_IKhLm2EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm2EEETpTkNS0_14spanable_rangeEJNS2_4spanIhLm16EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm16EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm2EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm16EEETpTkNS0_14spanable_rangeEJNS2_4spanIKhLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
470
{
131
470
   const std::span s0{r0};
132
133
470
   if constexpr(statically_spanable_range<R0>) {
134
470
      constexpr size_t expected_size = s0.size_bytes();
135
470
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
470
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm16EEETpTkNS0_14spanable_rangeEJS4_EEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
470
{
131
470
   const std::span s0{r0};
132
133
470
   if constexpr(statically_spanable_range<R0>) {
134
470
      constexpr size_t expected_size = s0.size_bytes();
135
470
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
470
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm18446744073709551615EEETpTkNS0_14spanable_rangeEJS4_S4_EEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
432
{
131
432
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
432
   } else {
137
432
      const size_t expected_size = s0.size_bytes();
138
432
      const bool correct_size =
139
864
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
432
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
432
   }
145
432
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm16EEETpTkNS0_14spanable_rangeEJNS3_ImLm2EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
872
{
131
872
   const std::span s0{r0};
132
133
872
   if constexpr(statically_spanable_range<R0>) {
134
872
      constexpr size_t expected_size = s0.size_bytes();
135
872
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
872
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm18446744073709551615EEETpTkNS0_14spanable_rangeEJNS3_IKmLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
25.6k
{
131
25.6k
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
25.6k
   } else {
137
25.6k
      const size_t expected_size = s0.size_bytes();
138
25.6k
      const bool correct_size =
139
25.6k
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
25.6k
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
25.6k
   }
145
25.6k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorImNS_16secure_allocatorImEEEETpTkNS0_14spanable_rangeEJNS2_4spanImLm18446744073709551615EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
1.82M
{
131
1.82M
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
1.82M
   } else {
137
1.82M
      const size_t expected_size = s0.size_bytes();
138
1.82M
      const bool correct_size =
139
1.82M
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
1.82M
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
1.82M
   }
145
1.82M
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm4EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
15.5k
{
131
15.5k
   const std::span s0{r0};
132
133
15.5k
   if constexpr(statically_spanable_range<R0>) {
134
15.5k
      constexpr size_t expected_size = s0.size_bytes();
135
15.5k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
15.5k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEETpTkNS0_14spanable_rangeEJA8_mEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
2.17k
{
131
2.17k
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
2.17k
   } else {
137
2.17k
      const size_t expected_size = s0.size_bytes();
138
2.17k
      const bool correct_size =
139
2.17k
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
2.17k
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
2.17k
   }
145
2.17k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm32EEETpTkNS0_14spanable_rangeEJNS3_IKhLm32EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
96
{
131
96
   const std::span s0{r0};
132
133
96
   if constexpr(statically_spanable_range<R0>) {
134
96
      constexpr size_t expected_size = s0.size_bytes();
135
96
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
96
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm4EEETpTkNS0_14spanable_rangeEJNS2_4spanImLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm1EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm1EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm6EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm6EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
6.62k
{
131
6.62k
   const std::span s0{r0};
132
133
6.62k
   if constexpr(statically_spanable_range<R0>) {
134
6.62k
      constexpr size_t expected_size = s0.size_bytes();
135
6.62k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
6.62k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm48EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm6EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
7.04k
{
131
7.04k
   const std::span s0{r0};
132
133
7.04k
   if constexpr(statically_spanable_range<R0>) {
134
7.04k
      constexpr size_t expected_size = s0.size_bytes();
135
7.04k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
7.04k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEETpTkNS0_14spanable_rangeEJA12_mEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
636
{
131
636
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
636
   } else {
137
636
      const size_t expected_size = s0.size_bytes();
138
636
      const bool correct_size =
139
636
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
636
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
636
   }
145
636
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm48EEETpTkNS0_14spanable_rangeEJNS3_IKhLm48EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
35
{
131
35
   const std::span s0{r0};
132
133
35
   if constexpr(statically_spanable_range<R0>) {
134
35
      constexpr size_t expected_size = s0.size_bytes();
135
35
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
35
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm6EEETpTkNS0_14spanable_rangeEJNS2_4spanImLm6EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm8EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
4.64k
{
131
4.64k
   const std::span s0{r0};
132
133
4.64k
   if constexpr(statically_spanable_range<R0>) {
134
4.64k
      constexpr size_t expected_size = s0.size_bytes();
135
4.64k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
4.64k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm64EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
3.52k
{
131
3.52k
   const std::span s0{r0};
132
133
3.52k
   if constexpr(statically_spanable_range<R0>) {
134
3.52k
      constexpr size_t expected_size = s0.size_bytes();
135
3.52k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
3.52k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEETpTkNS0_14spanable_rangeEJA16_mEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
271
{
131
271
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
271
   } else {
137
271
      const size_t expected_size = s0.size_bytes();
138
271
      const bool correct_size =
139
271
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
271
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
271
   }
145
271
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm64EEETpTkNS0_14spanable_rangeEJNS3_IKhLm64EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
14
{
131
14
   const std::span s0{r0};
132
133
14
   if constexpr(statically_spanable_range<R0>) {
134
14
      constexpr size_t expected_size = s0.size_bytes();
135
14
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
14
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm8EEETpTkNS0_14spanable_rangeEJNS2_4spanImLm8EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm9EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm9EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
10.6k
{
131
10.6k
   const std::span s0{r0};
132
133
10.6k
   if constexpr(statically_spanable_range<R0>) {
134
10.6k
      constexpr size_t expected_size = s0.size_bytes();
135
10.6k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
10.6k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm18EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
733
{
131
733
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
733
   } else {
137
733
      const size_t expected_size = s0.size_bytes();
138
733
      const bool correct_size =
139
733
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
733
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
733
   }
145
733
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm72EEETpTkNS0_14spanable_rangeEJNS3_ImLm9EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
10.0k
{
131
10.0k
   const std::span s0{r0};
132
133
10.0k
   if constexpr(statically_spanable_range<R0>) {
134
10.0k
      constexpr size_t expected_size = s0.size_bytes();
135
10.0k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
10.0k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanImLm3EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm3EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
2.31k
{
131
2.31k
   const std::span s0{r0};
132
133
2.31k
   if constexpr(statically_spanable_range<R0>) {
134
2.31k
      constexpr size_t expected_size = s0.size_bytes();
135
2.31k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
2.31k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm24EEETpTkNS0_14spanable_rangeEJNS2_5arrayImLm3EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
4.26k
{
131
4.26k
   const std::span s0{r0};
132
133
4.26k
   if constexpr(statically_spanable_range<R0>) {
134
4.26k
      constexpr size_t expected_size = s0.size_bytes();
135
4.26k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
4.26k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEETpTkNS0_14spanable_rangeEJA6_mEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
444
{
131
444
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
444
   } else {
137
444
      const size_t expected_size = s0.size_bytes();
138
444
      const bool correct_size =
139
444
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
444
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
444
   }
145
444
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm24EEETpTkNS0_14spanable_rangeEJNS3_IKhLm24EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
15
{
131
15
   const std::span s0{r0};
132
133
15
   if constexpr(statically_spanable_range<R0>) {
134
15
      constexpr size_t expected_size = s0.size_bytes();
135
15
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
15
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm3EEETpTkNS0_14spanable_rangeEJNS2_4spanImLm3EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayIhLm32EEETpTkNS0_14spanable_rangeEJNS3_ImLm4EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
3.49k
{
131
3.49k
   const std::span s0{r0};
132
133
3.49k
   if constexpr(statically_spanable_range<R0>) {
134
3.49k
      constexpr size_t expected_size = s0.size_bytes();
135
3.49k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
3.49k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm28EEETpTkNS0_14spanable_rangeEJNS3_IKhLm28EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
3.50k
{
131
3.50k
   const std::span s0{r0};
132
133
3.50k
   if constexpr(statically_spanable_range<R0>) {
134
3.50k
      constexpr size_t expected_size = s0.size_bytes();
135
3.50k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
3.50k
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm72EEETpTkNS0_14spanable_rangeEJNS3_IKhLm72EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm66EEETpTkNS0_14spanable_rangeEJNS3_IKhLm66EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
3.26k
{
131
3.26k
   const std::span s0{r0};
132
133
3.26k
   if constexpr(statically_spanable_range<R0>) {
134
3.26k
      constexpr size_t expected_size = s0.size_bytes();
135
3.26k
      (assert_exact_byte_length<expected_size>(rs), ...);
136
   } else {
137
      const size_t expected_size = s0.size_bytes();
138
      const bool correct_size =
139
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
      if(!correct_size) {
142
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
      }
144
   }
145
3.26k
}
_ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__16vectorIhNS2_9allocatorIhEEEETpTkNS0_14spanable_rangeEJA18_mEEEvRKT_DpRKT0_QgtsZT0_Li0E
Line
Count
Source
130
290
{
131
290
   const std::span s0{r0};
132
133
   if constexpr(statically_spanable_range<R0>) {
134
      constexpr size_t expected_size = s0.size_bytes();
135
      (assert_exact_byte_length<expected_size>(rs), ...);
136
290
   } else {
137
290
      const size_t expected_size = s0.size_bytes();
138
290
      const bool correct_size =
139
290
         ((std::span<const std::ranges::range_value_t<Rs>>{rs}.size_bytes() == expected_size) && ...);
140
141
290
      if(!correct_size) {
142
0
         throw Invalid_Argument("Memory regions did not have equal lengths");
143
0
      }
144
290
   }
145
290
}
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__14spanIhLm98EEETpTkNS0_14spanable_rangeEJNS3_IKhLm98EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
Unexecuted instantiation: _ZN5Botan6ranges25assert_equal_byte_lengthsITkNS0_14spanable_rangeENSt3__15arrayImLm9EEETpTkNS0_14spanable_rangeEJNS2_4spanImLm9EEEEEEvRKT_DpRKT0_QgtsZT0_Li0E
146
147
}  // namespace ranges
148
149
namespace concepts {
150
151
// TODO: C++20 provides concepts like std::ranges::range or ::sized_range
152
//       but at the time of this writing clang had not caught up on all
153
//       platforms. E.g. clang 14 on Xcode does not support ranges properly.
154
155
template <typename IterT, typename ContainerT>
156
concept container_iterator =
157
   std::same_as<IterT, typename ContainerT::iterator> || std::same_as<IterT, typename ContainerT::const_iterator>;
158
159
template <typename PtrT, typename ContainerT>
160
concept container_pointer =
161
   std::same_as<PtrT, typename ContainerT::pointer> || std::same_as<PtrT, typename ContainerT::const_pointer>;
162
163
template <typename T>
164
concept container = requires(T a) {
165
   { a.begin() } -> container_iterator<T>;
166
   { a.end() } -> container_iterator<T>;
167
   { a.cbegin() } -> container_iterator<T>;
168
   { a.cend() } -> container_iterator<T>;
169
   { a.size() } -> std::same_as<typename T::size_type>;
170
   typename T::value_type;
171
};
172
173
template <typename T>
174
concept contiguous_container = container<T> && requires(T a) {
175
   { a.data() } -> container_pointer<T>;
176
};
177
178
template <typename T>
179
concept has_empty = requires(T a) {
180
   { a.empty() } -> std::same_as<bool>;
181
};
182
183
// clang-format off
184
template <typename T>
185
concept has_bounds_checked_accessors = container<T> && (
186
                                          requires(T a, const T ac, typename T::size_type s) {
187
                                             { a.at(s) } -> std::same_as<typename T::value_type&>;
188
                                             { ac.at(s) } -> std::same_as<const typename T::value_type&>;
189
                                          } ||
190
                                          requires(T a, const T ac, typename T::key_type k) {
191
                                             { a.at(k) } -> std::same_as<typename T::mapped_type&>;
192
                                             { ac.at(k) } -> std::same_as<const typename T::mapped_type&>;
193
                                          });
194
// clang-format on
195
196
template <typename T>
197
concept resizable_container = container<T> && requires(T& c, typename T::size_type s) {
198
   T(s);
199
   c.resize(s);
200
};
201
202
template <typename T>
203
concept reservable_container = container<T> && requires(T& c, typename T::size_type s) { c.reserve(s); };
204
205
template <typename T>
206
concept resizable_byte_buffer =
207
   contiguous_container<T> && resizable_container<T> && std::same_as<typename T::value_type, uint8_t>;
208
209
template <typename T>
210
concept streamable = requires(std::ostream& os, T a) { os << a; };
211
212
template <class T>
213
concept strong_type = is_strong_type_v<T>;
214
215
template <class T>
216
concept contiguous_strong_type = strong_type<T> && contiguous_container<T>;
217
218
template <class T>
219
concept integral_strong_type = strong_type<T> && std::integral<typename T::wrapped_type>;
220
221
template <class T>
222
concept unsigned_integral_strong_type = strong_type<T> && std::unsigned_integral<typename T::wrapped_type>;
223
224
template <typename T, typename Capability>
225
concept strong_type_with_capability = T::template has_capability<Capability>();
226
227
}  // namespace concepts
228
229
}  // namespace Botan
230
231
#endif