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 27422742struct X { const int n; };
27432743X *p = new X{3};
27442744const 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
27492748\end {codeblock }
27502749\end {example }
27512750\end {itemdescr }
28402839 size_t hash_code() const noexcept;
28412840 const char* name() const noexcept;
28422841
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
28452844 };
28462845}
28472846\end {codeblock }
36103609
36113610 constexpr initializer_list() noexcept;
36123611
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
36163615 };
36173616
36183617 // \ref {support.initlist.range }, initializer list range access
You can’t perform that action at this time.
0 commit comments