PMDK C++ bindings 1.13.0
This is the C++ bindings documentation for PMDK's libpmemobj.
string_view.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2/* Copyright 2020, Intel Corporation */
3
9#ifndef LIBPMEMOBJ_CPP_STRING_VIEW
10#define LIBPMEMOBJ_CPP_STRING_VIEW
11
12#include <algorithm>
13#include <limits>
14#include <stdexcept>
15#include <string>
16#include <utility>
17
18#if __cpp_lib_string_view
19#include <string_view>
20#endif
21
22namespace pmem
23{
24
25namespace obj
26{
27
28#if __cpp_lib_string_view
29
30template <typename CharT, typename Traits = std::char_traits<CharT>>
31using basic_string_view = std::basic_string_view<CharT, Traits>;
32using string_view = std::string_view;
33using wstring_view = std::basic_string_view<wchar_t>;
34using u16string_view = std::basic_string_view<char16_t>;
35using u32string_view = std::basic_string_view<char32_t>;
36
37#else
38
45template <typename CharT, typename Traits = std::char_traits<CharT>>
47public:
48 /* Member types */
49 using traits_type = Traits;
50 using value_type = CharT;
51 using size_type = std::size_t;
52 using difference_type = std::ptrdiff_t;
53 using reference = value_type &;
54 using const_reference = const value_type &;
55 using pointer = value_type *;
56 using const_pointer = const value_type *;
57 using const_iterator = const_pointer;
58 using iterator = const_iterator;
59 using reverse_iterator = std::reverse_iterator<const_iterator>;
60 using const_reverse_iterator = std::reverse_iterator<const_iterator>;
61
62 static constexpr const size_type npos =
63 (std::numeric_limits<size_type>::max)();
64
65 constexpr basic_string_view() noexcept;
66 constexpr basic_string_view(const CharT *data, size_type size);
67 constexpr basic_string_view(const std::basic_string<CharT, Traits> &s);
68 constexpr basic_string_view(const CharT *data);
69
70 constexpr basic_string_view(const basic_string_view &rhs) noexcept =
71 default;
73 operator=(const basic_string_view &rhs) noexcept = default;
74
75 constexpr const_iterator begin() const noexcept;
76 constexpr const_iterator cbegin() const noexcept;
77 constexpr const_iterator end() const noexcept;
78 constexpr const_iterator cend() const noexcept;
79 constexpr const_reverse_iterator rbegin() const noexcept;
80 constexpr const_reverse_iterator crbegin() const noexcept;
81 constexpr const_reverse_iterator rend() const noexcept;
82 constexpr const_reverse_iterator crend() const noexcept;
83
84 constexpr const CharT *data() const noexcept;
85 constexpr size_type size() const noexcept;
86 constexpr size_type length() const noexcept;
87 constexpr bool empty() const noexcept;
88 constexpr size_type max_size() const noexcept;
89
90 const CharT &at(size_type pos) const;
91 constexpr const CharT &operator[](size_type pos) const noexcept;
92 constexpr const_reference front() const noexcept;
93 constexpr const_reference back() const noexcept;
94
95 void remove_prefix(size_type n);
96 void remove_suffix(size_type n);
97 void swap(basic_string_view &v) noexcept;
98
99 constexpr basic_string_view substr(size_type pos = 0,
100 size_type count = npos) const;
101 size_type copy(CharT *dest, size_type count, size_type pos = 0) const;
102 inline int compare(size_type pos1, size_type n1,
103 basic_string_view sv) const;
104 inline int compare(size_type pos1, size_type n1, basic_string_view sv,
105 size_type pos2, size_type n2) const;
106 inline int compare(const CharT *s) const noexcept;
107 inline int compare(size_type pos1, size_type n1, const CharT *s) const;
108 inline int compare(size_type pos1, size_type n1, const CharT *s,
109 size_type n2) const;
110 int compare(const basic_string_view &other) const noexcept;
111
112 size_type find(basic_string_view str, size_type pos = 0) const noexcept;
113 size_type find(CharT ch, size_type pos = 0) const noexcept;
114 size_type find(const CharT *s, size_type pos = 0) const;
115 size_type find(const CharT *s, size_type pos, size_type count) const;
116
117 size_type rfind(basic_string_view str, size_type pos = npos) const
118 noexcept;
119 size_type rfind(const CharT *s, size_type pos, size_type count) const;
120 size_type rfind(const CharT *s, size_type pos = npos) const;
121 size_type rfind(CharT ch, size_type pos = npos) const noexcept;
122 size_type find_first_of(basic_string_view str, size_type pos = 0) const
123 noexcept;
124 size_type find_first_of(const CharT *s, size_type pos,
125 size_type count) const;
126 size_type find_first_of(const CharT *s, size_type pos = 0) const;
127 size_type find_first_of(CharT ch, size_type pos = 0) const noexcept;
129 size_type pos = 0) const noexcept;
130 size_type find_first_not_of(const CharT *s, size_type pos,
131 size_type count) const;
132 size_type find_first_not_of(const CharT *s, size_type pos = 0) const;
133 size_type find_first_not_of(CharT ch, size_type pos = 0) const noexcept;
135 size_type pos = npos) const noexcept;
136 size_type find_last_of(const CharT *s, size_type pos,
137 size_type count) const;
138 size_type find_last_of(const CharT *s, size_type pos = npos) const;
139 size_type find_last_of(CharT ch, size_type pos = npos) const noexcept;
141 size_type pos = npos) const noexcept;
142 size_type find_last_not_of(const CharT *s, size_type pos,
143 size_type count) const;
144 size_type find_last_not_of(const CharT *s, size_type pos = npos) const;
145 size_type find_last_not_of(CharT ch, size_type pos = npos) const
146 noexcept;
147
148private:
149 const value_type *data_;
150 size_type size_;
151};
152
153using string_view = basic_string_view<char>;
154using wstring_view = basic_string_view<wchar_t>;
155using u16string_view = basic_string_view<char16_t>;
156using u32string_view = basic_string_view<char32_t>;
157
161template <typename CharT, typename Traits>
162constexpr inline basic_string_view<CharT, Traits>::basic_string_view() noexcept
163 : data_(nullptr), size_(0)
164{
165}
166
174template <typename CharT, typename Traits>
176 const CharT *data, size_type size)
177 : data_(data), size_(size)
178{
179}
180
186template <typename CharT, typename Traits>
188 const std::basic_string<CharT, Traits> &s)
189 : data_(s.c_str()), size_(s.size())
190{
191}
192
200template <typename CharT, typename Traits>
202 const CharT *data)
203 : data_(data), size_(Traits::length(data))
204{
205}
206
212template <typename CharT, typename Traits>
215{
216 return cbegin();
217}
218
224template <typename CharT, typename Traits>
227{
228 return data_;
229}
230
238template <typename CharT, typename Traits>
241{
242 return cend();
243}
244
252template <typename CharT, typename Traits>
255{
256 return data_ + size_;
257}
258
259template <typename CharT, typename Traits>
262{
263 return reverse_iterator(cend());
264}
265
266template <typename CharT, typename Traits>
267constexpr typename basic_string_view<CharT, Traits>::const_reverse_iterator
269{
270 return reverse_iterator(cend());
271}
272
273template <typename CharT, typename Traits>
274constexpr typename basic_string_view<CharT, Traits>::const_reverse_iterator
276{
277 return reverse_iterator(cbegin());
278}
279
280template <typename CharT, typename Traits>
281constexpr typename basic_string_view<CharT, Traits>::const_reverse_iterator
283{
284 return reverse_iterator(cbegin());
285}
286
294template <typename CharT, typename Traits>
295constexpr inline const CharT *
297{
298 return data_;
299}
300
306template <typename CharT, typename Traits>
307constexpr inline bool
309{
310 return size() == 0;
311}
312
319template <typename CharT, typename Traits>
320constexpr inline typename basic_string_view<CharT, Traits>::size_type
322{
323 return (std::numeric_limits<size_type>::max)();
324}
325
332template <typename CharT, typename Traits>
333constexpr inline typename basic_string_view<CharT, Traits>::size_type
335{
336 return size_;
337}
338
344template <typename CharT, typename Traits>
345constexpr inline typename basic_string_view<CharT, Traits>::size_type
347{
348 return size_;
349}
350
356template <typename CharT, typename Traits>
357constexpr inline const CharT &
359{
360 return data()[pos];
361}
362
371template <typename CharT, typename Traits>
372inline const CharT &
374{
375 if (pos >= size())
376 throw std::out_of_range("Accessing a position out of bounds!");
377 return data()[pos];
378}
379
386template <typename CharT, typename Traits>
387constexpr inline const CharT &
389{
390 return operator[](size() - 1);
391}
392
399template <typename CharT, typename Traits>
400constexpr inline const CharT &
402{
403 return operator[](0);
404}
405
412template <typename CharT, typename Traits>
413void
415{
416 data_ += n;
417 size_ -= n;
418}
419
426template <typename CharT, typename Traits>
427void
429{
430 size_ -= n;
431}
432
438template <typename CharT, typename Traits>
439void
442{
443 std::swap(data_, v.data_);
444 std::swap(size_, v.size_);
445}
446
447/*
448 * Finds the first substring equal to str.
449 *
450 * @param[in] str string to search for
451 * @param[in] pos position at which to start the search
452 *
453 * @return Position of the first character of the found substring or
454 * npos if no such substring is found.
455 */
456template <typename CharT, typename Traits>
459 size_type pos) const noexcept
460{
461 return find(str.data(), pos, str.size());
462}
463
473template <typename CharT, typename Traits>
474typename basic_string_view<CharT, Traits>::size_type
475basic_string_view<CharT, Traits>::find(CharT ch, size_type pos) const noexcept
476{
477 return find(&ch, pos, 1);
478}
479
491template <typename CharT, typename Traits>
493basic_string_view<CharT, Traits>::find(const CharT *s, size_type pos,
494 size_type count) const
495{
496 auto sz = size();
497
498 if (pos > sz)
499 return npos;
500
501 if (count == 0)
502 return pos;
503
504 while (pos + count <= sz) {
505 auto found = traits_type::find(data() + pos, sz - pos, s[0]);
506 if (!found)
507 return npos;
508 pos = static_cast<size_type>(std::distance(data(), found));
509 if (traits_type::compare(found, s, count) == 0) {
510 return pos;
511 }
512 ++pos;
513 }
514 return npos;
515}
516
527template <typename CharT, typename Traits>
529basic_string_view<CharT, Traits>::find(const CharT *s, size_type pos) const
530{
531 return find(s, pos, traits_type::length(s));
532}
533
544template <typename CharT, typename Traits>
547 size_type pos) const noexcept
548{
549 return rfind(str.data(), pos, str.size());
550}
551
568template <typename CharT, typename Traits>
570basic_string_view<CharT, Traits>::rfind(const CharT *s, size_type pos,
571 size_type count) const
572{
573 if (count <= size()) {
574 pos = (std::min)(size() - count, pos);
575 do {
576 if (traits_type::compare(data() + pos, s, count) == 0)
577 return pos;
578 } while (pos-- > 0);
579 }
580 return npos;
581}
582
595template <typename CharT, typename Traits>
597basic_string_view<CharT, Traits>::rfind(const CharT *s, size_type pos) const
598{
599 return rfind(s, pos, traits_type::length(s));
600}
601
613template <typename CharT, typename Traits>
615basic_string_view<CharT, Traits>::rfind(CharT ch, size_type pos) const noexcept
616{
617 return rfind(&ch, pos, 1);
618}
619
629template <typename CharT, typename Traits>
632 size_type pos) const noexcept
633{
634 return find_first_of(str.data(), pos, str.size());
635}
636
650template <typename CharT, typename Traits>
653 size_type count) const
654{
655 size_type first_of = npos;
656 for (const CharT *c = s; c != s + count; ++c) {
657 size_type found = find(*c, pos);
658 if (found != npos && found < first_of)
659 first_of = found;
660 }
661 return first_of;
662}
663
676template <typename CharT, typename Traits>
679 size_type pos) const
680{
681 return find_first_of(s, pos, traits_type::length(s));
682}
683
693template <typename CharT, typename Traits>
696 noexcept
697{
698 return find(ch, pos);
699}
700
710template <typename CharT, typename Traits>
713 size_type pos) const
714 noexcept
715{
716 return find_first_not_of(str.data(), pos, str.size());
717}
718
732template <typename CharT, typename Traits>
735 size_type pos,
736 size_type count) const
737{
738 if (pos >= size())
739 return npos;
740
741 for (auto it = cbegin() + pos; it != cend(); ++it)
742 if (!traits_type::find(s, count, *it))
743 return static_cast<size_type>(
744 std::distance(cbegin(), it));
745 return npos;
746}
747
760template <typename CharT, typename Traits>
763 size_type pos) const
764{
765 return find_first_not_of(s, pos, traits_type::length(s));
766}
767
777template <typename CharT, typename Traits>
780 size_type pos) const
781 noexcept
782{
783 return find_first_not_of(&ch, pos, 1);
784}
785
795template <typename CharT, typename Traits>
798 size_type pos) const noexcept
799{
800 return find_last_of(str.data(), pos, str.size());
801}
802
816template <typename CharT, typename Traits>
819 size_type count) const
820{
821 if (size() == 0 || count == 0)
822 return npos;
823
824 bool found = false;
825 size_type last_of = 0;
826 for (const CharT *c = s; c != s + count; ++c) {
827 size_type position = rfind(*c, pos);
828 if (position != npos) {
829 found = true;
830 if (position > last_of)
831 last_of = position;
832 }
833 }
834 if (!found)
835 return npos;
836 return last_of;
837}
838
851template <typename CharT, typename Traits>
854 size_type pos) const
855{
856 return find_last_of(s, pos, traits_type::length(s));
857}
858
868template <typename CharT, typename Traits>
871 noexcept
872{
873 return rfind(ch, pos);
874}
875
885template <typename CharT, typename Traits>
888 size_type pos) const noexcept
889{
890 return find_last_not_of(str.data(), pos, str.size());
891}
892
906template <typename CharT, typename Traits>
909 size_type pos,
910 size_type count) const
911{
912 if (size() > 0) {
913 pos = (std::min)(pos, size() - 1);
914 do {
915 if (!traits_type::find(s, count, *(data() + pos)))
916 return pos;
917
918 } while (pos-- > 0);
919 }
920 return npos;
921}
922
935template <typename CharT, typename Traits>
938 size_type pos) const
939{
940 return find_last_not_of(s, pos, traits_type::length(s));
941}
942
952template <typename CharT, typename Traits>
955 size_type pos) const noexcept
956{
957 return find_last_not_of(&ch, pos, 1);
958}
959
971template <typename CharT, typename Traits>
973basic_string_view<CharT, Traits>::substr(size_type pos, size_type count) const
974{
975 return pos > size()
976 ? throw std::out_of_range("string_view::substr")
977 : basic_string_view(data() + pos,
978 (std::min)(count, size() - pos));
979}
980
993template <typename CharT, typename Traits>
995basic_string_view<CharT, Traits>::copy(CharT *dest, size_type count,
996 size_type pos) const
997{
998 if (pos > size())
999 throw std::out_of_range("string_view::copy");
1000 size_type rlen = (std::min)(count, size() - pos);
1001 Traits::copy(dest, data() + pos, rlen);
1002 return rlen;
1003}
1004
1016template <typename CharT, typename Traits>
1017inline int
1019 basic_string_view sv) const
1020{
1021 return substr(pos1, n1).compare(sv);
1022}
1023
1037template <typename CharT, typename Traits>
1038inline int
1040 basic_string_view sv, size_type pos2,
1041 size_type n2) const
1042{
1043 return substr(pos1, n1).compare(sv.substr(pos2, n2));
1044}
1045
1055template <typename CharT, typename Traits>
1056inline int
1057basic_string_view<CharT, Traits>::compare(const CharT *s) const noexcept
1058{
1059 return compare(basic_string_view(s));
1060}
1061
1073template <typename CharT, typename Traits>
1074inline int
1076 const CharT *s) const
1077{
1078 return substr(pos1, n1).compare(basic_string_view(s));
1079}
1080
1093template <typename CharT, typename Traits>
1094inline int
1096 const CharT *s, size_type n2) const
1097{
1098 return substr(pos1, n1).compare(basic_string_view(s, n2));
1099}
1100
1109template <typename CharT, typename Traits>
1110inline int
1112 noexcept
1113{
1114 int ret = Traits::compare(data(), other.data(),
1115 (std::min)(size(), other.size()));
1116 if (ret != 0)
1117 return ret;
1118 if (size() < other.size())
1119 return -1;
1120 if (size() > other.size())
1121 return 1;
1122 return 0;
1123}
1124
1128template <class CharT, class Traits>
1129constexpr bool
1132{
1133 return (lhs.size() != rhs.size() ? false : lhs.compare(rhs) == 0);
1134}
1135
1139template <class CharT, class Traits>
1140constexpr bool
1143 typename std::common_type<basic_string_view<CharT, Traits>>::type rhs)
1144{
1145 return (lhs.size() != rhs.size() ? false : lhs.compare(rhs) == 0);
1146}
1147
1151template <class CharT, class Traits>
1152constexpr bool
1154 typename std::common_type<basic_string_view<CharT, Traits>>::type lhs,
1156{
1157 return (lhs.size() != rhs.size() ? false : lhs.compare(rhs) == 0);
1158}
1159
1163template <class CharT, class Traits>
1164constexpr bool
1167{
1168 return (lhs.size() != rhs.size() ? true : lhs.compare(rhs) != 0);
1169}
1170
1174template <class CharT, class Traits>
1175constexpr bool
1177 typename std::common_type<basic_string_view<CharT, Traits>>::type lhs,
1179{
1180 return (lhs.size() != rhs.size() ? true : lhs.compare(rhs) != 0);
1181}
1182
1186template <class CharT, class Traits>
1187constexpr bool
1190 typename std::common_type<basic_string_view<CharT, Traits>>::type rhs)
1191{
1192 return (lhs.size() != rhs.size() ? true : lhs.compare(rhs) != 0);
1193}
1194
1198template <class CharT, class Traits>
1199constexpr bool
1202{
1203 return lhs.compare(rhs) < 0;
1204}
1205
1209template <class CharT, class Traits>
1210constexpr bool
1211operator<(typename std::common_type<basic_string_view<CharT, Traits>>::type lhs,
1213{
1214 return lhs.compare(rhs) < 0;
1215}
1216
1220template <class CharT, class Traits>
1221constexpr bool
1223 typename std::common_type<basic_string_view<CharT, Traits>>::type rhs)
1224{
1225 return lhs.compare(rhs) < 0;
1226}
1227
1231template <class CharT, class Traits>
1232constexpr bool
1235{
1236 return lhs.compare(rhs) <= 0;
1237}
1238
1242template <class CharT, class Traits>
1243constexpr bool
1246 typename std::common_type<basic_string_view<CharT, Traits>>::type rhs)
1247{
1248 return lhs.compare(rhs) <= 0;
1249}
1250
1254template <class CharT, class Traits>
1255constexpr bool
1257 typename std::common_type<basic_string_view<CharT, Traits>>::type lhs,
1259{
1260 return lhs.compare(rhs) <= 0;
1261}
1262
1266template <class CharT, class Traits>
1267constexpr bool
1270{
1271 return lhs.compare(rhs) > 0;
1272}
1273
1277template <class CharT, class Traits>
1278constexpr bool
1279operator>(typename std::common_type<basic_string_view<CharT, Traits>>::type lhs,
1281{
1282 return lhs.compare(rhs) > 0;
1283}
1284
1288template <class CharT, class Traits>
1289constexpr bool
1291 typename std::common_type<basic_string_view<CharT, Traits>>::type rhs)
1292{
1293 return lhs.compare(rhs) > 0;
1294}
1295
1299template <class CharT, class Traits>
1300constexpr bool
1303{
1304 return lhs.compare(rhs) >= 0;
1305}
1306
1310template <class CharT, class Traits>
1311constexpr bool
1313 typename std::common_type<basic_string_view<CharT, Traits>>::type lhs,
1315{
1316 return lhs.compare(rhs) >= 0;
1317}
1318
1322template <class CharT, class Traits>
1323constexpr bool
1326 typename std::common_type<basic_string_view<CharT, Traits>>::type rhs)
1327{
1328 return lhs.compare(rhs) >= 0;
1329}
1330#endif
1331
1332} /* namespace obj */
1333} /* namespace pmem */
1334
1335#endif /* LIBPMEMOBJ_CPP_STRING_VIEW */
Our partial std::string_view implementation.
Definition: string_view.hpp:46
constexpr const_iterator begin() const noexcept
Returns an iterator to the first character of the view.
Definition: string_view.hpp:214
constexpr size_type max_size() const noexcept
Returns the largest possible number of char-like objects that can be referred to by a basic_string_vi...
Definition: string_view.hpp:321
void swap(basic_string_view &v) noexcept
Exchanges the view with that of v.
Definition: string_view.hpp:440
constexpr size_type size() const noexcept
Returns count of characters stored in this pmem::obj::string_view data.
Definition: string_view.hpp:334
void remove_prefix(size_type n)
Moves the start of the view forward by n characters.
Definition: string_view.hpp:414
size_type find_first_not_of(basic_string_view str, size_type pos=0) const noexcept
Finds the first character equal to none of the characters in str.
Definition: string_view.hpp:712
int compare(size_type pos1, size_type n1, basic_string_view sv) const
Compares two character sequences.
Definition: string_view.hpp:1018
constexpr const_iterator cbegin() const noexcept
Returns an iterator to the first character of the view.
Definition: string_view.hpp:226
constexpr size_type length() const noexcept
Returns count of characters stored in this pmem::obj::string_view data.
Definition: string_view.hpp:346
size_type find_last_not_of(basic_string_view str, size_type pos=npos) const noexcept
Finds the last character equal to none of the characters in str.
Definition: string_view.hpp:887
void remove_suffix(size_type n)
Moves the end of the view back by n characters.
Definition: string_view.hpp:428
constexpr bool empty() const noexcept
Returns that view is empty or not.
Definition: string_view.hpp:308
size_type find_last_of(basic_string_view str, size_type pos=npos) const noexcept
Finds the last character equal to any of the characters in str.
Definition: string_view.hpp:797
const CharT & at(size_type pos) const
Returns reference to the character at position.
Definition: string_view.hpp:373
size_type rfind(basic_string_view str, size_type pos=npos) const noexcept
Finds the last substring equal to str.
Definition: string_view.hpp:546
constexpr const_iterator cend() const noexcept
Returns an iterator to the character following the last character of the view.
Definition: string_view.hpp:254
size_type copy(CharT *dest, size_type count, size_type pos=0) const
Copies the substring [pos, pos + rcount) to the character array pointed to by dest,...
Definition: string_view.hpp:995
constexpr basic_string_view substr(size_type pos=0, size_type count=npos) const
Returns a view of the substring [pos, pos + rcount), where rcount is the smaller of count and size() ...
Definition: string_view.hpp:973
constexpr const_reference front() const noexcept
Returns reference to the first character in the view.
Definition: string_view.hpp:401
size_type find_first_of(basic_string_view str, size_type pos=0) const noexcept
Finds the first character equal to any of the characters in str.
Definition: string_view.hpp:631
constexpr const_iterator end() const noexcept
Returns an iterator to the character following the last character of the view.
Definition: string_view.hpp:240
constexpr const_reference back() const noexcept
Returns reference to the last character in the view.
Definition: string_view.hpp:388
constexpr const CharT * data() const noexcept
Returns pointer to data stored in this pmem::obj::string_view.
Definition: string_view.hpp:296
constexpr basic_string_view() noexcept
Default constructor with empty data.
Definition: string_view.hpp:162
pmem::obj::string - persistent container with std::basic_string compatible interface.
Definition: basic_string.hpp:46
pmem::obj::array< T, N >::const_iterator cend(const pmem::obj::array< T, N > &a)
Non-member cend.
Definition: array.hpp:799
pmem::obj::array< T, N >::reverse_iterator rend(pmem::obj::array< T, N > &a)
Non-member rend.
Definition: array.hpp:889
pmem::obj::array< T, N >::iterator end(pmem::obj::array< T, N > &a)
Non-member end.
Definition: array.hpp:849
pmem::obj::array< T, N >::reverse_iterator rbegin(pmem::obj::array< T, N > &a)
Non-member rbegin.
Definition: array.hpp:869
constexpr bool operator<=(typename std::common_type< basic_string_view< CharT, Traits > >::type lhs, basic_string_view< CharT, Traits > rhs)
Non-member less or equal operator.
Definition: string_view.hpp:1256
pmem::obj::array< T, N >::const_reverse_iterator crbegin(const pmem::obj::array< T, N > &a)
Non-member crbegin.
Definition: array.hpp:809
pmem::obj::array< T, N >::const_reverse_iterator crend(const pmem::obj::array< T, N > &a)
Non-member crend.
Definition: array.hpp:819
constexpr bool operator>=(basic_string_view< CharT, Traits > lhs, typename std::common_type< basic_string_view< CharT, Traits > >::type rhs)
Non-member greater or equal operator.
Definition: string_view.hpp:1324
constexpr bool operator==(typename std::common_type< basic_string_view< CharT, Traits > >::type lhs, basic_string_view< CharT, Traits > rhs)
Non-member equal operator.
Definition: string_view.hpp:1153
pmem::obj::array< T, N >::const_iterator cbegin(const pmem::obj::array< T, N > &a)
Non-member cbegin.
Definition: array.hpp:789
constexpr bool operator!=(basic_string_view< CharT, Traits > lhs, typename std::common_type< basic_string_view< CharT, Traits > >::type rhs)
Non-member not equal operator.
Definition: string_view.hpp:1188
constexpr bool operator<(basic_string_view< CharT, Traits > lhs, typename std::common_type< basic_string_view< CharT, Traits > >::type rhs)
Non-member less than operator.
Definition: string_view.hpp:1222
void swap(pmem::obj::array< T, N > &lhs, pmem::obj::array< T, N > &rhs)
Non-member swap function.
Definition: array.hpp:909
constexpr bool operator>(basic_string_view< CharT, Traits > lhs, typename std::common_type< basic_string_view< CharT, Traits > >::type rhs)
Non-member greater than operator.
Definition: string_view.hpp:1290
Persistent memory namespace.
Definition: allocation_flag.hpp:15