public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/94203] New: experimental/executor and socket header issues-
@ 2020-03-17 16:16 erich.keane at intel dot com
  2020-03-17 16:53 ` [Bug libstdc++/94203] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: erich.keane at intel dot com @ 2020-03-17 16:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94203

            Bug ID: 94203
           Summary: experimental/executor and socket header issues-
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: erich.keane at intel dot com
  Target Milestone: ---

Again detected by trying to compile these headers with clang, I get two more
issues.  They can be reproduced here: https://godbolt.org/z/L-UVGq though that
still shows the previous version's issue with service_already_exists.

First, it appears that _TgtImpl attempts to add 'const' to the return type of
the overridden function:

../include/c++/10.0.1/experimental/executor:1170:2: error:
      return type of virtual function 'target' is not covariant with the return
type of the function it overrides (class type
      'const void *' is more qualified than class type 'void *'
        target(const std::type_info& __ti) const
        ^
../include/c++/10.0.1/experimental/executor:1138:21: note:
      overridden virtual function is here
      virtual void* target(const std::type_info&) const = 0;




The second issue is that socket_errc doesn't pass is_error_code_enum in
__basic_socket_impl:

../include/c++/10.0.1/experimental/socket:571:9: error:
      no viable overloaded '='
          __ec = socket_errc::already_open;
          ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
../include/c++/10.0.1/system_error:208:7: note:
      candidate template ignored: requirement
'is_error_code_enum<std::experimental::net::v1::socket_errc>::value' was not
      satisfied [with _ErrorCodeEnum = std::experimental::net::v1::socket_errc]
      operator=(_ErrorCodeEnum __e) noexcept
      ^

(it then goes on to show a bunch of other options).

However, I believe this is because Clang is instantiating this check right
away, but the explicit specialization for socket_errc is after it:
https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/experimental/socket#L2605


In fact, clang diagnoses this as well:

../include/c++/10.0.1/experimental/socket:2606:12: error:
      explicit specialization of
'std::is_error_code_enum<std::experimental::net::v1::socket_errc>' after
instantiation
    struct is_error_code_enum<experimental::net::v1::socket_errc>
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/c++/10.0.1/system_error:206:26: note:
      implicit instantiation first required here
      typename enable_if<is_error_code_enum<_ErrorCodeEnum>::value,
                         ^

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-24 13:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17 16:16 [Bug libstdc++/94203] New: experimental/executor and socket header issues- erich.keane at intel dot com
2020-03-17 16:53 ` [Bug libstdc++/94203] " redi at gcc dot gnu.org
2020-03-18  0:23 ` cvs-commit at gcc dot gnu.org
2020-04-24 13:07 ` redi at gcc dot gnu.org
2020-04-24 13:32 ` cvs-commit at gcc dot gnu.org
2020-04-24 13:32 ` redi at gcc dot gnu.org

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).