File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 2742
2742
struct X { const int n; };
2743
2743
X *p = new X{3};
2744
2744
const int a = p->n;
2745
- new (p) X{5}; // \tcode {p} does not point to new object (\ref {basic.life })
2746
- // because \tcode {X::n} is \tcode {const}
2747
- const int b = p->n; // undefined behavior
2748
- const int c = std::launder(p)->n; // OK
2745
+ new (p) X{5}; // \tcode {p} does not point to new object (\ref {basic.life }) because \tcode {X::n} is \tcode {const}
2746
+ const int b = p->n; // undefined behavior
2747
+ const int c = std::launder(p)->n; // OK
2749
2748
\end {codeblock }
2750
2749
\end {example }
2751
2750
\end {itemdescr }
2840
2839
size_t hash_code() const noexcept;
2841
2840
const char* name() const noexcept;
2842
2841
2843
- type_info(const type_info& rhs) = delete; // cannot be copied
2844
- type_info& operator=(const type_info& rhs) = delete; // cannot be copied
2842
+ type_info(const type_info& rhs) = delete; // cannot be copied
2843
+ type_info& operator=(const type_info& rhs) = delete; // cannot be copied
2845
2844
};
2846
2845
}
2847
2846
\end {codeblock }
3610
3609
3611
3610
constexpr initializer_list() noexcept;
3612
3611
3613
- constexpr size_t size() const noexcept; // number of elements
3614
- constexpr const E* begin() const noexcept; // first element
3615
- constexpr const E* end() const noexcept; // one past the last element
3612
+ constexpr size_t size() const noexcept; // number of elements
3613
+ constexpr const E* begin() const noexcept; // first element
3614
+ constexpr const E* end() const noexcept; // one past the last element
3616
3615
};
3617
3616
3618
3617
// \ref {support.initlist.range }, initializer list range access
You can’t perform that action at this time.
0 commit comments