kblib 0.2.3
General utilities library for modern C++
tdecl.h File Reference

Provides macros and basic templates used by the rest of kblib. More...

#include <cstddef>
Include dependency graph for tdecl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kblib::detail::tag< T >
 
struct  kblib::detail::no_dangle< T >
 
struct  kblib::detail::no_dangle< T && >
 

Namespaces

namespace  kblib
 The main namespace in which all entities from kblib are defined.
 
namespace  kblib::detail
 The namespace used for implementation details within kblib.
 

Macros

#define KBLIB_X(X)   X
 
#define KBLIB_VERS_MAJ   00
 
#define KBLIB_VERS_MIN   04
 
#define KBLIB_VERS_REV   00
 
#define KBLIB_VERS_I(P, MAJ, MIN, REV)   KBLIB_VERS_I2(P, MAJ, MIN, REV)
 
#define KBLIB_VERS_I2(P, MAJ, MIN, REV)   P##MAJ##MIN##REV
 
#define KBLIB_VERS_S    KBLIB_VERS_I(KBV, KBLIB_VERS_MAJ, KBLIB_VERS_MIN, KBLIB_VERS_REV)
 
#define KBLIB_VERS    KBLIB_VERS_I(1, KBLIB_VERS_MAJ, KBLIB_VERS_MIN, KBLIB_VERS_REV)
 
#define KBLIB_USE_CXX17   0
 This internal macro is used to determine if kblib can use C++17 features. More...
 
#define KBLIB_USE_CXX20   0
 This internal macro is used to determine if kblib can use C++20 features. More...
 
#define KBLIB_CXX20(args)
 This internal macro is used to selectively use C++20 features. More...
 
#define KBLIB_VERS_NS_I(VS, CXX17, CXX_SV, CXX20)    KBLIB_VERS_NS_I2(VS, CXX17, CXX_SV, CXX20)
 
#define KBLIB_VERS_NS_I2(VS, CXX17, CXX_SV, CXX20)   VS##_##CXX17##CXX_SV##CXX20
 
#define KBLIB_VERS_NS
 
#define KBLIB_NS   kblib
 
#define KBLIB_NODISCARD   [[nodiscard]]
 This internal macro is used to provide a fallback for [[nodiscard]] in C++14. More...
 
#define KBLIB_UNUSED   [[maybe_unused]]
 This internal macro is used to provide a fallback for [[maybe_unused]] in C++14. More...
 
#define KBLIB_CONSTANT   constexpr inline
 
#define KBLIB_CONSTANT_V   constexpr inline bool
 
#define KBLIB_CONSTANT_M   constexpr inline static
 
#define KBLIB_CONSTANT_MV   constexpr inline static bool
 

Typedefs

template<typename T >
using kblib::detail::no_dangle_t = typename no_dangle< T >::type
 

Enumerations

enum class  kblib::endian { kblib::unknown , kblib::little , kblib::big , kblib::weird }
 

Functions

constexpr auto kblib::detail::get_hash_order () -> endian
 

Variables

constexpr endian kblib::system_endian = endian::unknown
 
constexpr endian kblib::hash_order = detail::get_hash_order()
 

Detailed Description

Provides macros and basic templates used by the rest of kblib.

Author
killerbee
Date
2019-2021

Definition in file tdecl.h.

Macro Definition Documentation

◆ KBLIB_CONSTANT

#define KBLIB_CONSTANT   constexpr inline

Definition at line 137 of file tdecl.h.

◆ KBLIB_CONSTANT_M

#define KBLIB_CONSTANT_M   constexpr inline static

Definition at line 139 of file tdecl.h.

◆ KBLIB_CONSTANT_MV

#define KBLIB_CONSTANT_MV   constexpr inline static bool

Definition at line 140 of file tdecl.h.

◆ KBLIB_CONSTANT_V

#define KBLIB_CONSTANT_V   constexpr inline bool

Definition at line 138 of file tdecl.h.

