Skip to content

Commit

Permalink
Update Language.h
Browse files Browse the repository at this point in the history
  • Loading branch information
flagarde authored May 10, 2024
1 parent 997338f commit 536cffb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions include/Khaos/Language.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
* \note Can be directly used in both preprocessor and compiler expressions.
*/

#define LANGUAGE_IS(language) (KHAOS_LANGUAGE_##language##_PRIVATE()) //NOSONAR
#define LANGUAGE_IS(language) (KHAOS_LANGUAGE_##language##_PRIVATE())

#if LANGUAGE_IS(C)
/** @hideinitializer
Expand All @@ -113,7 +113,7 @@
*
* \note Can be directly used in both preprocessor and compiler expressions.
*/
#define LANGUAGE_IS_GREATER(standard) (KHAOS_C_STANDARD_PRIVATE() > KHAOS_STANDARD_##standard##_PRIVATE()) //NOSONAR
#define LANGUAGE_IS_GREATER(standard) (KHAOS_C_STANDARD_PRIVATE() > KHAOS_STANDARD_##standard##_PRIVATE())
/** @hideinitializer
* Check if the C, CXX standard is greater or equal than \b standard.
* \param[in] standard The language to test.
Expand All @@ -122,7 +122,7 @@
*
* \note Can be directly used in both preprocessor and compiler expressions.
*/
#define LANGUAGE_IS_GREATER_EQUAL(standard) (KHAOS_C_STANDARD_PRIVATE() >= KHAOS_STANDARD_##standard##_PRIVATE()) //NOSONAR
#define LANGUAGE_IS_GREATER_EQUAL(standard) (KHAOS_C_STANDARD_PRIVATE() >= KHAOS_STANDARD_##standard##_PRIVATE())
/** @hideinitializer
* Check if the C, CXX standard is equal than \b standard.
* \param[in] standard The language to test.
Expand All @@ -131,7 +131,7 @@
*
* \note Can be directly used in both preprocessor and compiler expressions.
*/
#define LANGUAGE_IS_EQUAL(standard) (KHAOS_C_STANDARD_PRIVATE() == KHAOS_STANDARD_##standard##_PRIVATE()) //NOSONAR
#define LANGUAGE_IS_EQUAL(standard) (KHAOS_C_STANDARD_PRIVATE() == KHAOS_STANDARD_##standard##_PRIVATE())
/** @hideinitializer
* Check if the C, CXX standard is lower or equal than \b standard.
* \param[in] standard The language to test.
Expand All @@ -149,13 +149,13 @@
*
* \note Can be directly used in both preprocessor and compiler expressions.
*/
#define LANGUAGE_IS_LOWER(standard) (KHAOS_C_STANDARD_PRIVATE() < KHAOS_STANDARD_##standard##_PRIVATE()) //NOSONAR
#define LANGUAGE_IS_LOWER(standard) (KHAOS_C_STANDARD_PRIVATE() < KHAOS_STANDARD_##standard##_PRIVATE())
#elif LANGUAGE_IS(CXX)
#define LANGUAGE_IS_GREATER(standard) (KHAOS_CXX_STANDARD_PRIVATE() > KHAOS_STANDARD_##standard##_PRIVATE()) //NOSONAR
#define LANGUAGE_IS_GREATER_EQUAL(standard) (KHAOS_CXX_STANDARD_PRIVATE() >= KHAOS_STANDARD_##standard##_PRIVATE()) //NOSONAR
#define LANGUAGE_IS_EQUAL(standard) (KHAOS_CXX_STANDARD_PRIVATE() == KHAOS_STANDARD_##standard##_PRIVATE()) //NOSONAR
#define LANGUAGE_IS_LOWER_EQUAL(standard) (KHAOS_CXX_STANDARD_PRIVATE() <= KHAOS_STANDARD_##standard##_PRIVATE()) //NOSONAR
#define LANGUAGE_IS_LOWER(standard) (KHAOS_CXX_STANDARD_PRIVATE() < KHAOS_STANDARD_##standard##_PRIVATE()) //NOSONAR
#define LANGUAGE_IS_GREATER(standard) (KHAOS_CXX_STANDARD_PRIVATE() > KHAOS_STANDARD_##standard##_PRIVATE())
#define LANGUAGE_IS_GREATER_EQUAL(standard) (KHAOS_CXX_STANDARD_PRIVATE() >= KHAOS_STANDARD_##standard##_PRIVATE())
#define LANGUAGE_IS_EQUAL(standard) (KHAOS_CXX_STANDARD_PRIVATE() == KHAOS_STANDARD_##standard##_PRIVATE())
#define LANGUAGE_IS_LOWER_EQUAL(standard) (KHAOS_CXX_STANDARD_PRIVATE() <= KHAOS_STANDARD_##standard##_PRIVATE())
#define LANGUAGE_IS_LOWER(standard) (KHAOS_CXX_STANDARD_PRIVATE() < KHAOS_STANDARD_##standard##_PRIVATE())
#else
#define LANGUAGE_IS_GREATER(standard) (0L)
#define LANGUAGE_IS_GREATER_EQUAL(standard) (0L)
Expand Down

0 comments on commit 536cffb

Please sign in to comment.