Skip to content

Voltra/SupportClassLibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Support Class Library

WARNING: This is currently a Work In Progress

The SCL is a set of tools providing classes and utility functions that aim to ease the development of your applications.

You can have a look at the documentation here.

Organisation

Here is the namespace hierarchy:

  • scl - The englobing namespace
    • concepts - A concept-like library based around static_assert (mostly implemented as defined in cppreference)
    • tools - General purpose utility functions
    • exceptions - Exception types used in the library
    • utils - Utility classes (and rare functions), eg. Any or Opiontal or eventoString
    • stream - The stream API exposing stream creators, operations and terminators
      • details - Implementation details for streams (including the base iterator types)
      • creators - Grouping stream creation functions
      • operators - Grouping intermediate stream operation functions
      • terminators - Grouping end of stream operation functions
    • async - The asynchronous programming API
    • http - The HTTP API
    • detect - The feature/platform detection API

Here are some macros and their meaning:

  • Code based macros
    • realConst(type) - Gives a const version of the given type (equivalent to const type const, useful for pointers)
    • stringLiteral - The actual string literal type (so you don't have to learn it by heart)
    • assert_concept - Compile time assertions of concepts outside of a block of code (must be simple concepts, not aggregates (e.g. Copyable vs Invocable))
    • static_require - Require concepts without giving an additional error message
    • META - The fully qualified namespace path to the meta namespace (actually is scl::tools::meta)
    • asString - The function that converts a variable to std::string using its ToString specialization
  • Flags
    • SCL_CPP14 - Define this flag to use the C++14 add-ons (e.g. is_final_t)
    • SCL_CPP17 - Define this flag to use the C++17 add-ons (e.g. is_swappable_t)
    • SCL_CONCEPTS_REQUIRE_IS_VOID - Define this flag to replace constexpr bool require() with constexpr void require()
    • SCL_USE_IOSTREAM_EXTEND - Define this flag if you wish to use the general purpose operator<< for ostream that uses std::to_string and scl::utils::toString for conversions
    • SCL_ENABLE_DEPRECATED_TYPEMODS - Define this flag if you wish to define the deprecated typemods (e.g. result_of_t)
    • SCL_ENABLE_DEPRECATED_TYPECHECKS - Define this flag if you wish to define the deprecated typechecks (e.g. is_pod_t)
    • SCL_KEEP_DETECT_MACROS - Define this flag if you wish to keep the macros for scl::detect defined