File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ private:
130
130
}
131
131
enum size = SizeChecker.sizeof - (int function ()).sizeof;
132
132
133
- /* * Tells whether a type $(D T) is statically allowed for
133
+ /* * Tells whether a type $(D T) is statically _allowed for
134
134
* storage inside a $(D VariantN) object by looking
135
135
* $(D T) up in $(D AllowedTypes).
136
136
*/
@@ -721,8 +721,8 @@ public:
721
721
722
722
/**
723
723
* Returns $(D true) if and only if the $(D VariantN)
724
- * object holds an object implicitly convertible to type $(D
725
- * U). Implicit convertibility is defined as per
724
+ * object holds an object implicitly convertible to type `T`.
725
+ * Implicit convertibility is defined as per
726
726
* $(REF_ALTTEXT ImplicitConversionTargets, ImplicitConversionTargets, std,traits).
727
727
*/
728
728
@@ -843,6 +843,7 @@ public:
843
843
844
844
// returns 1 if the two are equal
845
845
bool opEquals (T)(auto ref T rhs) const
846
+ if (allowed! T || is (Unqual! T == VariantN))
846
847
{
847
848
static if (is (Unqual! T == VariantN))
848
849
alias temp = rhs;
@@ -865,6 +866,7 @@ public:
865
866
*/
866
867
867
868
int opCmp (T)(T rhs)
869
+ if (allowed! T)
868
870
{
869
871
static if (is (T == VariantN))
870
872
alias temp = rhs;
You can’t perform that action at this time.
0 commit comments