moved json escape out of string files
This commit is contained in:
@@ -53,6 +53,8 @@ namespace raii{
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Base of all RAII strings. Its use is allowing passing of raii strings to functions without knowing the exact type
|
||||
class string_base : public string_expr
|
||||
{
|
||||
@@ -129,6 +131,8 @@ namespace raii{
|
||||
virtual char* _copy(const char*, size_t)const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//Supplies all functions that string_base can't implement
|
||||
template<class Allocator>
|
||||
class string_intermediary : public string_base
|
||||
@@ -210,6 +214,8 @@ namespace raii{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
//check for member function 'length'
|
||||
namespace detail{
|
||||
template<class T>
|
||||
@@ -227,6 +233,8 @@ namespace raii{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Like an expression template but not really
|
||||
template<class Left, class Right>
|
||||
class string_cat_expr : public string_expr
|
||||
@@ -297,6 +305,8 @@ namespace raii{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class Right, typename std::enable_if<raii::detail::is_string<Right>::value,void>::type* = nullptr>
|
||||
auto operator+(const char* left, Right&& right){
|
||||
return raii::string_cat_expr<const char*,decltype(std::forward<Right>(right))>(left, std::forward<Right>(right));
|
||||
|
||||
Reference in New Issue
Block a user