add is_string security
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace hack::range
|
||||
{
|
||||
// являются ли числа максимум и минимум последовательности
|
||||
template<typename T, typename... Args>
|
||||
bool within(const T min, const T max, Args... args)
|
||||
{
|
||||
|
||||
14
src/security/is_string.hpp
Normal file
14
src/security/is_string.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <variant>
|
||||
#include <type_traits>
|
||||
|
||||
namespace hack::security
|
||||
{
|
||||
template<typename T>
|
||||
struct is_string : public std::disjunction<
|
||||
std::is_same<char*, typename std::decay_t<T>>,
|
||||
std::is_same<const char*, typename std::decay_t<T>>,
|
||||
std::is_same<std::string, typename std::decay_t<T>>> {};
|
||||
}
|
||||
Reference in New Issue
Block a user