18#include "bitdefines.hpp"
20#ifdef BIT7Z_REGEX_MATCHING
29#ifdef BIT7Z_USE_STD_BYTE
33enum class byte_t :
unsigned char {};
47struct StringTraits< char > {
49 static inline auto convertToString( T value ) ->
std::string {
50 return std::to_string( value );
55struct StringTraits< wchar_t > {
57 static inline auto convertToString( T value ) ->
std::wstring {
58 return std::to_wstring( value );
69#define BIT7Z_NATIVE_STRING_( str ) L##str
70#define BIT7Z_NATIVE_STRING( str ) BIT7Z_NATIVE_STRING_( str )
73#define BIT7Z_NATIVE_STRING( str ) str
79#if defined( BIT7Z_USE_NATIVE_STRING ) && defined( _WIN32 )
81#define BIT7Z_STRING( str ) BIT7Z_NATIVE_STRING_( str )
84#define BIT7Z_STRING( str ) str
93#ifdef BIT7Z_REGEX_MATCHING
101template< typename T, typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type >
103 return StringTraits< tchar >::convertToString( arg );
117#if defined( _WIN32 ) && !defined( BIT7Z_USE_NATIVE_STRING )
123template<
typename From,
typename To >
The main namespace of the bit7z library.
Definition bit7zlibrary.hpp:30
unsigned char byte_t
A type representing a byte.
Definition bittypes.hpp:36
char tchar
Definition bittypes.hpp:83
std::basic_string< tchar > tstring
Definition bittypes.hpp:91
std::string native_string
Native string type of the system.
Definition bittypes.hpp:72