add new concepts and error and warn logger
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <set>
|
||||
#include "hack/concepts/concepts.hpp"
|
||||
#include "hack/logger/logger.hpp"
|
||||
|
||||
@@ -108,12 +109,6 @@ void example_is_any_container(const T& container)
|
||||
hack::log()("Any container with ", container.size(), " elements");
|
||||
}
|
||||
|
||||
template<hack::concepts::is_iterable T>
|
||||
void example_is_iterable(const T& iterable)
|
||||
{
|
||||
hack::log()("Iterable object");
|
||||
}
|
||||
|
||||
template<hack::concepts::is_sized T>
|
||||
void example_is_sized(const T& sized)
|
||||
{
|
||||
@@ -132,12 +127,6 @@ void check_support(const T& value)
|
||||
hack::log()("Type is supported");
|
||||
}
|
||||
|
||||
template<hack::concepts::is_contiguous_container T>
|
||||
void example_is_contiguous_container(const T& container)
|
||||
{
|
||||
hack::log()("Contiguous memory container");
|
||||
}
|
||||
|
||||
template<typename Container, typename Value>
|
||||
requires hack::concepts::can_push_front<Container, Value>
|
||||
void example_can_push_front(Container& container, Value&& value)
|
||||
@@ -200,11 +189,9 @@ auto main(int argc, char *argv[]) -> int
|
||||
example_is_fixed_array(fixed_array);
|
||||
example_is_std_array(std_array);
|
||||
example_is_any_container(vec);
|
||||
example_is_iterable(vec);
|
||||
example_is_sized(vec);
|
||||
check_support(a);
|
||||
check_support(custom);
|
||||
example_is_contiguous_container(vec);
|
||||
example_can_push_front(list, 0);
|
||||
example_can_push_back(vec, 99);
|
||||
example_can_find(set, 3);
|
||||
|
||||
Reference in New Issue
Block a user