15#include "bitdefines.hpp"
17#ifdef BIT7Z_REGEX_MATCHING
31#ifdef BIT7Z_USE_STD_BYTE
35enum class byte_t :
unsigned char {};
49struct StringTraits< char > {
51 static auto convertToString( T value ) ->
std::string {
57struct StringTraits< wchar_t > {
59 static auto convertToString( T value ) -> std::wstring {
60 return std::to_wstring( value );
77#define BIT7Z_NATIVE_STRING_( str ) L##str
78#define BIT7Z_NATIVE_STRING( str ) BIT7Z_NATIVE_STRING_( str )
81#define BIT7Z_NATIVE_STRING( str ) str
92#if defined( BIT7Z_USE_NATIVE_STRING ) && defined( _WIN32 )
94#define BIT7Z_STRING( str ) BIT7Z_NATIVE_STRING_( str )
97#define BIT7Z_STRING( str ) str
106#ifdef BIT7Z_REGEX_MATCHING
121template< typename T, typename = typename std::enable_if< std::is_arithmetic< T >::value, T >::type >
123 return StringTraits< tchar >::convertToString( arg );
139#if defined( _WIN32 ) && !defined( BIT7Z_USE_NATIVE_STRING )
176template< typename T, typename = typename std::enable_if< std::is_arithmetic< T >::value, T >::type >
211#elif !defined( BIT7Z_USE_NATIVE_STRING )
220template<
typename Enum >
230template<
typename Enum >
238template<
typename From,
typename To >
The main namespace of the bit7z library.
Definition bit7zlibrary.hpp:29
auto to_native_string(T arg) -> native_string
Converts an arithmetic value to a native string.
Definition bittypes.hpp:177
unsigned char byte_t
A type representing a byte.
Definition bittypes.hpp:38
std::wstring sevenzip_string
The string type used internally by 7-Zip.
Definition bittypes.hpp:69
std::basic_regex< tchar > tregex
Definition bittypes.hpp:111
constexpr auto to_underlying(Enum enum_value) noexcept -> underlying_type_t< Enum >
Converts an enumerator to its underlying integer value.
Definition bittypes.hpp:231
char tchar
Definition bittypes.hpp:96
native_string::value_type native_char
The character type of the system's native string type.
Definition bittypes.hpp:87
std::basic_string< tchar > tstring
Definition bittypes.hpp:104
std::integral_constant< bool, std::is_constructible< To, From >::value && !std::is_convertible< From, To >::value > is_explicitly_convertible
Type trait that is true if and only if From is explicitly (but not implicitly) convertible to To.
Definition bittypes.hpp:239
typename std::underlying_type< Enum >::type underlying_type_t
Alias for the underlying integer type of the given enumeration type.
Definition bittypes.hpp:221
std::string native_string
Native string type of the system.
Definition bittypes.hpp:80
auto to_tstring(T arg) -> std::basic_string< tchar >
Converts an arithmetic value to a tstring.
Definition bittypes.hpp:122