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 99#include < string>
1010#include < iterator>
1111#include < iosfwd>
12+ #include < memory>
1213#if __has_include(<charconv>)
1314#include < charconv>
1415#endif
@@ -71,11 +72,19 @@ template <size_t Id, typename Name = void> struct captured_content {
7172 if constexpr (std::is_same_v<Iterator, utf8_iterator>) {
7273 return _begin.ptr ;
7374 } else {
75+ #if __cpp_lib_to_address >= 201711L
76+ return std::to_address (_begin);
77+ #else
7478 return &*_begin;
79+ #endif
7580 }
7681 #else
82+ #if __cpp_lib_to_address >= 201711L
83+ return std::to_address (_begin);
84+ #else
7785 return &*_begin;
7886 #endif
87+ #endif
7988 }
8089
8190 constexpr CTRE_FORCE_INLINE const auto * data () const noexcept {
Original file line number Diff line number Diff line change @@ -240,6 +240,7 @@ Software.
240240#include <cstddef>
241241#include <string_view>
242242#include <cstdint>
243+ #include <memory>
243244
244245namespace ctll {
245246
@@ -2978,11 +2979,19 @@ template <size_t Id, typename Name = void> struct captured_content {
29782979 if constexpr (std::is_same_v<Iterator, utf8_iterator>) {
29792980 return _begin.ptr;
29802981 } else {
2982+ #if __cpp_lib_to_address >= 201711L
2983+ return std::to_address(_begin);
2984+ #else
29812985 return &*_begin;
2986+ #endif
29822987 }
29832988 #else
2989+ #if __cpp_lib_to_address >= 201711L
2990+ return std::to_address(_begin);
2991+ #else
29842992 return &*_begin;
29852993 #endif
2994+ #endif
29862995 }
29872996
29882997 constexpr CTRE_FORCE_INLINE const auto * data() const noexcept {
Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ Software.
237237#include < cstddef>
238238#include < string_view>
239239#include < cstdint>
240+ #include < memory>
240241
241242namespace ctll {
242243
@@ -2975,11 +2976,19 @@ template <size_t Id, typename Name = void> struct captured_content {
29752976 if constexpr (std::is_same_v<Iterator, utf8_iterator>) {
29762977 return _begin.ptr ;
29772978 } else {
2979+ #if __cpp_lib_to_address >= 201711L
2980+ return std::to_address (_begin);
2981+ #else
29782982 return &*_begin;
2983+ #endif
29792984 }
29802985 #else
2986+ #if __cpp_lib_to_address >= 201711L
2987+ return std::to_address (_begin);
2988+ #else
29812989 return &*_begin;
29822990 #endif
2991+ #endif
29832992 }
29842993
29852994 constexpr CTRE_FORCE_INLINE const auto * data () const noexcept {
You can’t perform that action at this time.
0 commit comments