feat: add is_std_forward_list

std::forward_list does not have push_back, insert, or emplace but
push_front, insert_after, and emplace_after. We need to distinguish it
from other continers.
This commit is contained in:
ToruNiina 2020-03-27 18:02:37 +09:00
parent fcd6e47500
commit 5212992f05

View File

@ -7,6 +7,7 @@
#include <chrono>
#include <tuple>
#include <string>
#include <forward_list>
#if __cplusplus >= 201703L
#if __has_include(<string_view>)
#include <string_view>
@ -157,6 +158,10 @@ template<typename T> struct is_std_tuple : std::false_type{};
template<typename ... Ts>
struct is_std_tuple<std::tuple<Ts...>> : std::true_type{};
template<typename T> struct is_std_forward_list : std::false_type{};
template<typename T>
struct is_std_forward_list<std::forward_list<T>> : std::true_type{};
template<typename T> struct is_chrono_duration: std::false_type{};
template<typename Rep, typename Period>
struct is_chrono_duration<std::chrono::duration<Rep, Period>>: std::true_type{};