mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #2259 - Add mozilla::Vector -> mozilla::Span implicit conversion
Based-on: part of m-c 1578339
This commit is contained in:
parent
7716602a20
commit
9914c06168
1 changed files with 11 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
#include "mozilla/Move.h"
|
||||
#include "mozilla/OperatorNewExtensions.h"
|
||||
#include "mozilla/ReentrancyGuard.h"
|
||||
#include "mozilla/Span.h"
|
||||
#include "mozilla/TemplateLib.h"
|
||||
#include "mozilla/TypeTraits.h"
|
||||
|
||||
|
|
@ -553,6 +554,16 @@ public:
|
|||
return *(end() - 1);
|
||||
}
|
||||
|
||||
operator mozilla::Span<const T>() const
|
||||
{
|
||||
return mozilla::MakeSpan(mBegin, mLength);
|
||||
}
|
||||
|
||||
operator mozilla::Span<T>()
|
||||
{
|
||||
return mozilla::MakeSpan(mBegin, mLength);
|
||||
}
|
||||
|
||||
class Range
|
||||
{
|
||||
friend class Vector;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue