File indexing completed on 2024-05-12 04:44:36

0001 // SPDX-FileCopyrightText: Lukas Sommer <sommerluk@gmail.com>
0002 // SPDX-License-Identifier: BSD-2-Clause OR MIT
0003 
0004 // Own header
0005 #include "version.h"
0006 
0007 #include <limits>
0008 
0009 static_assert(std::numeric_limits<decltype(PERCEPTUALCOLOR_COMPILE_TIME_VERSION_MAJOR)>::is_integer);
0010 static_assert(PERCEPTUALCOLOR_COMPILE_TIME_VERSION_MAJOR >= 0);
0011 
0012 static_assert(std::numeric_limits<decltype(PERCEPTUALCOLOR_COMPILE_TIME_VERSION_MINOR)>::is_integer);
0013 static_assert(PERCEPTUALCOLOR_COMPILE_TIME_VERSION_MINOR >= 0);
0014 
0015 static_assert(std::numeric_limits<decltype(PERCEPTUALCOLOR_COMPILE_TIME_VERSION_PATCH)>::is_integer);
0016 static_assert(PERCEPTUALCOLOR_COMPILE_TIME_VERSION_PATCH >= 0);
0017 
0018 static_assert(std::numeric_limits<decltype(PERCEPTUALCOLOR_COMPILE_TIME_VERSION)>::is_integer);
0019 static_assert(PERCEPTUALCOLOR_COMPILE_TIME_VERSION >= 1);
0020 
0021 namespace PerceptualColor
0022 {
0023 /** @brief Against which version of this library you are <em>running</em>.
0024  *
0025  * @returns The library version with major, minor and patch version.
0026  * Note that there is no pre-release identifier included. For example, if
0027  * your application is running against version 1.2.3-alpha of this library,
0028  * this function will return <tt>QVersionNumber(1, 2, 3)</tt>.
0029  *
0030  * To use this function, include <tt>version.h</tt>
0031  *
0032  * @sa @ref versioninfo */
0033 QVersionNumber perceptualColorRunTimeVersion()
0034 {
0035     return QVersionNumber(PERCEPTUALCOLOR_COMPILE_TIME_VERSION_MAJOR, PERCEPTUALCOLOR_COMPILE_TIME_VERSION_MINOR, PERCEPTUALCOLOR_COMPILE_TIME_VERSION_PATCH);
0036 }
0037 
0038 } // namespace PerceptualColor