|
5318 | 5318 |
|
5319 | 5319 | \rSec2[meta.reflection.define.aggregate]{Reflection class definition generation} |
5320 | 5320 |
|
5321 | | -\begin{itemdecl} |
5322 | | -struct data_member_options { |
5323 | | - struct @\exposid{name-type}@ { // \expos |
5324 | | - template<class T> |
5325 | | - requires @\libconcept{constructible_from}@<u8string, T> |
5326 | | - consteval @\exposid{name-type}@(T&&); |
5327 | | - |
5328 | | - template<class T> |
5329 | | - requires @\libconcept{constructible_from}@<string, T> |
5330 | | - consteval @\exposid{name-type}@(T&&); |
5331 | | - |
5332 | | - private: |
5333 | | - variant<u8string, string> @\exposid{contents}@; // \expos |
5334 | | - }; |
| 5321 | +\indexlibraryglobal{data_member_options}% |
| 5322 | +\begin{codeblock} |
| 5323 | +namespace std::meta { |
| 5324 | + struct data_member_options { |
| 5325 | + struct @\exposidnc{name-type}@ { // \expos |
| 5326 | + template<class T> |
| 5327 | + requires @\libconcept{constructible_from}@<u8string, T> |
| 5328 | + consteval @\exposid{name-type}@(T&&); |
| 5329 | + |
| 5330 | + template<class T> |
| 5331 | + requires @\libconcept{constructible_from}@<string, T> |
| 5332 | + consteval @\exposid{name-type}@(T&&); |
| 5333 | + |
| 5334 | + private: |
| 5335 | + variant<u8string, string> @\exposidnc{contents}@; // \expos |
| 5336 | + }; |
5335 | 5337 |
|
5336 | | - optional<@\exposid{name-type}@> name; |
5337 | | - optional<int> alignment; |
5338 | | - optional<int> bit_width; |
5339 | | - bool no_unique_address = false; |
5340 | | -}; |
5341 | | -\end{itemdecl} |
| 5338 | + optional<@\exposid{name-type}@> name; |
| 5339 | + optional<int> alignment; |
| 5340 | + optional<int> bit_width; |
| 5341 | + bool no_unique_address = false; |
| 5342 | + }; |
| 5343 | +} |
| 5344 | +\end{codeblock} |
5342 | 5345 |
|
5343 | | -\begin{itemdescr} |
5344 | 5346 | \pnum |
5345 | 5347 | The classes \tcode{data_member_options} |
5346 | 5348 | and \tcode{data_member_options::\brk{}\exposid{name-type}} |
5347 | 5349 | are consteval-only types\iref{basic.types.general}, |
5348 | 5350 | and are not structural types\iref{temp.param}. |
5349 | | -\end{itemdescr} |
5350 | 5351 |
|
5351 | 5352 | \begin{itemdecl} |
5352 | 5353 | template<class T> |
|
0 commit comments