Lines Matching refs:std

43   String(const std::string &);
45 String(const char *, std::size_t);
47 String(const char16_t *, std::size_t);
50 static String lossy(const std::string &) noexcept;
52 static String lossy(const char *, std::size_t) noexcept;
54 static String lossy(const char16_t *, std::size_t) noexcept;
59 explicit operator std::string() const;
63 std::size_t size() const noexcept;
64 std::size_t length() const noexcept;
69 std::size_t capacity() const noexcept;
96 String(lossy_t, const char *, std::size_t) noexcept;
97 String(lossy_t, const char16_t *, std::size_t) noexcept;
101 std::array<std::uintptr_t, 3> repr;
112 Str(const std::string &);
114 Str(const char *, std::size_t);
118 explicit operator std::string() const;
122 std::size_t size() const noexcept;
123 std::size_t length() const noexcept;
151 std::array<std::uintptr_t, 2> repr;
172 : private detail::copy_assignable_if<std::is_const<T>::value> {
177 Slice(T *, std::size_t count) noexcept;
183 std::size_t size() const noexcept;
184 std::size_t length() const noexcept;
187 T &operator[](std::size_t n) const noexcept;
188 T &at(std::size_t n) const;
206 friend void sliceInit(void *, const void *, std::size_t) noexcept;
208 friend std::size_t sliceLen(const void *) noexcept;
210 std::array<std::uintptr_t, 2> repr;
216 using iterator_category = std::random_access_iterator_tag;
218 using difference_type = std::ptrdiff_t;
219 using pointer = typename std::add_pointer<T>::type;
220 using reference = typename std::add_lvalue_reference<T>::type;
247 std::size_t stride;
258 typename std::add_pointer<typename std::add_const<T>::type>::type;
259 using pointer = typename std::add_pointer<T>::type;
308 Vec(std::initializer_list<T>);
316 std::size_t size() const noexcept;
320 std::size_t capacity() const noexcept;
322 const T &operator[](std::size_t n) const noexcept;
323 const T &at(std::size_t n) const;
327 T &operator[](std::size_t n) noexcept;
328 T &at(std::size_t n);
332 void reserve(std::size_t new_cap);
337 void truncate(std::size_t len);
356 void reserve_total(std::size_t new_cap) noexcept;
357 void set_len(std::size_t len) noexcept;
363 std::array<std::uintptr_t, 3> repr;
387 class Error final : public std::exception {
402 std::size_t len;
415 std::ostream &operator<<(std::ostream &, const String &);
416 std::ostream &operator<<(std::ostream &, const Str &);
430 std::size_t size_of();
432 std::size_t align_of();
446 // + using IsRelocatable = std::true_type;
451 // + struct rust::IsRelocatable<MyType> : std::true_type {};
455 using u8 = std::uint8_t;
456 using u16 = std::uint16_t;
457 using u32 = std::uint32_t;
458 using u64 = std::uint64_t;
459 using usize = std::size_t; // see static asserts in cxx.cc
460 using i8 = std::int8_t;
461 using i16 = std::int16_t;
462 using i32 = std::int32_t;
463 using i64 = std::int64_t;
497 return (*this->trampoline)(std::forward<Args>(args)..., this->fn);
526 Slice<T>::Slice(T *s, std::size_t count) noexcept {
531 : const_cast<typename std::remove_const<T>::type *>(s),
541 std::size_t Slice<T>::size() const noexcept {
546 std::size_t Slice<T>::length() const noexcept {
556 T &Slice<T>::operator[](std::size_t n) const noexcept {
563 T &Slice<T>::at(std::size_t n) const {
565 panic<std::out_of_range>("rust::Slice index out of range");
660 auto diff = std::distance(static_cast<char *>(other.pos),
712 std::swap(*this, rhs);
752 ::new (alloc.ptr) T(std::move(val));
799 ::new (ptr) T{std::forward<Fields>(fields)...};
806 using std::swap;
831 Vec<T>::Vec(std::initializer_list<T> init) : Vec{} {
833 std::move(init.begin(), init.end(), std::back_inserter(*this));
839 std::copy(other.begin(), other.end(), std::back_inserter(*this));
880 const T &Vec<T>::operator[](std::size_t n) const noexcept {
887 const T &Vec<T>::at(std::size_t n) const {
889 panic<std::out_of_range>("rust::Vec index out of range");
907 T &Vec<T>::operator[](std::size_t n) noexcept {
914 T &Vec<T>::at(std::size_t n) {
916 panic<std::out_of_range>("rust::Vec index out of range");
934 void Vec<T>::reserve(std::size_t new_cap) {
945 this->emplace_back(std::move(value));
955 T(std::forward<Args>(args)...);
996 using std::swap;
1009 template <typename T, typename = std::size_t>
1010 struct is_complete : std::false_type {};
1012 struct is_complete<T, decltype(sizeof(T))> : std::true_type {};
1021 friend std::size_t size_of();
1023 friend std::size_t align_of();
1025 static typename std::enable_if<std::is_base_of<Opaque, T>::value,
1026 std::size_t>::type
1031 static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
1032 std::size_t>::type
1038 typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
1043 static typename std::enable_if<std::is_base_of<Opaque, T>::value,
1044 std::size_t>::type
1049 static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
1050 std::size_t>::type
1056 typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
1063 std::size_t size_of() {
1068 std::size_t align_of() {
1085 struct detect : std::false_type {};
1087 struct detect<void_t<T<A...>>, T, A...> : std::true_type {};
1097 : std::is_same<typename T::IsRelocatable, std::true_type> {};
1102 : std::conditional<
1105 std::integral_constant<
1106 bool, std::is_trivially_move_constructible<T>::value &&
1107 std::is_trivially_destructible<T>::value>>::type {};