public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97740] Weird error message about accessing a private member of my own class inside of std::string_view inside of constexpr Date: Sat, 28 Aug 2021 22:16:01 +0000 [thread overview] Message-ID: <bug-97740-4-OwKR9lanFl@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97740-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97740 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The trunk produces: Output of x86-64 gcc (trunk) (Compiler #2) <source>: In instantiation of 'cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>::parseOptionsImpl()::<lambda(auto:6&& ...)> [with auto:6 = {const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&}]': /opt/compiler-explorer/gcc-trunk-20210828/include/c++/12.0.0/type_traits:2555:26: required by substitution of 'template<class _Fn, class ... _Args> static std::__result_of_success<decltype (declval<_Fn>()((declval<_Args>)()...)), std::__invoke_other> std::__result_of_other_impl::_S_test(int) [with _Fn = cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>::parseOptionsImpl()::<lambda(auto:6&& ...)>; _Args = {const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&}]' /opt/compiler-explorer/gcc-trunk-20210828/include/c++/12.0.0/type_traits:2566:55: required from 'struct std::__result_of_impl<false, false, cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>::parseOptionsImpl()::<lambda(auto:6&& ...)>, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&>' /opt/compiler-explorer/gcc-trunk-20210828/include/c++/12.0.0/type_traits:151:12: recursively required by substitution of 'template<class _Result, class _Ret> struct std::__is_invocable_impl<_Result, _Ret, true, std::__void_t<typename _CTp::type> > [with _Result = std::__invoke_result<cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>::parseOptionsImpl()::<lambda(auto:6&& ...)>, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&>; _Ret = void]' /opt/compiler-explorer/gcc-trunk-20210828/include/c++/12.0.0/type_traits:151:12: required from 'struct std::__and_<std::__is_invocable_impl<std::__invoke_result<cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>::parseOptionsImpl()::<lambda(auto:6&& ...)>, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&>, void, true, void>, std::__call_is_nothrow<std::__invoke_result<cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>::parseOptionsImpl()::<lambda(auto:6&& ...)>, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&>, cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>::parseOptionsImpl()::<lambda(auto:6&& ...)>, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&> >' /opt/compiler-explorer/gcc-trunk-20210828/include/c++/12.0.0/type_traits:3054:12: required from 'struct std::is_nothrow_invocable<cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>::parseOptionsImpl()::<lambda(auto:6&& ...)>, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&, const cld::detail::CommandLine::Arg&>' /opt/compiler-explorer/gcc-trunk-20210828/include/c++/12.0.0/tuple:1872:37: required from 'constexpr const bool std::__unpack_std_tuple<template<class _Fn, class ... _ArgTypes> struct std::is_nothrow_invocable, cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>::parseOptionsImpl()::<lambda(auto:6&& ...)>, const std::tuple<cld::detail::CommandLine::Arg, cld::detail::CommandLine::Arg, cld::detail::CommandLine::Arg>&>' /opt/compiler-explorer/gcc-trunk-20210828/include/c++/12.0.0/tuple:1887:14: required from 'constexpr decltype(auto) std::apply(_Fn&&, _Tuple&&) [with _Fn = cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>::parseOptionsImpl()::<lambda(auto:6&& ...)>; _Tuple = const std::tuple<cld::detail::CommandLine::Arg, cld::detail::CommandLine::Arg, cld::detail::CommandLine::Arg>&]' <source>:408:49: required from 'static constexpr auto cld::detail::CommandLine::Pack<args>::parseOptionsImpl() [with const auto& ...args = {detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2}]' <source>:444:49: required from 'constexpr const auto cld::detail::CommandLine::parsedTuple<cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2> >' <source>:458:48: required from 'constexpr auto cld::detail::CommandLine::parseOptions(std::string_view, cld::CLIMultiArg) [with T = cld::detail::CommandLine::Pack<detail::INCLUDESarg0, detail::INCLUDESarg1, detail::INCLUDESarg2>; auto& ...args = {detail::INCLUDESbind0, std::in_place_type<std::basic_string_view<char, std::char_traits<char> > >}; std::string_view = std::basic_string_view<char>]' <source>:502:5: required from here <source>:411:31: error: too many initializers for 'std::array<std::basic_string_view<char>, 3>' 411 | input.value...}; | ^ clang accepts the code using GCC's libstdc++ while rejects it using LLVM's libc++: <source>:410:20: error: implicit instantiation of undefined template 'std::array<std::string_view, 3>' return std::array<std::string_view, sizeof...(input)>{ ^
next prev parent reply other threads:[~2021-08-28 22:16 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-06 9:03 [Bug c++/97740] New: " markus.boeck02 at gmail dot com 2020-11-09 15:31 ` [Bug c++/97740] " redi at gcc dot gnu.org 2020-11-09 15:32 ` redi at gcc dot gnu.org 2021-08-28 22:16 ` pinskia at gcc dot gnu.org [this message] 2023-03-24 16:08 ` [Bug c++/97740] [10/11/12/13 Regression] " ppalka at gcc dot gnu.org 2023-03-24 16:10 ` ppalka at gcc dot gnu.org 2023-07-07 10:38 ` [Bug c++/97740] [11/12/13/14 " rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-97740-4-OwKR9lanFl@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).