Skip to content

P2615 Meaningful exports CWG2443 #1236

Closed
cplusplus/draft
#5955

Description

@jensmaurer

In its 2022-05-20 telecon, CWG agreed with the wording for CWG2443 as shown here:

https://wiki.edg.com/pub/Wg21telecons2022/CoreWorkingGroup/cwg2443.html

Allowing (almost) any kind of declaration in the declaration-seq of an export-declaration is a design change that needs EWG approval.

Activity

  1. added
    needs-revisionPaper needs changes before it can proceed
    and removed
    C++23Targeted at C++23
    on Oct 30, 2022
  2. erichkeane commented on Nov 10, 2022

    @erichkeane
    Collaborator

    1: export static_assert(true); // mild preference for bad
    2: export {static_assert(true);} // strong preference for OK
    3: export template void f(); // strong preference for bad
    4: template export void f(); // strong preference for bad
    5: export {template void f();} // strong preference for OK

    Forward P2615R0 (CWG 2443 resolution) to CWG for inclusion in C++23 (Options 2-5 as preferred above, Option 1 still prohibited).

    SF F N A SA
    10 9 4 2 0

    Result: Consensus

    Additionally permit Option 1 above as proposed in D2715R0.

    SF F N A SA
    2 6 13 1 0

    Result: Consensus

    Forwarding the above to CWG.

  3. added and removed
    needs-revisionPaper needs changes before it can proceed
    on Nov 10, 2022
  4. added
    C++23Targeted at C++23
    and removed
    EWGEvolution
    on Nov 10, 2022
  5. jensmaurer commented on Nov 10, 2022

    @jensmaurer
    MemberAuthor

    Davis tells us he needs to change the paper to implement EWG guidance.

  6. jfbastien commented on Nov 10, 2022

    @jfbastien
    Collaborator

    We need to address a few more cases:

      static_assert(...);        // as discussed, accept
      asm("...");                // as discussed, accept
      template void f();         // as discussed, reject
      template<> void f<int>();  // as discussed, reject
      A() -> A<0>;               // treat like template and reject?
      ;                          // treat like static_assert and accept?
      [[...]];                  // treat like static_assert and accept?
  7. erichkeane commented on Nov 11, 2022

    @erichkeane
    Collaborator

    The potentially attributed null statement may have the 'export' keyword, despite it being meaningless.

    SF F N A SA
    5 1 1 1 1

    Result: Consensus

    A deduction guide declaration inside of an export {} should be permitted, despite not having meaning.

    SF F N A SA
    7 2 0 0 1

    Result: Consensus

    export on a deduction guide declaration (no {}) should be permitted, despite not having meaning.

    SF F N A SA
    6 2 1 0 2

    Result: Consensus

  8. added
    plenary-approvedPapers approved for inclusion in their target vehicle by plenary vote.
    on Nov 12, 2022
  9. wg21bot commented on Dec 5, 2022

    @wg21bot
    Collaborator

    P2615R1 Meaningful exports (S. Davis Herring)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CWGCoreplenary-approvedPapers approved for inclusion in their target vehicle by plenary vote.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions