This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

4273. Standard execution policy types should be conventional tag class types

Section: 26.3.6 [execpol] Status: New Submitter: Jiang An Opened: 2025-06-03 Last modified: 2025-06-10

Priority: Not Prioritized

View all issues with New status.

Discussion:

Existing standard execution policy types don't hold any state, and mostly act as disambiguating tags in parallel algorithms. Perhaps it will be better to ensure them to be similar to construction tag types, which possibly enables more desired usages.

Currently, libc++ makes these types non-movable, which is arguable undesired per the decision made in P3136R1.

Proposed resolution:

This wording is relative to N5008.

  1. Modify 26.3.6.3 [execpol.seq] as indicated:

    class execution::sequenced_policy { unspecified
    public:
      explicit sequenced_policy() = default; 
    };
    
  2. Modify 26.3.6.4 [execpol.par] as indicated:

    class execution::parallel_policy { unspecified
    public:
      explicit parallel_policy() = default; 
    };
    
  3. Modify 26.3.6.5 [execpol.parunseq] as indicated:

    class execution::parallel_unsequenced_policy { unspecified
    public:
      explicit parallel_unsequenced_policy() = default; 
    };
    
  4. Modify 26.3.6.6 [execpol.unseq] as indicated:

    class execution::unsequenced_policy { unspecified
    public:
      explicit unsequenced_policy() = default; 
    };
    
  5. Modify 26.3.6.7 [execpol.objects] as indicated:

    inline constexpr execution::sequenced_policy execution::seq{ unspecified };
    inline constexpr execution::parallel_policy execution::par{ unspecified };
    inline constexpr execution::parallel_unsequenced_policy execution::par_unseq{ unspecified };
    inline constexpr execution::unsequenced_policy execution::unseq{ unspecified };