LLFIO v2.00
Loading...
Searching...
No Matches
config.hpp File Reference

Configures a compiler environment for LLFIO header and source code. More...

#include <iostream>
#include "quickcpplib/cpp_feature.h"
#include "quickcpplib/import.h"
#include "quickcpplib/config.hpp"
#include "quickcpplib/utils/thread.hpp"
#include <filesystem>
#include <ctime>
#include "quickcpplib/bitfield.hpp"
#include "quickcpplib/scope.hpp"
#include "quickcpplib/span.hpp"
#include <optional>
#include "quickcpplib/byte.hpp"
#include <string_view>
#include "quickcpplib/function_ptr.hpp"
#include "quickcpplib/mem_flush_loads_stores.hpp"
#include "quickcpplib/start_lifetime_as.hpp"
#include "quickcpplib/detach_cast.hpp"
#include "quickcpplib/in_place_detach_attach.hpp"
#include "quickcpplib/spinlock.hpp"
#include "quickcpplib/memory_resource.hpp"
#include <cstdio>

Classes

struct  llfio_v2_xxx::path_hasher
 

Namespaces

namespace  llfio_v2_xxx
 The LLFIO namespace.
 
namespace  llfio_v2_xxx::algorithm
 Collection of file system based algorithms.
 
namespace  llfio_v2_xxx::storage_profile
 YAML databaseable empirical testing of a storage's behaviour.
 
namespace  llfio_v2_xxx::utils
 Utility routines often useful when using LLFIO.
 

Macros

#define LLFIO_HEADERS_ONLY   1
 Whether LLFIO is a headers only library. Defaults to 1.
 
#define LLFIO_DISABLE_PATHS_IN_FAILURE_INFO   not defined
 Define to not record the current handle's path in any failure info.
 
#define LLFIO_LOGGING_LEVEL   3
 How much detail to log. 0=disabled, 1=fatal, 2=error, 3=warn, 4=info, 5=debug, 6=all. Defaults to error level.
 
#define LLFIO_LOG_TO_OSTREAM   std::cerr
 Any ostream to also log to. If NDEBUG is not defined, std::cerr is the default.
 
#define LLFIO_LOG_BACKTRACE_LEVELS   ((1U << 1U) | (1U << 2U) | (1U << 3U))
 Bit mask of which log levels should be stack backtraced which will slow those logs thirty fold or so. Defaults to (1U<<1U)|(1U<<2U)|(1U<<3U) i.e. stack backtrace on fatal, error and warn logs.
 
#define LLFIO_LOGGING_MEMORY   (1024 * 1024)
 How much memory to use for the log. Defaults to 4Kb if NDEBUG defined, else 1Mb.
 
#define LLFIO_EXPERIMENTAL_STATUS_CODE   0
 Whether to use SG14 experimental status_code instead of std::error_code
 
#define LLFIO_EXCLUDE_DYNAMIC_THREAD_POOL_GROUP   1
 
#define LLFIO_EXCLUDE_NETWORKING   1
 
#define LLFIO_DISABLE_OPENSSL   1
 
#define LLFIO_V2   (QUICKCPPLIB_BIND_NAMESPACE_VERSION(llfio_v2))
 The namespace configuration of this LLFIO v2. Consists of a sequence of bracketed tokens later fused by the preprocessor into namespace and C++ module names.
 
#define LLFIO_V2_NAMESPACE   llfio_v2_xxx
 The namespace of this LLFIO v2 which will be some unknown inline namespace starting with v2_ inside the boost::llfio namespace.
 
#define LLFIO_V2_NAMESPACE_BEGIN
 Expands into the appropriate namespace markup to enter the LLFIO v2 namespace.
 
#define LLFIO_V2_NAMESPACE_EXPORT_BEGIN
 Expands into the appropriate namespace markup to enter the C++ module exported LLFIO v2 namespace.
 
#define LLFIO_V2_NAMESPACE_END   }
 Expands into the appropriate namespace markup to exit the LLFIO v2 namespace.
 
#define LLFIO_USING_STD_FILESYSTEM   1
 
#define LLFIO_DECL
 
#define LLFIO_THREAD_LOCAL_IS_CXX11   QUICKCPPLIB_THREAD_LOCAL_IS_CXX11
 
#define LLFIO_THREAD_LOCAL   QUICKCPPLIB_THREAD_LOCAL
 
#define LLFIO_NODISCARD   QUICKCPPLIB_NODISCARD
 
#define LLFIO_TEMPLATE(...)   QUICKCPPLIB_TEMPLATE(__VA_ARGS__)
 
#define LLFIO_TREQUIRES(...)   QUICKCPPLIB_TREQUIRES(__VA_ARGS__)
 
#define LLFIO_TEXPR(...)   QUICKCPPLIB_TEXPR(__VA_ARGS__)
 
