Document numberP0423R0
ProjectProgramming Language C++, Library Working Group
Reply-toJonathan Wakely <>

Variable templates for Networking TS traits

The Networking TS defines type traits such as is_executor but does not provide corresponding variable templates such as is_executor_v. The direction set by C++17 is to provide these, so the TS should define them.

Proposed Wording

Add to 13.1 [async.synop] synopsis:

    template<class T> struct is_executor;

    template<class T>
      constexpr bool is_executor_v = is_executor<T>::value;

    struct executor_arg_t { };
    constexpr executor_arg_t executor_arg = executor_arg_t();

    template<class T, class Executor> struct uses_executor;

    template<class T, class Executor>
      constexpr bool uses_executor_v = uses_executor<T, Executor>::value;

    template<class T, class Executor = system_executor>
      struct associated_executor;

Add to 16.1 [buffer.synop] synopsis:

    // buffer type traits:

    template<class T> is_mutable_buffer_sequence;
    template<class T> is_const_buffer_sequence;
    template<class T> is_dynamic_buffer;

    template<class T>
      constexpr bool is_mutable_buffer_sequence_v = is_mutable_buffer_sequence<T>::value;
    template<class T>
      constexpr bool is_const_buffer_sequence_v = is_const_buffer_sequence<T>::value;
    template<class T>
      constexpr bool is_dynamic_buffer_v = is_dynamic_buffer<T>::value;

    // buffer sequence access: