You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-3Lines changed: 19 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,12 +82,28 @@ auto main() -> int
82
82
results in the follow build error (snippet):
83
83
84
84
```console:example/ctest_fail.log
85
-
external/skytest/src/detail/test_style.hpp:43:27: error: the value of 'n' is not usable in a constant expression
85
+
./src/detail/test_style.hpp:43:27: error: constexpr variable 'value<skytest::detail::static_closure<f>>' must be initialized by a constant expression
86
86
43 | static constexpr auto value = std::optional<bool>{bool{F{}()}};
87
-
| ^~~~~
88
-
ctest_fail.cpp:9:15: note: 'int n' is not const
87
+
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88
+
./src/test.hpp:46:39: note: in instantiation of static data member 'skytest::detail::test_style::compile_time::value' requested here
89
+
46 | result.compile_time = S::template value<F>;
90
+
| ^
91
+
./src/test.hpp:71:5: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
92
+
71 | assign_impl(static_closure<f>{});
93
+
| ^
94
+
external/llvm_toolchain_llvm/bin/../include/c++/v1/__functional/operations.h:374:37: note: read of non-const variable 'n' is not allowed in a constant expression
external/skytest/src/detail/test_style.hpp:43:27: error: the value of 'n' is not usable in a constant expression
1
+
./src/detail/test_style.hpp:43:27: error: constexpr variable 'value<skytest::detail::static_closure<f>>' must be initialized by a constant expression
2
2
43 | static constexpr auto value = std::optional<bool>{bool{F{}()}};
3
-
| ^~~~~
4
-
ctest_fail.cpp:9:15: note: 'int n' is not const
3
+
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
+
./src/test.hpp:46:39: note: in instantiation of static data member 'skytest::detail::test_style::compile_time::value' requested here
5
+
46 | result.compile_time = S::template value<F>;
6
+
| ^
7
+
./src/test.hpp:71:5: note: (skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
8
+
71 | assign_impl(static_closure<f>{});
9
+
| ^
10
+
external/llvm_toolchain_llvm/bin/../include/c++/v1/__functional/operations.h:374:37: note: read of non-const variable 'n' is not allowed in a constant expression
0 commit comments