stdex Additional custom or not Standard C++ covered algorithms

Loading...
Searching...
No Matches
windows.h
1/*
2 SPDX-License-Identifier: MIT
3 Copyright © 2023-2024 Amebis
4*/
5
6#pragma once
7
8// Windows.h #defines min and max, which collides with std::min and std::max.
9// Not only the collision problem, #defining min and max is plain wrong as it
10// causes multiple evaluations of parameter expressions.
11
12#ifndef NOMINMAX
13#define NOMINMAX
14#endif
15
16#include <windows.h>
17
18// In case somebody #included <windows.h> before us without #defining NOMINMAX
19#ifdef min
20#undef min
21#endif
22#ifdef max
23#undef max
24#endif