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_VERS   1000203
 
#define KBLIB_VERS_MAJ   0
 
#define KBLIB_VERS_MIN   2
 
#define KBLIB_VERS_REV   3
 
#define KBLIB_VERS_S   KBLIB_VERS_MAJ##_##KBLIB_VERS_MIN##_##KBLIB_VERS_REV
 
#define KBLIB_VERS_NS   api_v##KBLIB_VERS_S
 
#define KBLIB_USE_CXX17   __cplusplus >= 201703L
 This internal macro is used to determine if kblib can use C++17 features. More...
 
#define KBLIB_USE_CXX20   __cplusplus >= 202002L
 This internal macro is used to determine if kblib can use C++20 features. More...
 
#define KBLIB_USE_STRING_VIEW   __cpp_lib_string_view
 This internal macro is used to determine if kblib can use C++17's std::string_view. More...
 
#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
 
#define KBLIB_CONSTANT_V   constexpr bool
 
#define KBLIB_CONSTANT_M   constexpr inline static
 
#define KBLIB_CONSTANT_MV   constexpr inline static bool
 
#define KBLIB_CXX20(args)
 This internal macro is used to selectively use C++20 features. More...
 

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

Definition at line 98 of file tdecl.h.

◆ KBLIB_CONSTANT_M

#define KBLIB_CONSTANT_M   constexpr inline static

Definition at line 100 of file tdecl.h.

◆ KBLIB_CONSTANT_MV

#define KBLIB_CONSTANT_MV   constexpr inline static bool

Definition at line 101 of file tdecl.h.

◆ KBLIB_CONSTANT_V

#define KBLIB_CONSTANT_V   constexpr bool

Definition at line 99 of file tdecl.h.

◆ KBLIB_CXX20

#define KBLIB_CXX20 (   args)

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

Definition at line 116 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 81 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 92 of file tdecl.h.

◆ KBLIB_USE_CXX17

#define KBLIB_USE_CXX17   __cplusplus >= 201703L

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

Definition at line 56 of file tdecl.h.

◆ KBLIB_USE_CXX20

#define KBLIB_USE_CXX20   __cplusplus >= 202002L

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

Definition at line 63 of file tdecl.h.

◆ KBLIB_USE_STRING_VIEW

#define KBLIB_USE_STRING_VIEW   __cpp_lib_string_view

This internal macro is used to determine if kblib can use C++17's std::string_view.

Definition at line 70 of file tdecl.h.

◆ KBLIB_VERS

#define KBLIB_VERS   1000203

Definition at line 41 of file tdecl.h.

◆ KBLIB_VERS_MAJ

#define KBLIB_VERS_MAJ   0

Definition at line 43 of file tdecl.h.

◆ KBLIB_VERS_MIN

#define KBLIB_VERS_MIN   2

Definition at line 44 of file tdecl.h.

◆ KBLIB_VERS_NS

#define KBLIB_VERS_NS   api_v##KBLIB_VERS_S

Definition at line 49 of file tdecl.h.

◆ KBLIB_VERS_REV

#define KBLIB_VERS_REV   3

Definition at line 45 of file tdecl.h.

◆ KBLIB_VERS_S

#define KBLIB_VERS_S   KBLIB_VERS_MAJ##_##KBLIB_VERS_MIN##_##KBLIB_VERS_REV

Definition at line 47 of file tdecl.h.