mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix of evaluation order warning.
This commit is contained in:
@@ -329,8 +329,8 @@ macro lower_to_atomic_compatible_type($Type) @const
|
||||
$endswitch
|
||||
}
|
||||
|
||||
macro bool is_promotable_to_floatlike($Type) @const => types::is_floatlike($Type) || types::is_int($Type);
|
||||
macro bool is_promotable_to_float($Type) @const => types::is_float($Type) || types::is_int($Type);
|
||||
macro bool is_promotable_to_floatlike($Type) @const => types::is_floatlike($Type) ||| types::is_int($Type);
|
||||
macro bool is_promotable_to_float($Type) @const => types::is_float($Type) ||| types::is_int($Type);
|
||||
|
||||
macro bool is_same_vector_type($Type1, $Type2) @const
|
||||
{
|
||||
@@ -345,7 +345,7 @@ macro bool has_equals($Type) @const => $defined(($Type){} == ($Type){});
|
||||
|
||||
macro bool is_equatable_type($Type) @const
|
||||
{
|
||||
$if $defined($Type.less) || $defined($Type.compare_to) || $defined($Type.equals):
|
||||
$if $defined($Type.less) ||| $defined($Type.compare_to) ||| $defined($Type.equals):
|
||||
return true;
|
||||
$else
|
||||
return $Type.is_eq;
|
||||
@@ -357,7 +357,7 @@ macro bool is_equatable_type($Type) @const
|
||||
*>
|
||||
macro bool implements_copy($Type) @const
|
||||
{
|
||||
return $defined($Type.copy) && $defined($Type.free);
|
||||
return $defined($Type.copy) &&& $defined($Type.free);
|
||||
}
|
||||
|
||||
macro bool @equatable_value(#value) @const
|
||||
@@ -367,7 +367,7 @@ macro bool @equatable_value(#value) @const
|
||||
|
||||
macro bool @comparable_value(#value) @const
|
||||
{
|
||||
$if $defined(#value.less) || $defined(#value.compare_to):
|
||||
$if $defined(#value.less) ||| $defined(#value.compare_to):
|
||||
return true;
|
||||
$else
|
||||
return $typeof(#value).is_ordered;
|
||||
|
||||
Reference in New Issue
Block a user