Relative Content

Tag Archive for c++template-argument-deductionc++23deduction-guide

Using deduction guide for array of pairs [duplicate]

This question already has answers here: How to pass variadic amount of `std::pair` with different 2nd types to a function (3 answers) Passing multiple std::pair to variadic template constructor using { }, { } (2 answers) Closed 14 days ago. Suppose I want to make an array of pairs: std::array my_pairs{ std::pair{1.23, 1}, std::pair{3.14, 2}, […]