Author
anonymous
about 2 years ago
Language
C++
Compiler
clang HEAD 17.0.0 (https://github.com/llvm/llvm-project.git 0e754e114a68a6c6be7f90f39989177cc8a5a1b7)
Options
Warnings
Don't Use Boost
C++17(GNU)
no pedantic
Author
anonymous
about 2 years ago
$ clang++ prog.cc -Wall -Wextra -std=gnu++17
prog.cc:17:33: warning: unused variable 'v' [-Wunused-variable]
struct tagged_union v { .type = 0, .variant = { .value = 1 } };
^
error: field designator (null) does not refer to any field in type 'struct tagged_union'
/opt/wandbox/clang-head/include/c++/v1/__functional/invoke.h:391:28: note: in instantiation of function template specialization 'main()::(anonymous class)::operator()<unsigned char>' requested here
_LIBCPP_CONSTEXPR decltype(std::declval<_Fp>()(std::declval<_Args>()...))
^
/opt/wandbox/clang-head/include/c++/v1/__functional/invoke.h:401:19: note: while substituting deduced template arguments into function template '__invoke' [with _Fp = (lambda at prog.cc:16:9) &, _Args = <unsigned char>]
static decltype(std::__invoke(std::declval<_XFp>(), std::declval<_XArgs>()...)) __try_call(int);
^
/opt/wandbox/clang-head/include/c++/v1/__functional/invoke.h:407:28: note: while substituting deduced template arguments into function template '__try_call' [with _XFp = (lambda at prog.cc:16:9) &, _XArgs = (no value)]
using _Result = decltype(__try_call<_Fp, _Args...>(0));
^
/opt/wandbox/clang-head/include/c++/v1/__type_traits/conjunction.h:27:32: note: in instantiation of template class 'std::__invokable_r<void, (lambda at prog.cc:16:9) &, unsigned char>' requested here
__expand_to_true<__enable_if_t<_Pred::value>...> __and_helper(int);
^
/opt/wandbox/clang-head/include/c++/v1/__type_traits/conjunction.h:38:39: note: while substituting explicitly-specified template arguments into function template '__and_helper'
using _And _LIBCPP_NODEBUG = decltype(std::__and_helper<_Pred...>(0));
^
/opt/wandbox/clang-head/include/c++/v1/__functional/function.h:978:33: note: in instantiation of template type alias '_And' requested here
template <class _Fp, bool = _And<
^
/opt/wandbox/clang-head/include/c++/v1/__functional/function.h:997:54: note: in instantiation of default argument for '__callable<(lambda at prog.cc:16:9) &>' required here
using _EnableIfLValueCallable = typename enable_if<__callable<_Fp&>::value>::type;
^~~~~~~~~~~~~~~~
/opt/wandbox/clang-head/include/c++/v1/__functional/function.h:1008:33: note: in instantiation of template type alias '_EnableIfLValueCallable' requested here
template<class _Fp, class = _EnableIfLValueCallable<_Fp>>
^
/opt/wandbox/clang-head/include/c++/v1/__functional/function.h:1009:5: note: in instantiation of default argument for 'function<(lambda at prog.cc:16:9)>' required here
function(_Fp);
^~~~~~~~~~~~~
prog.cc:15:34: note: while substituting deduced template arguments into function template 'function' [with _Fp = (lambda at prog.cc:16:9), $1 = (no value)]
std::function<void(uint8_t)> f =
^
1 warning and 1 error generated.
Exit Code:
1