add identificato pattern
This commit is contained in:
11
bin/main.cpp
11
bin/main.cpp
@@ -7,6 +7,7 @@
|
||||
#include "hack/math/max.hpp"
|
||||
|
||||
#include "hack/patterns/ring_buffer.hpp"
|
||||
#include "hack/patterns/identificator.hpp"
|
||||
|
||||
auto main(int argc, char *argv[]) -> int
|
||||
{
|
||||
@@ -25,6 +26,16 @@ auto main(int argc, char *argv[]) -> int
|
||||
hack::log()(v);
|
||||
}
|
||||
|
||||
// patterns::identificator
|
||||
{
|
||||
struct a : public hack::patterns::identificator<>
|
||||
{} aa;
|
||||
a bb;
|
||||
a cc;
|
||||
a dd;
|
||||
hack::log()(aa.m_id, bb.m_id, cc.m_id, dd.m_id);
|
||||
}
|
||||
|
||||
// range::sort
|
||||
{
|
||||
std::vector<int> v { 4, 4, 6, 1, 4, 3, 2 };
|
||||
|
||||
Reference in New Issue
Block a user