#define LLFIO_TPRED(...)   QUICKCPPLIB_TPRED(__VA_ARGS__)
 
#define LLFIO_GLUE2(x, y)   x##y
 
#define LLFIO_GLUE(x, y)   LLFIO_GLUE2(x, y)
 
#define LLFIO_UNIQUE_NAME   LLFIO_GLUE(__t, __COUNTER__)
 
#define LLFIO_MAKE_FREE_FUNCTION
 
#define LLFIO_HEADERS_ONLY_FUNC_SPEC   extern LLFIO_DECL
 
#define LLFIO_HEADERS_ONLY_MEMFUNC_SPEC
 
#define LLFIO_HEADERS_ONLY_VIRTUAL_SPEC   virtual
 
#define LLFIO_EXCEPTION_TRY   if(true)
 
#define LLFIO_EXCEPTION_CATCH(init, ...)   else if(__VA_ARGS__ = init; false)
 
#define LLFIO_EXCEPTION_CATCH_ALL   else if(false)
 
#define LLFIO_EXCEPTION_THROW(...)
 
#define LLFIO_EXCEPTION_RETHROW
 

Typedefs

template<class T >
using llfio_v2_xxx::optional = std::optional< T >
 
template<typename charT , typename traits = std::char_traits<charT>>
using llfio_v2_xxx::basic_string_view = std::basic_string_view< charT, traits >
 
typedef basic_string_view< char, std::char_traits< char > > llfio_v2_xxx::string_view
 
typedef basic_string_view< wchar_t, std::char_traits< wchar_t > > llfio_v2_xxx::wstring_view
 
typedef basic_string_view< char16_t, std::char_traits< char16_t > > llfio_v2_xxx::u16string_view
 
typedef basic_string_view< char32_t, std::char_traits< char32_t > > llfio_v2_xxx::u32string_view
 
template<class F , size_t callable_storage_bytes = 32 - sizeof(uintptr_t)>
using llfio_v2_xxx::function_ptr = QUICKCPPLIB_NAMESPACE::function_ptr::function_ptr< F, callable_storage_bytes >
 
using llfio_v2_xxx::spinlock = QUICKCPPLIB_NAMESPACE::configurable_spinlock::spinlock< uintptr_t >
 
using llfio_v2_xxx::win::handle = void *
 
using llfio_v2_xxx::win::socket = uintptr_t
 
using llfio_v2_xxx::win::dword = unsigned long
 

Functions

template<class T , class U , typename std::enable_if<(std::is_unsigned< T >::value &&!std::is_same< std::decay_t< U >, std::nullptr_t >::value), bool >::type = true>
llfio_v2_xxx::detail::unsigned_integer_cast (U &&v)
 
template<class T , typename std::enable_if<(std::is_unsigned< T >::value), bool >::type = true>
llfio_v2_xxx::detail::unsigned_integer_cast (std::nullptr_t)
 
template<class T , class U , typename std::enable_if<(std::is_unsigned< T >::value), bool >::type = true>
llfio_v2_xxx::detail::unsigned_integer_cast (U *v)
 
size_t llfio_v2_xxx::detail::sizeof_filesystem_path () noexcept
 

Detailed Description

Configures a compiler environment for LLFIO header and source code.

Macro Definition Documentation

◆ LLFIO_EXCEPTION_THROW

#define LLFIO_EXCEPTION_THROW (   ...)
Value:
{ \
fprintf(stderr, "FATAL: throw " #__VA_ARGS__ " at " __FILE__ ":%d\n", __LINE__); \
abort(); \
}
462 { \
463 fprintf(stderr, "FATAL: throw " #__VA_ARGS__ " at " __FILE__ ":%d\n", __LINE__); \
464 abort(); \
465 }

Function Documentation

◆ unsigned_integer_cast() [1/3]

template<class T , typename std::enable_if<(std::is_unsigned< T >::value), bool >::type = true>
T llfio_v2_xxx::detail::unsigned_integer_cast ( std::nullptr_t  )
inline
382 {
383 return static_cast<T>(0);
384 }

◆ unsigned_integer_cast() [2/3]

template<class T , class U , typename std::enable_if<(std::is_unsigned< T >::value &&!std::is_same< std::decay_t< U >, std::nullptr_t >::value), bool >::type = true>
T llfio_v2_xxx::detail::unsigned_integer_cast ( U &&  v)
inline
376 {
377 return static_cast<T>(v);
378 }

◆ unsigned_integer_cast() [3/3]

template<class T , class U , typename std::enable_if<(std::is_unsigned< T >::value), bool >::type = true>
T llfio_v2_xxx::detail::unsigned_integer_cast ( U *  v)
inline
388 {
389 return static_cast<T>(reinterpret_cast<uintptr_t>(v));
390 }