In file included from /Users/dnsge/dev/class/eecs498.5/search/lib/tests/optional_test.cpp:1:
/Users/dnsge/dev/class/eecs498.5/search/lib/include/core/optional.h:242:9: error: no matching function for call to 'construct_at'
242 | std::construct_at(&val_, std::forward<Args>(args)...);
| ^~~~~~~~~~~~~~~~~
/Users/dnsge/dev/class/eecs498.5/search/lib/include/core/optional.h:87:9: note: in instantiation of function template specialization 'core::Optional<X>::DirectInitVal<X &>' requested here
87 | DirectInitVal(val);
| ^
/Users/dnsge/dev/class/eecs498.5/search/lib/tests/optional_test.cpp:23:12: note: in instantiation of function template specialization 'core::Optional<X>::Optional<X>' requested here
23 | return X{1};
| ^
/opt/homebrew/Cellar/llvm/19.1.7/bin/../include/c++/v1/__memory/construct_at.h:39:38: note: candidate template ignored: substitution failure [with _Tp = X, _Args = <X &>]: call to deleted constructor of 'X'
38 | template <class _Tp, class... _Args, class = decltype(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))>
| ~~~
39 | _LIBCPP_HIDE_FROM_ABI constexpr _Tp* construct_at(_Tp* __location, _Args&&... __args) {
| ^
1 error generated.
Minimum example:
Compilation error: