Skip to content

Commit 971f432

Browse files
add default constructor to vtr::array
1 parent 57d1006 commit 971f432

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

libs/libvtrutil/src/vtr_array.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,23 @@ class array {
3535
* @tparam Args Types of the values being passed. All must be convertible to V.
3636
* @param args The values to initialize the array with. Must match the array size.
3737
*//**
38-
* @brief Construct a vtr::array from a list of values.
39-
*
40-
* This constructor allows direct brace-initialization of the array:
41-
* @code
42-
* vtr::array<MyId, int, 3> arr{1, 2, 3};
43-
* @endcode
44-
*
45-
* @tparam Args Types of the values being passed. All must be convertible to V.
46-
* @param args The values to initialize the array with. Must match the array size.
47-
*/
38+
* @brief Construct a vtr::array from a list of values.
39+
*
40+
* This constructor allows direct brace-initialization of the array:
41+
* @code
42+
* vtr::array<MyId, int, 3> arr{1, 2, 3};
43+
* @endcode
44+
*
45+
* @tparam Args Types of the values being passed. All must be convertible to V.
46+
* @param args The values to initialize the array with. Must match the array size.
47+
*/
4848
template<typename... Args,
4949
typename = std::enable_if_t<sizeof...(Args) == N &&
5050
std::conjunction_v<std::is_convertible<Args, V>...>>>
5151
constexpr array(Args&&... args)
5252
: data_{ { std::forward<Args>(args)... } } {}
5353

54+
array() = default;
5455

5556

5657
///@brief Access element with strong ID

0 commit comments

Comments
 (0)