mirror of
https://github.com/opencv/opencv.git
synced 2026-12-02 13:16:32 -06:00
Re-exporting standard math and algorithm symbols from modules/core/include/opencv2/core/cvstd.hpp into `namespace cv` caused overload ambiguity between `cv::` array operations and `std::` scalar templates, and `using namespace std` in `datasets` and `hdf` public headers leaked `std` into downstream translation units. Those conflicts previously required extra `const Mat&` and `const UMat&` overloads of `cv::min` and `cv::max` in modules/core/include/opencv2/core.hpp. Drop `using std::min`, `std::max`, `std::swap`, `std::sqrt`, `std::exp`, `std::pow`, and `std::log` from `cvstd.hpp` (keeping `using std::abs`), `using std::nullptr_t` from `cvstd_wrapper.hpp`, and `using namespace std` from `track_vot.hpp`, `track_alov.hpp`, and `hdf5.hpp`. Remove the obsolete `Mat` and `UMat` `min`/`max` overloads, qualify affected calls across OpenCV modules with `std::`, and drop unused `using std::*` declarations from module sources. Simplify `std::pow(x, 0.5)` calls to `std::sqrt(x)`, collapse nested `std::min`/`std::max` chains to initializer-list calls, and replace constant-bound `min`/`max` pairs with `std::clamp`. Existing runtime behavior is unchanged.