chromium/third_party/angle/src/common/platform_helpers.h

//
// Copyright 2023 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

// platform_helpers.h: common platform detection helper functions

#ifndef COMMON_PLATFORM_HELPERS_H_
#define COMMON_PLATFORM_HELPERS_H_

#include "common/platform.h"

namespace angle
{

inline constexpr bool IsAndroid()
{}

inline constexpr bool IsApple()
{}

inline constexpr bool IsChromeOS()
{}

inline constexpr bool IsFuchsia()
{}

inline constexpr bool IsIOS()
{}

inline constexpr bool IsLinux()
{}

inline constexpr bool IsMac()
{}

inline constexpr bool IsWindows()
{}

// Helper for version number comparisons
struct VersionTriple
{};

bool operator==(const VersionTriple &a, const VersionTriple &b);
bool operator!=(const VersionTriple &a, const VersionTriple &b);
bool operator<(const VersionTriple &a, const VersionTriple &b);
bool operator>=(const VersionTriple &a, const VersionTriple &b);

//
// Windows version check helpers
//

// Exact version checks
bool IsWindowsXP();
bool IsWindowsVista();
bool IsWindows7();
bool IsWindows8();
bool IsWindows10();
bool IsWindows11();

// Windows version or later helpers
bool IsWindowsXPOrLater();
bool IsWindowsVistaOrLater();
bool IsWindows7OrLater();
bool IsWindows8OrLater();
bool IsWindows10OrLater();
bool IsWindows11OrLater();

bool Is64Bit();

}  // namespace angle

#endif  // COMMON_PLATFORM_HELPERS_H_