Program Listing for File portability.hpp¶
↰ Return to documentation for file (include/wrench/utils/portability.hpp
)
//==--- wrench/utils/portability.hpp ----------------------- -*- C++ -*- ---==//
//
// Wrench
//
// Copyright (c) 2020 Rob Clucas
//
// This file is distributed under the MIT License. See LICENSE for details.
//
//==------------------------------------------------------------------------==//
//
//
//==------------------------------------------------------------------------==//
#ifndef WRENCH_UTILS_PORTABILITY_HPP
#define WRENCH_UTILS_PORTABILITY_HPP
#if defined(__linux__)
#define wrench_linux 1
#endif
#if defined(__APPLE__) && (__MACH__)
#define wrench_osx 1
#endif
#if defined(wrench_osx) || defined(wrench_linux)
#define wrench_unix 1
#endif
#if __cplusplus == 201703L
#define wrench_no_discard [[nodiscard]]
#else
#define wrench_no_discard
#endif
#endif // WRENCH_UTILS_PORTABILITY_HPP