Skip to content

get rid of inclusion of pf17 inside of unbounded_variant - #126

Merged
serges147 merged 7 commits into
mainfrom
sshirokov/84_pf
Jun 5, 2024
Merged

serges147 merged 7 commits into
mainfrom
sshirokov/84_pf

Conversation

@serges147

Copy link
Copy Markdown
Contributor

No description provided.

@serges147 serges147 self-assigned this Jun 3, 2024
Comment thread include/cetl/unbounded_variant.hpp Outdated
/// C++14 limitation and polyfill optionality (by design in CETL, according to Scott), so a bit of code duplication.
///
template <typename T>
struct in_place_type_t

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be a public member of unbounded_variant? ub_var feels like an ugly hack.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@serges147
serges147 requested a review from thirtytwobits June 4, 2024 09:19

@pavel-kirienko pavel-kirienko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to keep this, should we not alert the user in the doc comments for these constructors that one should consider using the freestanding factory function instead:

explicit unbounded_variant(in_place_type_t<ValueType>, Args&&... args)

explicit unbounded_variant(Pmr* const mem_res, in_place_type_t<ValueType>, Args&&... args)

explicit unbounded_variant(in_place_type_t<ValueType>, std::initializer_list<Up> list, Args&&... args)

explicit unbounded_variant(Pmr* const mem_res,

So that one does not have to touch the ad-hoc in_place_type

@serges147

Copy link
Copy Markdown
Contributor Author

So that one does not have to touch the ad-hoc in_place_type

Good idea, I will do this.

@serges147
serges147 requested a review from pavel-kirienko June 5, 2024 07:55
@sonarqubecloud

sonarqubecloud Bot commented Jun 5, 2024

Copy link
Copy Markdown

@serges147
serges147 merged commit 6809326 into main Jun 5, 2024
@serges147
serges147 deleted the sshirokov/84_pf branch June 5, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants