Visual Studio Code – std::binary_search and lower_bound with array of unique_ptr
I've been trying to use std::binary_search and std::lower_bound on std::array<unique_ptr<int>> just to get to grips with it. I was having trouble with the following : #include <array> #include <memory> #include <algorithm> int main() { std::array<std::unique_ptr<int>, 3> a = {std::make_unique<int>(1), std::make_unique<int>(2),…