From Jason Turner

[bitset.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp08jg_r7w/{from.md → to.md} +12 -4
tmp/tmp08jg_r7w/{from.md → to.md} RENAMED
@@ -23,10 +23,18 @@ template<class charT, class traits, class Allocator>
23
  typename basic_string<charT, traits, Allocator>::size_type pos = 0,
24
  typename basic_string<charT, traits, Allocator>::size_type n
25
  = basic_string<charT, traits, Allocator>::npos,
26
  charT zero = charT('0'),
27
  charT one = charT('1'));
 
 
 
 
 
 
 
 
28
  ```
29
 
30
  *Effects:* Determines the effective length `rlen` of the initializing
31
  string as the smaller of `n` and `str.size() - pos`. Initializes the
32
  first `M` bit positions to values determined from the corresponding
@@ -48,19 +56,19 @@ other than `zero` or `one`.
48
 
49
  ``` cpp
50
  template<class charT>
51
  constexpr explicit bitset(
52
  const charT* str,
53
- typename basic_string<charT>::size_type n = basic_string<charT>::npos,
54
  charT zero = charT('0'),
55
  charT one = charT('1'));
56
  ```
57
 
58
  *Effects:* As if by:
59
 
60
  ``` cpp
61
- bitset(n == basic_string<charT>::npos
62
- ? basic_string<charT>(str)
63
- : basic_string<charT>(str, n),
64
  0, n, zero, one)
65
  ```
66
 
 
23
  typename basic_string<charT, traits, Allocator>::size_type pos = 0,
24
  typename basic_string<charT, traits, Allocator>::size_type n
25
  = basic_string<charT, traits, Allocator>::npos,
26
  charT zero = charT('0'),
27
  charT one = charT('1'));
28
+ template<class charT, class traits>
29
+ constexpr explicit bitset(
30
+ basic_string_view<charT, traits> str,
31
+ typename basic_string_view<charT, traits>::size_type pos = 0,
32
+ typename basic_string_view<charT, traits>::size_type n
33
+ = basic_string_view<charT, traits>::npos,
34
+ charT zero = charT('0'),
35
+ charT one = charT('1'));
36
  ```
37
 
38
  *Effects:* Determines the effective length `rlen` of the initializing
39
  string as the smaller of `n` and `str.size() - pos`. Initializes the
40
  first `M` bit positions to values determined from the corresponding
 
56
 
57
  ``` cpp
58
  template<class charT>
59
  constexpr explicit bitset(
60
  const charT* str,
61
+ typename basic_string_view<charT>::size_type n = basic_string_view<charT>::npos,
62
  charT zero = charT('0'),
63
  charT one = charT('1'));
64
  ```
65
 
66
  *Effects:* As if by:
67
 
68
  ``` cpp
69
+ bitset(n == basic_string_view<charT>::npos
70
+ ? basic_string_view<charT>(str)
71
+ : basic_string_view<charT>(str, n),
72
  0, n, zero, one)
73
  ```
74