mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: Issue #2259 - Add mozilla::Vector -> mozilla::Span implicit conversion (9914c061)
This commit is contained in:
@@ -19,6 +19,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"
|
||||
|
||||
@@ -554,6 +555,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;
|
||||
|
||||
Reference in New Issue
Block a user