-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFailSummary.txt
45 lines (40 loc) · 2.47 KB
/
FailSummary.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
In Non-Debug mode:
Failure 1:
Cannot add Position to Velocity (Line 338)
Error messages such as:
"error: invalid operands to binary expression"
"error: no match for ‘operator+’"
Failure 2:
Multiple assertion fails - trying to initialise with wrong types (Lines 380, 382, 384)
Error messages such as:
"error: static_assert failed due to requirement 'std::is_same_v<double, int>' "Initialiser list type must match storage data-type or units" "
"error: static assertion failed: Initialiser list type must match storage data-type or units"
Failure 3:
Conversion error (Line 386) - trying to set equal to a plain double
"error: no viable conversion from 'double' to 'Length'"
"error: conversion from ‘double’ to non-scalar type ‘Length’"
Failure 4:
a. Trying to use plain get on a value with units (Line 397)
b. Trying to use power at runtime when value has units (Line 443)
"error: static_assert failed due to requirement 'hasNoUnits()'"
"error: static assertion failed
static_assert(hasNoUnits());"
Failure 5:
Using a Narrowing conversion (Line 512)
NOTE: this is only a warning in GCC
"error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list" [Clang]
"warning: narrowing conversion of ‘tmp2’ from ‘double’ to ‘float’" [GCC]
Failure 6:
Issues with references and misuse of constness, r-values etc
a. Trying to get a non-const reference to a temporary, which is a const ref
error: static_assert failed due to requirement '!STScalarRef<double, true>::is_const_v' "Error: Trying to remove const from a reference!"
error: static assertion failed: Error: Trying to remove const from a reference!
b. Ditto, but for a normal type, so compiler detects this
error: non-const lvalue reference to type 'double' cannot bind to a temporary of type 'double'
cannot bind non-const lvalue reference of type 'double&' to an rvalue of type 'double'
c. Trying to write to a const-ref type
error: static_assert failed due to requirement '!true' "Cannot assign to const reference"
error: static assertion failed: Cannot assign to const reference
d. Using a (const)-ref-to-rvalue after the line it is created
shows as an assertion error on the value, depending on optimisation
NOTE: we are allowed to use the _reference_ object, but NOT the value it references.