xo-alloc2: abox: fix for non-anonymous abox instances
This commit is contained in:
parent
8aa718695c
commit
68f04870bf
1 changed files with 9 additions and 1 deletions
|
|
@ -92,10 +92,18 @@ namespace xo {
|
|||
// --------------------------------
|
||||
|
||||
/** explicit conversion to obj<AFacet,DRepr> **/
|
||||
obj<AFacet, DRepr> to_op() const noexcept {
|
||||
obj<AFacet, DRepr> to_op() const noexcept
|
||||
requires std::is_same_v<DRepr, xo::facet::DVariantPlaceholder>
|
||||
{
|
||||
return obj<AFacet, DRepr>(this->iface(), this->data());
|
||||
}
|
||||
|
||||
obj<AFacet, DRepr> to_op() const noexcept
|
||||
requires (!std::is_same_v<DRepr, xo::facet::DVariantPlaceholder>)
|
||||
{
|
||||
return obj<AFacet, DRepr>(this->data());
|
||||
}
|
||||
|
||||
/** Take ownership from unowned object **/
|
||||
template <typename DOther>
|
||||
abox & adopt(const obj<AFacet, DOther> & other)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue