assign sfinae is integral detection

This commit is contained in:
hugogogo
2022-06-08 15:24:44 +02:00
parent 647b6eee25
commit 8c232df375
5 changed files with 155 additions and 6 deletions

View File

@@ -4,9 +4,10 @@
# include "colors.h"
# include <iostream>
# include <string>
# include <memory> // std::allocator
# include <algorithm> // std::min
# include "enable_if.hpp"
# include "is_integral.hpp"
namespace ft {
@@ -96,7 +97,14 @@ public:
*************/
// assign ------------------------------------
template <class InputIterator>
void assign(InputIterator first, InputIterator last);
typename enable_if< !is_integral<InputIterator>::value,void >::type
assign(InputIterator first, InputIterator last);
// template <class InputIterator>
// void assign(InputIterator first, InputIterator last
// typename enable_if< !is_integral<InputIterator>::value, bool >::type == true);
// template <class InputIterator>
// typename enable_if< is_integral<InputIterator>::value,void >::type
// assign(size_type n, const value_type& val);
void assign(size_type n, const value_type& val);
// push_back ---------------------------------
void push_back(const value_type & val);