add tests for vector assign iterator, and tests script

This commit is contained in:
hugogogo
2022-06-08 20:54:44 +02:00
parent 8c232df375
commit 5d0e631cb7
6 changed files with 82 additions and 116 deletions

View File

@@ -3,18 +3,6 @@
namespace ft {
//struct true_type {
// typedef bool value_type;
// typedef true_type type;
// static const bool value = true;
//};
//
//struct false_type {
// typedef T value_type;
// typedef false_type type;
// static const bool value = false;
//};
template <class T> struct is_integral
{
typedef char yes[1];
@@ -39,51 +27,6 @@ template <class T> struct is_integral
static yes& test(unsigned long int);
static yes& test(unsigned long long int);
/*
static yes& test(const bool);
static yes& test(const char);
static yes& test(const wchar_t);
static yes& test(const signed char);
static yes& test(const short int);
static yes& test(const int);
static yes& test(const long int);
static yes& test(const long long int);
static yes& test(const unsigned char);
static yes& test(const unsigned short int);
static yes& test(const unsigned int);
static yes& test(const unsigned long int);
static yes& test(const unsigned long long int);
static yes& test(volatile bool);
static yes& test(volatile char);
static yes& test(volatile wchar_t);
static yes& test(volatile signed char);
static yes& test(volatile short int);
static yes& test(volatile int);
static yes& test(volatile long int);
static yes& test(volatile long long int);
static yes& test(volatile unsigned char);
static yes& test(volatile unsigned short int);
static yes& test(volatile unsigned int);
static yes& test(volatile unsigned long int);
static yes& test(volatile unsigned long long int);
static yes& test(const volatile bool);
static yes& test(const volatile char);
static yes& test(const volatile wchar_t);
static yes& test(const volatile signed char);
static yes& test(const volatile short int);
static yes& test(const volatile int);
static yes& test(const volatile long int);
static yes& test(const volatile long long int);
static yes& test(const volatile unsigned char);
static yes& test(const volatile unsigned short int);
static yes& test(const volatile unsigned int);
static yes& test(const volatile unsigned long int);
static yes& test(const volatile unsigned long long int);
*/
// non-template function with direct matching are always considered first
// then the function template with direct matching are considered
// https://stackoverflow.com/questions/12877546/how-do-i-avoid-implicit-conversions-on
@@ -95,19 +38,6 @@ template <class T> struct is_integral
} // namespace ft
// "template <>" introduce a total specialization of a template :
//
// template <typename T>
// class A
// {
// // body for the general case
// };
//
// template <>
// class A<bool>
// {
// // body that only applies for T = bool
// };
//
// https://stackoverflow.com/questions/6288812/what-is-the-meaning-of-template-with-empty-angle-brackets-in-c
// SFINAE : https://jguegant.github.io/blogs/tech/sfinae-introduction.html