Skip to content

Commit 62df39c

Browse files
authored
-preview=in: Replace 'in ref' with either 'in' or 'const scope ref' (#129)
Allow the code to compile with '-preview=in'. In the test code, 'in ref' was replaced with simply 'in', as the test code isn't much affected by the loss of 'ref'. However, for the library code, the original meaning was retained.
1 parent 8b83f08 commit 62df39c

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

examples/flex_plot/test_arcsine.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ See_Also:
1515
$(LINK2 http://www.wolframalpha.com/input/?i=PDF%5BArcsineDistribution%5B0,+1%5D%5D,
1616
Wolfram Alpha)
1717
*/
18-
void test(S, F)(in ref F test)
18+
void test(S, F)(in F test)
1919
{
2020
import std.math : log, pow, PI, sqrt;
2121
auto f0 = (S x) => cast(S) (-S(0.5) * log(-(x-1) * x) - log(PI));

examples/flex_plot/test_beta.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ See_Also:
1515
$(LINK2 http://www.wolframalpha.com/input/?i=PDF%5BGammaDistribution%5B2,+5%5D%5D,
1616
Wolfram Alpha)
1717
*/
18-
void test(S, F)(in ref F test)
18+
void test(S, F)(in F test)
1919
{
2020
import std.math : log, pow;
2121
auto f0 = (S x) => cast(S) log(30 * (1 - x).pow(x));

examples/flex_plot/test_density_at_boundaries.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
Test whether density vanishes at boundaries.
1212
*/
13-
void test(S, F)(in ref F test)
13+
void test(S, F)(in F test)
1414
{
1515
import std.math : log, pow;
1616
import std.conv : to;

examples/flex_plot/test_density_with_poles.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
Test density with pole.
1111
*/
12-
void test(S, F)(in ref F test)
12+
void test(S, F)(in F test)
1313
{
1414
import std.math : abs, log;
1515
auto f0 = (S x) => - cast(S) log(abs(x)) * S(0.5);

examples/flex_plot/test_different_c_values.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
Test different values for c.
1111
*/
12-
void test(S, F)(in ref F test)
12+
void test(S, F)(in F test)
1313
{
1414
import std.math : pow;
1515
auto f0 = (S x) => -2 * pow(x, 4) + 4 * x * x;

examples/flex_plot/test_double_dist.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
Default flex testing distribution.
1111
*/
12-
void test(S, F)(in ref F test)
12+
void test(S, F)(in F test)
1313
{
1414
import std.math : pow;
1515
import std.conv : to;

examples/flex_plot/test_gamma.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See_Also:
1414
$(LINK2 http://www.wolframalpha.com/input/?i=PDF%5BGammaDistribution%5B4,+3%5D%5D,
1515
Wolfram Alpha)
1616
*/
17-
void test(S, F)(in ref F test)
17+
void test(S, F)(in F test)
1818
{
1919
import std.math : log, pow, PI, sqrt;
2020
enum one_div_3 = S(1) / 3;

examples/flex_plot/test_inflection_point_at_boundary.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
Test with inflection point at boundary.
1111
*/
12-
void test(S, F)(in ref F test)
12+
void test(S, F)(in F test)
1313
{
1414
import std.math : pow;
1515
auto f0 = (S x) => -pow(x, 4) + 6 * x * x;

examples/flex_plot/test_near_extrema.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
Test at and near extrema.
1111
*/
12-
void test(S, F)(in ref F test)
12+
void test(S, F)(in F test)
1313
{
1414
import std.math : pow;
1515
import std.conv : to;

examples/flex_plot/test_normal.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Normal distribution.
1212
See_Also:
1313
$(LINK2 https://en.wikipedia.org/wiki/Normal_distribution, Wikipedia)
1414
*/
15-
void test(S, F)(in ref F test)
15+
void test(S, F)(in F test)
1616
{
1717
import std.math : exp, log, PI, sqrt;
1818
S[] points = [-S.infinity, -1.5, 0, 1.5, S.infinity];

0 commit comments

Comments
 (0)