File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 9
9
#include < string>
10
10
#include < iterator>
11
11
#include < iosfwd>
12
+ #include < memory>
12
13
#if __has_include(<charconv>)
13
14
#include < charconv>
14
15
#endif
@@ -71,11 +72,19 @@ template <size_t Id, typename Name = void> struct captured_content {
71
72
if constexpr (std::is_same_v<Iterator, utf8_iterator>) {
72
73
return _begin.ptr ;
73
74
} else {
75
+ #if __cpp_lib_to_address >= 201711L
76
+ return std::to_address (_begin);
77
+ #else
74
78
return &*_begin;
79
+ #endif
75
80
}
76
81
#else
82
+ #if __cpp_lib_to_address >= 201711L
83
+ return std::to_address (_begin);
84
+ #else
77
85
return &*_begin;
78
86
#endif
87
+ #endif
79
88
}
80
89
81
90
constexpr CTRE_FORCE_INLINE const auto * data () const noexcept {
Original file line number Diff line number Diff line change @@ -240,6 +240,7 @@ Software.
240
240
#include <cstddef>
241
241
#include <string_view>
242
242
#include <cstdint>
243
+ #include <memory>
243
244
244
245
namespace ctll {
245
246
@@ -2978,11 +2979,19 @@ template <size_t Id, typename Name = void> struct captured_content {
2978
2979
if constexpr (std::is_same_v<Iterator, utf8_iterator>) {
2979
2980
return _begin.ptr;
2980
2981
} else {
2982
+ #if __cpp_lib_to_address >= 201711L
2983
+ return std::to_address(_begin);
2984
+ #else
2981
2985
return &*_begin;
2986
+ #endif
2982
2987
}
2983
2988
#else
2989
+ #if __cpp_lib_to_address >= 201711L
2990
+ return std::to_address(_begin);
2991
+ #else
2984
2992
return &*_begin;
2985
2993
#endif
2994
+ #endif
2986
2995
}
2987
2996
2988
2997
constexpr CTRE_FORCE_INLINE const auto * data() const noexcept {
Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ Software.
237
237
#include < cstddef>
238
238
#include < string_view>
239
239
#include < cstdint>
240
+ #include < memory>
240
241
241
242
namespace ctll {
242
243
@@ -2975,11 +2976,19 @@ template <size_t Id, typename Name = void> struct captured_content {
2975
2976
if constexpr (std::is_same_v<Iterator, utf8_iterator>) {
2976
2977
return _begin.ptr ;
2977
2978
} else {
2979
+ #if __cpp_lib_to_address >= 201711L
2980
+ return std::to_address (_begin);
2981
+ #else
2978
2982
return &*_begin;
2983
+ #endif
2979
2984
}
2980
2985
#else
2986
+ #if __cpp_lib_to_address >= 201711L
2987
+ return std::to_address (_begin);
2988
+ #else
2981
2989
return &*_begin;
2982
2990
#endif
2991
+ #endif
2983
2992
}
2984
2993
2985
2994
constexpr CTRE_FORCE_INLINE const auto * data () const noexcept {
You can’t perform that action at this time.
0 commit comments