File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
libcxx/test/std/algorithms/alg.modifying.operations/alg.swap Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change 19
19
#include " test_macros.h"
20
20
21
21
#if TEST_STD_VER > 17
22
- constexpr bool test_swap_constexpr () {
23
- int i = 1 ;
24
- int j = 2 ;
25
- std::iter_swap (&i, &j);
26
- return i == 2 && j == 1 ;
22
+ constexpr bool test_swap_constexpr ()
23
+ {
24
+ int i = 1 ;
25
+ int j = 2 ;
26
+ std::iter_swap (&i, &j);
27
+ return i == 2 && j == 1 ;
27
28
}
28
29
#endif // TEST_STD_VER > 17
29
30
30
- int main (int , char **) {
31
- int i = 1 ;
32
- int j = 2 ;
33
- std::iter_swap (&i, &j);
34
- assert (i == 2 );
35
- assert (j == 1 );
31
+ int main (int , char **)
32
+ {
33
+ int i = 1 ;
34
+ int j = 2 ;
35
+ std::iter_swap (&i, &j);
36
+ assert (i == 2 );
37
+ assert (j == 1 );
36
38
37
39
#if TEST_STD_VER > 17
38
- static_assert (test_swap_constexpr ());
40
+ static_assert (test_swap_constexpr ());
39
41
#endif // TEST_STD_VER > 17
40
42
41
43
return 0 ;
You can’t perform that action at this time.
0 commit comments