Skip to content

Commit 27a16e1

Browse files
author
Artur Bać
committed
msvc downgrade fixes
1 parent 1ad7649 commit 27a16e1

12 files changed

+20
-19
lines changed

fixed_lib/include/fixedmath/detail/common.h

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "../types.h"
88
#include <fixedmath/detail/type_traits.h>
9+
#include <bit>
910

1011
namespace fixedmath::inline v2::detail
1112
{

unit_tests/addition_ut.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ int main()
1010
test_result result;
1111
"addition"_test = [&result]
1212
{
13-
auto fn_tmpl = [] -> metatests::test_result
13+
auto fn_tmpl = []() -> metatests::test_result
1414
{
1515
expect_eq(fobj::add(0_fix, 1_fix), 1_fix);
1616
expect_eq(fobj::add(1_fix, 1_fix), 2_fix);

unit_tests/atan_ut.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int main()
2727
test_result result;
2828
"atan"_test = [&result]
2929
{
30-
auto fn_tmpl = [] -> metatests::test_result
30+
auto fn_tmpl = []() -> metatests::test_result
3131
{
3232
test_atan(1_fix / 16, 0.062418_fix, 0.000025_fix);
3333
test_atan(3_fix / 16, 0.185347_fix, 0.000025_fix);
@@ -55,7 +55,7 @@ int main()
5555

5656
"atan2"_test = [&result]
5757
{
58-
auto fn_tmpl = [] -> metatests::test_result
58+
auto fn_tmpl = []() -> metatests::test_result
5959
{
6060
test_atan2(-1 / 2_fix, -1 / 2_fix, -2.3561944901923448_fix, 0.00005_fix);
6161

unit_tests/division_ut.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main()
1212

1313
"division"_test = [&result]
1414
{
15-
auto fn_tmpl = [] -> metatests::test_result
15+
auto fn_tmpl = []() -> metatests::test_result
1616
{
1717
expect_eq(1_fix / 1_fix, 1_fix);
1818
expect_eq(-1_fix / 1_fix, -1_fix);

unit_tests/fixed_construction_ut.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ int main()
101101
test_result result;
102102
"fixed construction"_test = [&result]
103103
{
104-
auto fn_tmpl = [] -> metatests::test_result
104+
auto fn_tmpl = []() -> metatests::test_result
105105
{
106106
expect_eq(fixed_t{1}, 1_fix);
107107
expect_eq(fixed_t{1u}, 1_fix);

unit_tests/misc_functions_ut.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main()
1212

1313
"ceil"_test = [&result]
1414
{
15-
auto fn_tmpl = [] -> metatests::test_result
15+
auto fn_tmpl = []() -> metatests::test_result
1616
{
1717
expect_eq(ceil(-0.25_fix), 0_fix);
1818
expect_eq(ceil(-1.25_fix), -1_fix);
@@ -30,7 +30,7 @@ int main()
3030

3131
"floor"_test = [&result]
3232
{
33-
auto fn_tmpl = [] -> metatests::test_result
33+
auto fn_tmpl = []() -> metatests::test_result
3434
{
3535
expect_eq(fixed_to_arithmetic<int>(floor(0.25_fix)), 0);
3636
expect_eq(floor(-1_fix + limits_::epsilon()), -1_fix); //
@@ -49,7 +49,7 @@ int main()
4949

5050
"angle_to_radians"_test = [&result]
5151
{
52-
auto fn_tmpl = [] -> metatests::test_result
52+
auto fn_tmpl = []() -> metatests::test_result
5353
{
5454
expect_eq(angle_to_radians(0), 0_fix);
5555
expect_eq(angle_to_radians(180), 3.1415926536_fix);

unit_tests/multiplication_ut.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int main()
1111
test_result result;
1212
"multiplication"_test = [&result]
1313
{
14-
auto fn_tmpl = [] -> metatests::test_result
14+
auto fn_tmpl = []() -> metatests::test_result
1515
{
1616
expect_eq(1_fix * 1_fix, 1_fix);
1717
expect_eq(10_fix * 0.5_fix, 5_fix);

unit_tests/sin_cos_ut.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ int main()
2929
test_result result;
3030
"sin"_test = [&result]
3131
{
32-
auto fn_tmpl = [] -> metatests::test_result
32+
auto fn_tmpl = []() -> metatests::test_result
3333
{
3434
test_sin(phi + phi / 2, -0.99986_fix, 0.0001_fix);
3535
test_sin(phi + phi / 4, -0.7071_fix, 0.0001_fix);
@@ -77,7 +77,7 @@ int main()
7777

7878
"cos"_test = [&result]
7979
{
80-
auto fn_tmpl = [] -> metatests::test_result
80+
auto fn_tmpl = []() -> metatests::test_result
8181
{
8282
test_cos(2 * phi, 0.9998_fix, 0.0001_fix);
8383
test_cos(phi, -0.9998_fix, 0.0001_fix);

unit_tests/sqrt_ut.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int main()
2727
test_result result;
2828
"sqrt"_test = [&result]
2929
{
30-
auto fn_tmpl = [] -> metatests::test_result
30+
auto fn_tmpl = []() -> metatests::test_result
3131
{
3232
expect_approx(sqrt(1.4111175537109375_fix), 1.1878_fix, 0.001_fix);
3333
expect_approx(sqrt(2.0000000000000000_fix), 1.4141_fix, 0.001_fix);
@@ -46,7 +46,7 @@ int main()
4646

4747
"hypot"_test = [&result]
4848
{
49-
auto fn_tmpl = [] -> metatests::test_result
49+
auto fn_tmpl = []() -> metatests::test_result
5050
{
5151
test_hypot(-14.991608_fix, -0.837158_fix, 15.01495_fix, 0.0001_fix);
5252
test_hypot(-14.991608_fix, -0.837158_fix, 15.01495_fix, 0.0001_fix);

unit_tests/subtraction_ut.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ int main()
1010
test_result result;
1111
"addition"_test = [&result]
1212
{
13-
auto fn_tmpl = [] -> metatests::test_result
13+
auto fn_tmpl = []() -> metatests::test_result
1414
{
1515
expect_eq(0.2_fix - 1.2_fix, -1_fix);
1616
expect_eq(3.2_fix - 1.2_fix, 2_fix);

unit_tests/tan_ut.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main()
1818
test_result result;
1919
"tan"_test = [&result]
2020
{
21-
auto fn_tmpl = [] -> metatests::test_result
21+
auto fn_tmpl = []() -> metatests::test_result
2222
{
2323
test_tan(phi / 2 + phi / 32, -10.155854941143394_fix, 0.0001_fix);
2424
test_tan(phi / 3, 1.73204_fix, 0.0001_fix);

unit_tests/type_convertions_ut.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main()
1212

1313
"arithmetic_to_fixed integrals"_test = [&result]
1414
{
15-
auto fn_tmpl = [] -> metatests::test_result
15+
auto fn_tmpl = []() -> metatests::test_result
1616
{
1717
expect_eq(arithmetic_to_fixed(0), 0_fix);
1818
expect_eq(arithmetic_to_fixed(1), limits_::one());
@@ -39,7 +39,7 @@ int main()
3939

4040
"arithmetic_to_fixed floating point"_test = [&result]
4141
{
42-
auto fn_tmpl = [] -> metatests::test_result
42+
auto fn_tmpl = []() -> metatests::test_result
4343
{
4444
expect_eq(arithmetic_to_fixed(0.f), 0_fix);
4545
expect_eq(arithmetic_to_fixed(-1.f), -limits_::one());
@@ -79,7 +79,7 @@ int main()
7979

8080
"fixed_to_arithmetic integrals"_test = [&result]
8181
{
82-
auto fn_tmpl = [] -> metatests::test_result
82+
auto fn_tmpl = []() -> metatests::test_result
8383
{
8484
expect_eq(fixed_to_arithmetic<int>(0.25_fix), 0);
8585
expect_eq(fixed_to_arithmetic<int>(1.25_fix), 1);
@@ -93,7 +93,7 @@ int main()
9393
};
9494
"fixed_to_arithmetic floating point"_test = [&result]
9595
{
96-
auto fn_tmpl = [] -> metatests::test_result
96+
auto fn_tmpl = []() -> metatests::test_result
9797
{
9898
{
9999
static constexpr auto approx{std::numeric_limits<float>::epsilon()};

0 commit comments

Comments
 (0)