• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // bindgen-flags: --rust-target 1.0 --with-derive-hash --with-derive-partialeq --with-derive-eq --rustified-enum ".*"
2 
3 template<class _CharT, class _Traits, class _Allocator>
4 class basic_string
5 {
6 public:
7     typedef unsigned long long size_type;
8     typedef char value_type;
9     typedef value_type * pointer;
10 
11     struct __long
12     {
13         size_type __cap_;
14         size_type __size_;
15         pointer   __data_;
16     };
17 
18     enum {__min_cap = (sizeof(__long) - 1)/sizeof(value_type) > 2 ?
19                         (sizeof(__long) - 1)/sizeof(value_type) : 2};
20 
21     struct __short
22     {
23         union
24         {
25             unsigned char __size_;
26             value_type __lx;
27         };
28         value_type __data_[__min_cap];
29     };
30 
31     union __ulx{__long __lx; __short __lxx;};
32 
33     enum {__n_words = sizeof(__ulx) / sizeof(size_type)};
34 
35     struct __raw
36     {
37         size_type __words[__n_words];
38     };
39 
40     struct __rep
41     {
42         union
43         {
44             __long  __l;
45             __short __s;
46             __raw   __r;
47         };
48     };
49 };
50