◆ KBLIB_CXX20

#define KBLIB_CXX20 (   args)

This internal macro is used to selectively use C++20 features.

Definition at line 96 of file tdecl.h.

◆ KBLIB_NODISCARD

#define KBLIB_NODISCARD   [[nodiscard]]

This internal macro is used to provide a fallback for [[nodiscard]] in C++14.

Definition at line 129 of file tdecl.h.

◆ KBLIB_NS

#define KBLIB_NS   kblib

Definition at line 113 of file tdecl.h.

◆ KBLIB_UNUSED

#define KBLIB_UNUSED   [[maybe_unused]]

This internal macro is used to provide a fallback for [[maybe_unused]] in C++14.

Definition at line 130 of file tdecl.h.

◆ KBLIB_USE_CXX17

#define KBLIB_USE_CXX17   0

This internal macro is used to determine if kblib can use C++17 features.

Definition at line 63 of file tdecl.h.

◆ KBLIB_USE_CXX20

#define KBLIB_USE_CXX20   0

This internal macro is used to determine if kblib can use C++20 features.

Definition at line 74 of file tdecl.h.

◆ KBLIB_VERS

#define KBLIB_VERS    KBLIB_VERS_I(1, KBLIB_VERS_MAJ, KBLIB_VERS_MIN, KBLIB_VERS_REV)

Definition at line 52 of file tdecl.h.

◆ KBLIB_VERS_I

#define KBLIB_VERS_I (   P,
  MAJ,
  MIN,
  REV 
)    KBLIB_VERS_I2(P, MAJ, MIN, REV)

Definition at line 45 of file tdecl.h.

◆ KBLIB_VERS_I2

#define KBLIB_VERS_I2 (   P,
  MAJ,
  MIN,
  REV 
)    P##MAJ##MIN##REV

Definition at line 46 of file tdecl.h.

◆ KBLIB_VERS_MAJ

#define KBLIB_VERS_MAJ   00

Definition at line 42 of file tdecl.h.

◆ KBLIB_VERS_MIN

#define KBLIB_VERS_MIN   04

Definition at line 43 of file tdecl.h.

◆ KBLIB_VERS_NS

#define KBLIB_VERS_NS
Value:
KBLIB_VERS_NS_I(KBLIB_VERS_S, KBLIB_USE_CXX17, KBLIB_USE_STRING_VIEW, \
#define KBLIB_VERS_NS_I(VS, CXX17, CXX_SV, CXX20)
Definition: tdecl.h:100
#define KBLIB_USE_CXX20
This internal macro is used to determine if kblib can use C++20 features.
Definition: tdecl.h:74
#define KBLIB_USE_CXX17
This internal macro is used to determine if kblib can use C++17 features.
Definition: tdecl.h:63
#define KBLIB_VERS_S
Definition: tdecl.h:49

Definition at line 104 of file tdecl.h.

◆ KBLIB_VERS_NS_I

#define KBLIB_VERS_NS_I (   VS,
  CXX17,
  CXX_SV,
  CXX20 
)     KBLIB_VERS_NS_I2(VS, CXX17, CXX_SV, CXX20)

Definition at line 100 of file tdecl.h.

◆ KBLIB_VERS_NS_I2

#define KBLIB_VERS_NS_I2 (   VS,
  CXX17,
  CXX_SV,
  CXX20 
)    VS##_##CXX17##CXX_SV##CXX20

Definition at line 102 of file tdecl.h.

◆ KBLIB_VERS_REV

#define KBLIB_VERS_REV   00

Definition at line 44 of file tdecl.h.

◆ KBLIB_VERS_S

#define KBLIB_VERS_S    KBLIB_VERS_I(KBV, KBLIB_VERS_MAJ, KBLIB_VERS_MIN, KBLIB_VERS_REV)

Definition at line 49 of file tdecl.h.

◆ KBLIB_X

#define KBLIB_X (   X)    X

Definition at line 40 of file tdecl.h.