From Jason Turner

[polymorphic.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpbuc6zhwo/{from.md → to.md} +60 -0
tmp/tmpbuc6zhwo/{from.md → to.md} RENAMED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Synopsis <a id="polymorphic.syn">[[polymorphic.syn]]</a>
2
+
3
+ ``` cpp
4
+ namespace std {
5
+ template<class T, class Allocator = allocator<T>>
6
+ class polymorphic {
7
+ public:
8
+ using value_type = T;
9
+ using allocator_type = Allocator;
10
+ using pointer = allocator_traits<Allocator>::pointer;
11
+ using const_pointer = allocator_traits<Allocator>::const_pointer;
12
+
13
+ // [polymorphic.ctor], constructors
14
+ constexpr explicit polymorphic();
15
+ constexpr explicit polymorphic(allocator_arg_t, const Allocator& a);
16
+ constexpr polymorphic(const polymorphic& other);
17
+ constexpr polymorphic(allocator_arg_t, const Allocator& a, const polymorphic& other);
18
+ constexpr polymorphic(polymorphic&& other) noexcept;
19
+ constexpr polymorphic(allocator_arg_t, const Allocator& a, polymorphic&& other)
20
+ noexcept(see below);
21
+ template<class U = T>
22
+ constexpr explicit polymorphic(U&& u);
23
+ template<class U = T>
24
+ constexpr explicit polymorphic(allocator_arg_t, const Allocator& a, U&& u);
25
+ template<class U, class... Ts>
26
+ constexpr explicit polymorphic(in_place_type_t<U>, Ts&&... ts);
27
+ template<class U, class... Ts>
28
+ constexpr explicit polymorphic(allocator_arg_t, const Allocator& a,
29
+ in_place_type_t<U>, Ts&&... ts);
30
+ template<class U, class I, class... Us>
31
+ constexpr explicit polymorphic(in_place_type_t<U>, initializer_list<I> ilist, Us&&... us);
32
+ template<class U, class I, class... Us>
33
+ constexpr explicit polymorphic(allocator_arg_t, const Allocator& a,
34
+ in_place_type_t<U>, initializer_list<I> ilist, Us&&... us);
35
+
36
+ // [polymorphic.dtor], destructor
37
+ constexpr ~polymorphic();
38
+
39
+ // [polymorphic.assign], assignment
40
+ constexpr polymorphic& operator=(const polymorphic& other);
41
+ constexpr polymorphic& operator=(polymorphic&& other) noexcept(see below);
42
+
43
+ // [polymorphic.obs], observers
44
+ constexpr const T& operator*() const noexcept;
45
+ constexpr T& operator*() noexcept;
46
+ constexpr const_pointer operator->() const noexcept;
47
+ constexpr pointer operator->() noexcept;
48
+ constexpr bool valueless_after_move() const noexcept;
49
+ constexpr allocator_type get_allocator() const noexcept;
50
+
51
+ // [polymorphic.swap], swap
52
+ constexpr void swap(polymorphic& other) noexcept(see below);
53
+ friend constexpr void swap(polymorphic& lhs, polymorphic& rhs) noexcept(see below);
54
+
55
+ private:
56
+ Allocator alloc = Allocator(); // exposition only
57
+ };
58
+ }
59
+ ```
60
+