stdex/include/stdex/windows.h
Simon Rozman 0560c7bce9 Add missing UTF-8 BOM
This is required on Windows with default charset set to Windows-1252 or
another non-UTF-8 charset.

Signed-off-by: Simon Rozman <simon@rozman.si>
2024-02-14 12:33:29 +01:00

25 lines
500 B
C++

/*
SPDX-License-Identifier: MIT
Copyright © 2023-2024 Amebis
*/
#pragma once
// Windows.h #defines min and max, which collides with std::min and std::max.
// Not only the collision problem, #defining min and max is plain wrong as it
// causes multiple evaluations of parameter expressions.
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
// In case somebody #included <windows.h> before us without #defining NOMINMAX
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif