Skip to content

Commit

Permalink
array: Add deduction guide
Browse files Browse the repository at this point in the history
This allows for the following usage of frg::array:
frg::array foo = {1, 2, 3};
  • Loading branch information
qookei committed Apr 26, 2023
1 parent 22126f9 commit a3692f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/frg/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ struct array {
bool operator==(const array &other) const = default;
};

template <typename T, typename ...Us>
array(T, Us...) -> array<T, 1 + sizeof...(Us)>;

namespace details {
template<typename ...Ts>
struct concat_size;
Expand Down

0 comments on commit a3692f2

Please sign in to comment.