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

2914. std::array does not support class-template deduction from initializers

Section: 24.3.2 [array.syn] Status: Resolved Submitter: United States Opened: 2017-02-03 Last modified: 2020-09-06

Priority: Not Prioritized

View all issues with Resolved status.

Discussion:

Addresses US 148

std::array does not support class-template deduction from initializers without a deduction guide.

Proposed change:

Add to <array> synopsis:

template <class TYPES>
array(TYPES&&...) -> array<common_type_t<TYPES...>, sizeof...(TYPES)>;

[2017-03-12, post-Kona]

Resolved by P0433R2.

Proposed resolution:

This wording is relative to N4618.

  1. Add to the synopsis of <array>:

    
    template <class TYPES>
    array(TYPES&&...) -> array<common_type_t<TYPES...>, sizeof...(TYPES)>;