From b39cbc28a0cf808d3bf9930ec358e4dbede5bc3a Mon Sep 17 00:00:00 2001 From: morell Date: Fri, 29 Jan 2021 16:28:46 +0300 Subject: [PATCH 01/41] Allocator: added --- module-1/homework/Allocators/.gitignore | 1 + module-1/homework/Allocators/CMakeLists.txt | 36 +++ .../homework/Allocators/CMakeLists.txt.in | 15 ++ .../Allocators/allocator/CMakeLists.txt | 4 + .../Allocators/allocator/allocator.cpp | 72 ++++++ .../homework/Allocators/allocator/allocator.h | 46 ++++ .../homework/Allocators/list/CMakeLists.txt | 7 + module-1/homework/Allocators/list/list.cpp | 223 ++++++++++++++++++ module-1/homework/Allocators/list/list.h | 160 +++++++++++++ module-1/homework/Allocators/task.md | 25 ++ 10 files changed, 589 insertions(+) create mode 100644 module-1/homework/Allocators/.gitignore create mode 100644 module-1/homework/Allocators/CMakeLists.txt create mode 100644 module-1/homework/Allocators/CMakeLists.txt.in create mode 100644 module-1/homework/Allocators/allocator/CMakeLists.txt create mode 100644 module-1/homework/Allocators/allocator/allocator.cpp create mode 100644 module-1/homework/Allocators/allocator/allocator.h create mode 100644 module-1/homework/Allocators/list/CMakeLists.txt create mode 100644 module-1/homework/Allocators/list/list.cpp create mode 100644 module-1/homework/Allocators/list/list.h create mode 100644 module-1/homework/Allocators/task.md diff --git a/module-1/homework/Allocators/.gitignore b/module-1/homework/Allocators/.gitignore new file mode 100644 index 00000000..c795b054 --- /dev/null +++ b/module-1/homework/Allocators/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/module-1/homework/Allocators/CMakeLists.txt b/module-1/homework/Allocators/CMakeLists.txt new file mode 100644 index 00000000..06a12b9d --- /dev/null +++ b/module-1/homework/Allocators/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.16) + +include(GoogleTest) + +project("runner") + +configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) + +execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) + +if(result) + message(FATAL_ERROR "CMake step for googletest failed: ${result}") +endif() +execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) +if(result) + message(FATAL_ERROR "Build step for googletest failed: ${result}") +endif() + +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + +add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src + ${CMAKE_CURRENT_BINARY_DIR}/googletest-build + EXCLUDE_FROM_ALL) + +if (CMAKE_VERSION VERSION_LESS 2.8.11) + include_directories("${gtest_SOURCE_DIR}/include") +endif() + +add_executable(runner list.h list.cpp) +target_link_libraries(runner gtest_main) +add_test(NAME runner_test COMMAND runner) \ No newline at end of file diff --git a/module-1/homework/Allocators/CMakeLists.txt.in b/module-1/homework/Allocators/CMakeLists.txt.in new file mode 100644 index 00000000..f98ccb4a --- /dev/null +++ b/module-1/homework/Allocators/CMakeLists.txt.in @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8.2) + +project(googletest-download NONE) + +include(ExternalProject) +ExternalProject_Add(googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG master + SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" + BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) \ No newline at end of file diff --git a/module-1/homework/Allocators/allocator/CMakeLists.txt b/module-1/homework/Allocators/allocator/CMakeLists.txt new file mode 100644 index 00000000..44168e93 --- /dev/null +++ b/module-1/homework/Allocators/allocator/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.16) +project("Tutorial") + +add_executable(allocator allocator.cpp allocator.h) \ No newline at end of file diff --git a/module-1/homework/Allocators/allocator/allocator.cpp b/module-1/homework/Allocators/allocator/allocator.cpp new file mode 100644 index 00000000..e93c9668 --- /dev/null +++ b/module-1/homework/Allocators/allocator/allocator.cpp @@ -0,0 +1,72 @@ +#include "allocator.h" + +template +SimpleAllocator::SimpleAllocator() { + arena = ::operator new(2000 * sizeof(T)); +} + +template +SimpleAllocator::SimpleAllocator(const SimpleAllocator& other) noexcept : + arena(other.arena) +{ +} + +template +template +SimpleAllocator::SimpleAllocator(const SimpleAllocator& other) noexcept : + arena(other.arena) +{ +} + +template +SimpleAllocator::~SimpleAllocator() +{ + num_allocators--; + if (num_allocators) { + delete arena; + } +} + + +template +SimpleAllocator SimpleAllocator::select_on_container_copy_construction() const { + return SimpleAllocator(); +} + +template +T* SimpleAllocator::allocate(std::size_t n) { + return ::operator new(n * sizeof(T)); +} + +template +void SimpleAllocator::deallocate(void* p, std::size_t n) { + ::operator delete(p); +} + +template +bool operator==(const SimpleAllocator& lhs, const SimpleAllocator& rhs) noexcept { + return true; +} + +template +bool operator!=(const SimpleAllocator& lhs, const SimpleAllocator& rhs) noexcept { + return true; +} + +template +template +void SimpleAllocator::construct(void* p, Args&&... args) { + // new(p) - это new expression (конкретнее placement new expression), + // который вызывает new operator + + new(p) value_type(std::forward(args)...); +} + +template +void SimpleAllocator::destroy(void* p) { + ::delete(p); +} + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/homework/Allocators/allocator/allocator.h b/module-1/homework/Allocators/allocator/allocator.h new file mode 100644 index 00000000..1f9b301a --- /dev/null +++ b/module-1/homework/Allocators/allocator/allocator.h @@ -0,0 +1,46 @@ +#include +#include + +template +class SimpleAllocator { + private: + template + struct rebind { + using other = SimpleAllocator; + }; + + public: + + using value_type = T; + using pointer = T*; + using reference = T&; + using const_pointer = const T*; + using const_reference = const T&; + using size_type = std::size_t; + using pointer_difference = std::ptrdiff_t; + using propagate_on_container_move_assignment = std::false_type; + using propagate_on_container_copy_assignment = std::false_type; + using propogate_on_container_swap = std::false_type; + using is_always_equal = std::false_type; + + SimpleAllocator(); + SimpleAllocator(const SimpleAllocator& other) noexcept; + ~SimpleAllocator(); + + template + SimpleAllocator(const SimpleAllocator& other) noexcept; + + SimpleAllocator select_on_container_copy_construction() const; + + T* allocate(std::size_t n); + // void* allocate(std::size_t n, void* cvp); + void deallocate(void* p, std::size_t n); + // std::size_t max_size() const noexcept; + template + void construct(void* p, Args&&... args); + void destroy(void* p); + + private: + std::size_t num_allocators = 0; + void* arena; +}; \ No newline at end of file diff --git a/module-1/homework/Allocators/list/CMakeLists.txt b/module-1/homework/Allocators/list/CMakeLists.txt new file mode 100644 index 00000000..647a1205 --- /dev/null +++ b/module-1/homework/Allocators/list/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.16) +project("Tutorial") + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_executable(list list.cpp list.h) \ No newline at end of file diff --git a/module-1/homework/Allocators/list/list.cpp b/module-1/homework/Allocators/list/list.cpp new file mode 100644 index 00000000..321dc5af --- /dev/null +++ b/module-1/homework/Allocators/list/list.cpp @@ -0,0 +1,223 @@ +#include "list.h" + +// Special member functions +template +task::list::list() : + head(alloc.allocate(1)), + tail(alloc.allocate(1)) +{ + alloc.construct(head); + alloc.construct(tail); + head->next = tail; + tail->prev = head; +} + +template +task::list::list(const task::list& other) : + alloc(std::allocator_traits<__node_allocator>::select_on_container_copy_construction(other.alloc)), + head(alloc.allocate(1)), + tail(alloc.allocate(1)) +{ + alloc.construct(head); + alloc.construct(tail); + head->next = tail; + tail->prev = head; + +} + +template +task::list::list(const task::list& other, const Allocator& alloc) : + alloc(alloc), + head(alloc.allocate(1)), + tail(alloc.allocate(1)) +{ + alloc.construct(head); + alloc.construct(tail); + head->next = tail; + tail->prev = head; +} + +template +task::list::list(list&& other) : + // тут сценарии + // 1. вызывается user-defined(нами опеределенный) move constructor decltype(alloc) + // 2. вызывается move constructor decltype(alloc) + // 3. вызывается copy constructor decltype(alloc) т.к. const lvalue-ref может быть проиницализирована с rvalue expression + alloc(std::move(other.alloc)), + head(other.head), + tail(other.tail) +{ + other.head = nullptr; + other.tail = nullptr; +} + +template +task::list::list(list&& other, const Allocator& alloc) : + alloc(alloc), + head(other.head), + tail(other.tail) +{ + other.head = nullptr; + other.tail = nullptr; +} + +template +task::list::~list() { + alloc.destroy(head); + alloc.deallocate(head, 1); + alloc.destroy(tail); + alloc.deallocate(tail, 1); +} + +template +void assign(typename task::list::iterator left, typename task::list::iterator right) +{ + for (auto it = left; it != right; it++) { + push_back(*it); + } +} + +template +void task::list::clear() +{ + while(!empty()) { + pop_back(); + } +} + +template +task::list& task::list::operator=(const list& other) { + if (this == &other) { + return *this; + } + + if (std::allocator_traits::propagete_on_container_copy_assignment::value()) { + if (alloc != other.alloc) { + clear(); + } + alloc = other.alloc; + assign(other.begin(), other.end()); + } + return *this; +} + +template +task::list& task::list::operator=(list&& other) noexcept { + + clear(); + if (std::allocator_traits::propagete_on_container_move_assignment::value()) { + alloc = std::move(other.alloc); + head = other.head; + tail = other.tail; + other.head = nullptr; + other.tail = nullptr; + } else if (__node_allocator::is_always_equal::value() == std::true_type() || alloc == other.alloc()) { + head = other.head; + tail = other.tail; + other.head = nullptr; + other.tail = nullptr; + } else { + for (auto it = other.begin(); it != other.end(); it++) { + push_back(std::move(*it)); + } + } + + return *this; +} + +template +void task::list::push_back(const T& value) +{ + Node* p = static_cast(alloc.allocate(1)); + // Передаем value в construct -> вызываем copy constructor Node + alloc.construct(p, value); + p->next = tail; + p->prev = tail->prev; + tail->prev->next = p; + tail->prev = p; + size_++; +} + +template +void task::list::push_back(T&& value) +{ + Node* p = static_cast(alloc.allocate(1)); + // forward т.к. надо передать reference collapsing на место аругмента + // move сделал бы все expressions вида xvalue expression + alloc.construct(p, std::forward(value)); + p->next = tail; + p->prev = tail->prev; + tail->prev->next = p; + tail->prev = p; + size_++; +} + +template +template +void task::list::emplace_back(Args&&... args) +{ + Node* p = static_cast(alloc.allocate(1)); + alloc.construct(p, std::forward(args)...); + p->next = tail; + p->prev = tail->prev; + tail->prev->next = p; + tail->prev = p; + size_++; +} + +template +void task::list::pop_back() +{ + Node* p = tail->prev; + tail->prev->next = tail; + tail->prev = p->prev; + alloc.destroy(p); + alloc.deallocate(p, 1); + size_--; +} + +template +typename task::list::allocator_type task::list::get_allocator() const noexcept { + return allocator_type(alloc); +} + +// Modifiers +template +void task::list::swap(list& other) noexcept +{ + // использовал decltype, чтобы не писать __node_allocator + if (!std::allocator_traits::propogate_on_container_swap::value && get_allocator() != other.get_allocator()) { + std::exit(0); + } + // стандарт запрещает делать swap на элементах контейнера + // но head, tail - это хелперы, требования на них не распространяются + utility::__swap_allocator(alloc, other.alloc); + std::swap(head, other.head); + std::swap(tail, other.tail); +} + +template +typename task::list::iterator task::list::begin() noexcept { + return iterator(head->next); +} + +template +typename task::list::iterator task::list::end() noexcept { + return iterator(tail); +} + +// Capacity +template +bool task::list::empty() const noexcept { + return size_ == 0; +} + +template +typename task::list::size_type task::list::size() const noexcept { + return size_; +} + +int main() { + task::list lst; + return 0; +} \ No newline at end of file diff --git a/module-1/homework/Allocators/list/list.h b/module-1/homework/Allocators/list/list.h new file mode 100644 index 00000000..d7527952 --- /dev/null +++ b/module-1/homework/Allocators/list/list.h @@ -0,0 +1,160 @@ +#pragma once + +#include +#include + +#include "../allocator/allocator.h" + +namespace utility { + //https://github.com/llvm-mirror/libcxx/blob/master/include/memory + template + void __swap_allocator(Allocator& lhs, Allocator& rhs) { + __swap_allocator(lhs, rhs, std::integral_constant::propagate_on_container_swap::value>()); + } + + template + void __swap_allocator(Allocator& lhs, Allocator& rhs, std::true_type) { + std::swap(lhs, rhs); + } + + template + void __swap_allocator(Allocator& lhs, Allocator& rhs, std::false_type) {} +}; + +namespace task { + +template> +class list { + +private: + class iterator; + +public: + + using value_type = T; + using allocator_type = Allocator; + using size_type = std::size_t; + using reference = value_type&; + using const_reference = const value_type&; + using pointer = typename std::allocator_traits::pointer; + using const_pointer = typename std::allocator_traits::const_pointer; + using iterator = iterator; + using const_iterator = const iterator; + using reverse_iterator = std::reverse_iterator; + using const_reverse_iterat = std::reverse_iterator; + + // Special member functions + list(); + // explicit list( const Allocator& alloc ); + // list(size_type count, const T& value, const Allocator& alloc = Allocator()); + // explicit list( size_type count, const Allocator& alloc = Allocator() ); + + list(const list& other); + list(const list& other, const Allocator& alloc); + + list(list&& other); + list(list&& other, const Allocator& alloc); + + ~list(); + + list& operator=(const list& other); + list& operator=(list&& other) noexcept; + + // // Element access + // reference front(); + // const reference front() const; + + // reference back(); + // const reference back() const; + + // // Iterators + iterator begin() noexcept; + // const_iterator begin() const noexcept; + + iterator end() noexcept; + // const_iterator end() noexcept; + + // // Capacity + bool empty() const noexcept; + size_type size() const noexcept; + // size_type max_size() const noexcept; + + // // Modifiers + void clear(); + void swap(list& other) noexcept; + + void push_back(const T& value); + void push_back(T&& value); + + template + void emplace_back(Args&&... args); + void pop_back(); + // void push_front(const T& value); + // void pop_front(); + // void resize(size_t count); + + // // Operations + // void remove(const T& value); + // void unique(); + // void sort(); + + allocator_type get_allocator() const noexcept; + +private: + void assign(iterator left, iterator right); + +private: + struct Node { + value_type value; + Node* next = nullptr; + Node* prev = nullptr; + + Node() = default; + + Node(value_type _value, Node* _next, Node* _prev) : + value(_value), + next(_next), + prev(_prev) + {} + + }; + + class iterator { + public: + iterator& operator++() { + ptr = ptr->next; + return *this; + } + + iterator operator++(int) { + iterator copy(*this); + operator++(); + return copy; + } + + iterator& operator--() { + ptr = ptr->prev; + return *this; + } + + iterator operator--(int) { + iterator copy(*this); + operator--(); + return copy; + } + + private: + Node* ptr = nullptr; + }; + +private: + typedef typename std::allocator_traits::template rebind_alloc __node_allocator; + +private: + __node_allocator alloc; + Node* head = nullptr; + Node* tail = nullptr; + size_type size_ = 0; +}; + +} \ No newline at end of file diff --git a/module-1/homework/Allocators/task.md b/module-1/homework/Allocators/task.md new file mode 100644 index 00000000..ba7228f4 --- /dev/null +++ b/module-1/homework/Allocators/task.md @@ -0,0 +1,25 @@ +# Allocator + +## Задание + +Взять свою имплементацию `list` из задания `List` + +Добавить: +* move-constructor +* move-assignment operator +* iterator (должен удовлетворять категории `LegacyBidirectionalIterator`) +* allocator для `Node` + * алгоритм размещения `Node` по алгоритму `StackAllocator` + * интерфейс по `C++11` + +Должно быть: +* `list.h` - интерфейс из задания `List` +* `list.cpp` - имплементация из задания `List` +* `allocator_11.h` - интерфейс аллокатора по `C++11` +* `allocator_11.cpp` - имплементация аллокатора по `C++11` + +Упрощение: для шаблонного параметра `T` предполагается + +```c++ +std::is_trivially_constructible::value <- true +``` \ No newline at end of file From e154c784fbd54700923b346c9dc8a6a9f97ccf4d Mon Sep 17 00:00:00 2001 From: morell Date: Sun, 31 Jan 2021 10:03:05 +0300 Subject: [PATCH 02/41] Allocators -> seminar15 --- module-1/homework/Allocators/.gitignore | 1 - module-1/homework/Allocators/task.md | 25 ------------------- .../seminar15/Allocator}/CMakeLists.txt | 0 .../seminar15/Allocator}/CMakeLists.txt.in | 0 .../Allocator}/allocator/CMakeLists.txt | 0 .../Allocator}/allocator/allocator.cpp | 0 .../Allocator}/allocator/allocator.h | 0 .../seminar15/Allocator}/list/CMakeLists.txt | 0 .../seminar15/Allocator}/list/list.cpp | 0 .../seminar15/Allocator}/list/list.h | 0 10 files changed, 26 deletions(-) delete mode 100644 module-1/homework/Allocators/.gitignore delete mode 100644 module-1/homework/Allocators/task.md rename module-1/{homework/Allocators => seminars/seminar15/Allocator}/CMakeLists.txt (100%) rename module-1/{homework/Allocators => seminars/seminar15/Allocator}/CMakeLists.txt.in (100%) rename module-1/{homework/Allocators => seminars/seminar15/Allocator}/allocator/CMakeLists.txt (100%) rename module-1/{homework/Allocators => seminars/seminar15/Allocator}/allocator/allocator.cpp (100%) rename module-1/{homework/Allocators => seminars/seminar15/Allocator}/allocator/allocator.h (100%) rename module-1/{homework/Allocators => seminars/seminar15/Allocator}/list/CMakeLists.txt (100%) rename module-1/{homework/Allocators => seminars/seminar15/Allocator}/list/list.cpp (100%) rename module-1/{homework/Allocators => seminars/seminar15/Allocator}/list/list.h (100%) diff --git a/module-1/homework/Allocators/.gitignore b/module-1/homework/Allocators/.gitignore deleted file mode 100644 index c795b054..00000000 --- a/module-1/homework/Allocators/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build \ No newline at end of file diff --git a/module-1/homework/Allocators/task.md b/module-1/homework/Allocators/task.md deleted file mode 100644 index ba7228f4..00000000 --- a/module-1/homework/Allocators/task.md +++ /dev/null @@ -1,25 +0,0 @@ -# Allocator - -## Задание - -Взять свою имплементацию `list` из задания `List` - -Добавить: -* move-constructor -* move-assignment operator -* iterator (должен удовлетворять категории `LegacyBidirectionalIterator`) -* allocator для `Node` - * алгоритм размещения `Node` по алгоритму `StackAllocator` - * интерфейс по `C++11` - -Должно быть: -* `list.h` - интерфейс из задания `List` -* `list.cpp` - имплементация из задания `List` -* `allocator_11.h` - интерфейс аллокатора по `C++11` -* `allocator_11.cpp` - имплементация аллокатора по `C++11` - -Упрощение: для шаблонного параметра `T` предполагается - -```c++ -std::is_trivially_constructible::value <- true -``` \ No newline at end of file diff --git a/module-1/homework/Allocators/CMakeLists.txt b/module-1/seminars/seminar15/Allocator/CMakeLists.txt similarity index 100% rename from module-1/homework/Allocators/CMakeLists.txt rename to module-1/seminars/seminar15/Allocator/CMakeLists.txt diff --git a/module-1/homework/Allocators/CMakeLists.txt.in b/module-1/seminars/seminar15/Allocator/CMakeLists.txt.in similarity index 100% rename from module-1/homework/Allocators/CMakeLists.txt.in rename to module-1/seminars/seminar15/Allocator/CMakeLists.txt.in diff --git a/module-1/homework/Allocators/allocator/CMakeLists.txt b/module-1/seminars/seminar15/Allocator/allocator/CMakeLists.txt similarity index 100% rename from module-1/homework/Allocators/allocator/CMakeLists.txt rename to module-1/seminars/seminar15/Allocator/allocator/CMakeLists.txt diff --git a/module-1/homework/Allocators/allocator/allocator.cpp b/module-1/seminars/seminar15/Allocator/allocator/allocator.cpp similarity index 100% rename from module-1/homework/Allocators/allocator/allocator.cpp rename to module-1/seminars/seminar15/Allocator/allocator/allocator.cpp diff --git a/module-1/homework/Allocators/allocator/allocator.h b/module-1/seminars/seminar15/Allocator/allocator/allocator.h similarity index 100% rename from module-1/homework/Allocators/allocator/allocator.h rename to module-1/seminars/seminar15/Allocator/allocator/allocator.h diff --git a/module-1/homework/Allocators/list/CMakeLists.txt b/module-1/seminars/seminar15/Allocator/list/CMakeLists.txt similarity index 100% rename from module-1/homework/Allocators/list/CMakeLists.txt rename to module-1/seminars/seminar15/Allocator/list/CMakeLists.txt diff --git a/module-1/homework/Allocators/list/list.cpp b/module-1/seminars/seminar15/Allocator/list/list.cpp similarity index 100% rename from module-1/homework/Allocators/list/list.cpp rename to module-1/seminars/seminar15/Allocator/list/list.cpp diff --git a/module-1/homework/Allocators/list/list.h b/module-1/seminars/seminar15/Allocator/list/list.h similarity index 100% rename from module-1/homework/Allocators/list/list.h rename to module-1/seminars/seminar15/Allocator/list/list.h From d449e3fdbfd860bfbd90e1035728a820f0564415 Mon Sep 17 00:00:00 2001 From: morell Date: Sun, 31 Jan 2021 10:05:04 +0300 Subject: [PATCH 03/41] homework: Allocator --- module-1/homework/Allocator/CMakeLists.txt | 40 +++ module-1/homework/Allocator/CMakeLists.txt.in | 15 + .../Allocator/src/allocator/CMakeLists.txt | 10 + .../Allocator/src/allocator/allocator.h | 41 +++ .../Allocator/src/list/CMakeLists.txt | 10 + module-1/homework/Allocator/src/list/list.h | 80 ++++++ module-1/homework/Allocator/task.md | 23 ++ module-1/homework/Allocator/tests.cpp | 261 ++++++++++++++++++ 8 files changed, 480 insertions(+) create mode 100644 module-1/homework/Allocator/CMakeLists.txt create mode 100644 module-1/homework/Allocator/CMakeLists.txt.in create mode 100644 module-1/homework/Allocator/src/allocator/CMakeLists.txt create mode 100644 module-1/homework/Allocator/src/allocator/allocator.h create mode 100644 module-1/homework/Allocator/src/list/CMakeLists.txt create mode 100644 module-1/homework/Allocator/src/list/list.h create mode 100644 module-1/homework/Allocator/task.md create mode 100644 module-1/homework/Allocator/tests.cpp diff --git a/module-1/homework/Allocator/CMakeLists.txt b/module-1/homework/Allocator/CMakeLists.txt new file mode 100644 index 00000000..34c00966 --- /dev/null +++ b/module-1/homework/Allocator/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.16) + +include(GoogleTest) + +project("runner") + +configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) + +execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) + +if(result) + message(FATAL_ERROR "CMake step for googletest failed: ${result}") +endif() +execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) +if(result) + message(FATAL_ERROR "Build step for googletest failed: ${result}") +endif() + +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + +add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src + ${CMAKE_CURRENT_BINARY_DIR}/googletest-build + EXCLUDE_FROM_ALL) + +if (CMAKE_VERSION VERSION_LESS 2.8.11) + include_directories("${gtest_SOURCE_DIR}/include") +endif() + +add_subdirectory(src/allocator) +add_subdirectory(src/list) +add_executable(runner tests.cpp) + +target_link_libraries(runner LINK_PUBLIC list allocator gtest_main) + +add_test(NAME runner_test COMMAND runner) \ No newline at end of file diff --git a/module-1/homework/Allocator/CMakeLists.txt.in b/module-1/homework/Allocator/CMakeLists.txt.in new file mode 100644 index 00000000..f98ccb4a --- /dev/null +++ b/module-1/homework/Allocator/CMakeLists.txt.in @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8.2) + +project(googletest-download NONE) + +include(ExternalProject) +ExternalProject_Add(googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG master + SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" + BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) \ No newline at end of file diff --git a/module-1/homework/Allocator/src/allocator/CMakeLists.txt b/module-1/homework/Allocator/src/allocator/CMakeLists.txt new file mode 100644 index 00000000..45936943 --- /dev/null +++ b/module-1/homework/Allocator/src/allocator/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.16) + +project("runner") + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_library(allocator INTERFACE) + +target_include_directories(allocator INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file diff --git a/module-1/homework/Allocator/src/allocator/allocator.h b/module-1/homework/Allocator/src/allocator/allocator.h new file mode 100644 index 00000000..827256c5 --- /dev/null +++ b/module-1/homework/Allocator/src/allocator/allocator.h @@ -0,0 +1,41 @@ +#include +#include + +template +class CustomAllocator { + public: + + using value_type = T; + // Your code goes here + + CustomAllocator(); + CustomAllocator(const CustomAllocator& other) noexcept; + ~CustomAllocator(); + + template + CustomAllocator(const CustomAllocator& other) noexcept; + + T* allocate(std::size_t n); + void deallocate(T* p, std::size_t n); + template + void construct(pointer p, Args&&... args); + void destroy(pointer p); + + template + friend bool operator==(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept; + template + friend bool operator!=(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept; + + private: + // Your code goes here +}; + +template +bool operator==(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept { + // Your code goes here +} + +template +bool operator!=(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept { + // Your code goes here +} \ No newline at end of file diff --git a/module-1/homework/Allocator/src/list/CMakeLists.txt b/module-1/homework/Allocator/src/list/CMakeLists.txt new file mode 100644 index 00000000..0ebe9234 --- /dev/null +++ b/module-1/homework/Allocator/src/list/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.16) + +project("runner") + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_library(list INTERFACE) + +target_include_directories(list INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file diff --git a/module-1/homework/Allocator/src/list/list.h b/module-1/homework/Allocator/src/list/list.h new file mode 100644 index 00000000..a0affdef --- /dev/null +++ b/module-1/homework/Allocator/src/list/list.h @@ -0,0 +1,80 @@ +#pragma once + +#include +#include +#include + +namespace task { + +template> +class list { + +public: + + using value_type = T; + // Your code goes here + + // Special member functions + list(); + + list(const list& other) { + // Your code goes here + } + list(const list& other, const Allocator& alloc); + + list(list&& other) : lst(std::move(other.lst)); + list(list&& other, const Allocator& alloc); + + ~list(); + + list& operator=(const list& other); + + list& operator=(list&& other) noexcept; + + // Element access + reference front(); + const_reference front() const; + reference back(); + const_reference back() const; + + // Iterators + iterator begin() noexcept; + const_iterator begin() const noexcept; + + iterator end() noexcept; + const_iterator end() const noexcept; + + // Capacity + bool empty() const noexcept; + size_type size() const noexcept; + size_type max_size() const noexcept; + + // Modifiers + void clear(); + void swap(list& other) noexcept; + + void push_back(const T& value); + void push_back(T&& value); + template + void emplace_back(Args&&... args); + void pop_back(); + void push_front(const T& value); + void push_front(T&& value); + template + void emplace_front(Args&&... args); + void pop_front(); + + void resize(size_type count); + + // Operations + void remove(const T& value); + void unique(); + void sort(); + + allocator_type get_allocator() const noexcept; + +private: + // Your code goes here +}; + +} \ No newline at end of file diff --git a/module-1/homework/Allocator/task.md b/module-1/homework/Allocator/task.md new file mode 100644 index 00000000..319350e2 --- /dev/null +++ b/module-1/homework/Allocator/task.md @@ -0,0 +1,23 @@ +# Allocator + +## Задание + +Взять свою имплементацию `list` из задания `List` + +Добавить: +* move-constructor +* move-assignment operator +* iterator (должен удовлетворять категории `LegacyBidirectionalIterator`) +* allocator для `Node`(должен удовлетворять [Allocator requirements](https://en.cppreference.com/w/cpp/named_req/Allocator)) + * алгоритм размещения `Node` по одному из [алгоритмов](https://github.com/mtrebi/memory-allocators) + * интерфейс по `C++11` + +Должно быть: +* `list.h` - интерфейс и имплементация из задания `List` +* `allocator.h` - интерфейс и имплементация аллокатора по `C++11` + +Упрощение: для шаблонного параметра `T` предполагается + +```c++ +std::is_trivially_constructible::value <- true +``` \ No newline at end of file diff --git a/module-1/homework/Allocator/tests.cpp b/module-1/homework/Allocator/tests.cpp new file mode 100644 index 00000000..4d88d43a --- /dev/null +++ b/module-1/homework/Allocator/tests.cpp @@ -0,0 +1,261 @@ +#include +#include +#include +#include + +#include "src/allocator/allocator.h" +#include "src/list/list.h" + +#include "gtest/gtest.h" + +TEST(CopyAssignment, Test) { + task::list> actual; + task::list> expected; + + for (std::size_t i = 0; i < 10; i++) { + expected.push_back("hello"); + } + + actual = expected; + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(MoveAssignment, Test1) { + std::list l1; + std::list l2; + std::list l3; + std::list l4; + + l1.push_back("hello"); + l2 = std::move(l1); + l3.push_back("hello"); + l4 = std::move(l3); + + ASSERT_TRUE(std::equal(l1.begin(), l1.end(), l3.begin(), l3.end())); + ASSERT_TRUE(std::equal(l2.begin(), l2.end(), l4.begin(), l4.end())); +} + +TEST(Front, Test1) { + task::list> actual; + std::list> expected; + + actual.push_back("hello"); + expected.push_back("hello"); + + actual.push_back("hello"); + expected.push_back("hello"); + + actual.push_back("hello"); + expected.push_back("hello"); + + actual.clear(); + expected.clear(); + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(Clear, Test1) { + task::list> actual; + std::list> expected; + + for (std::size_t i = 0; i < 10; i++) { + actual.push_back("hello"); + expected.push_back("hello"); + } + + actual.clear(); + expected.clear(); + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(Swap, Test1) { + task::list> actual; + std::list> expected; + + for (std::size_t i = 0; i < 10; i++) { + actual.push_back("hello"); + expected.push_back("hello"); + } + + task::list> actual2; + std::list> expected2; + + for (std::size_t i = 0; i < 10; i++) { + actual2.push_back("world"); + expected2.push_back("world"); + } + + actual.swap(actual2); + expected.swap(expected2); + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(PushBack, Test) { + std::vector actual_v(10, "hello"); + std::vector expected_v(10, "hello"); + task::list> actual; + std::list> expected; + + for (std::size_t i = 0; i < 10; i++) { + actual.push_back(std::move(actual_v[i])); + expected.push_back(std::move(expected_v[i])); + } + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(EmplaceBack, Test1) { + task::list> actual; + std::list> expected; + + for (std::size_t i = 0; i < 10; i++) { + actual.emplace_back("hello"); + expected.emplace_back("hello"); + } + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(PopBack, Test1) { + task::list> actual; + std::list> expected; + + for (std::size_t i = 0; i < 10; i++) { + actual.emplace_back("hello"); + expected.emplace_back("hello"); + } + + for (std::size_t i = 0; i < 5; i++) { + actual.pop_back(); + expected.pop_back(); + } + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(PushFront, Test1) { + std::vector actual_v(10, "hello"); + std::vector expected_v(10, "hello"); + task::list> actual; + std::list> expected; + + for (std::size_t i = 0; i < 10; i++) { + actual.push_front(actual_v[i]); + expected.push_front(expected_v[i]); + } + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(PushFront, Test2) { + std::vector actual_v(10, "hello"); + std::vector expected_v(10, "hello"); + task::list> actual; + std::list> expected; + + for (std::size_t i = 0; i < 10; i++) { + actual.push_front(std::move(actual_v[i])); + expected.push_front(std::move(expected_v[i])); + } + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(EmplaceFront, Test1) { + task::list> actual; + std::list> expected; + + for (std::size_t i = 0; i < 10; i++) { + actual.emplace_front("hello"); + expected.emplace_front("hello"); + } + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(PopFront, Test1) { + task::list> actual; + std::list> expected; + + for (std::size_t i = 0; i < 10; i++) { + actual.emplace_back("hello"); + expected.emplace_back("hello"); + } + + for (std::size_t i = 0; i < 5; i++) { + actual.pop_front(); + expected.pop_front(); + } + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(Resize, Test1) { + task::list> actual; + actual.resize(2); + ASSERT_EQ(actual.size(), 2); +} + +TEST(Remove, Test1) { + task::list> actual; + actual.push_back("hello"); + actual.push_back("world"); + actual.push_back("hello"); + actual.remove("hello"); + std::list> expected; + expected.push_back("world"); + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(Unique, Test1) { + task::list> actual; + actual.push_back("hello"); + actual.push_back("hello"); + actual.push_back("world"); + actual.push_back("world"); + actual.unique(); + std::list> expected; + expected.push_back("hello"); + expected.push_back("world"); + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(Sort, Test1) { + std::random_device random_device; + std::mt19937 random_engine(random_device()); + std::uniform_int_distribution distribution(1, 100); + + task::list actual; + std::list expected; + for (size_t i = 0; i < 100; ++i) { + int value = distribution(random_engine); + actual.push_back(value); + expected.push_back(value); + } + actual.sort(); + expected.sort(); + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +TEST(Mixed, Test1) { + task::list> actual; + std::list> expected; + + for (std::size_t i = 0; i < 5; i++) { + actual.push_back("hello"); + expected.push_back("hello"); + } + + for (std::size_t i = 0; i < 3; i++) { + actual.pop_front(); + expected.pop_front(); + } + + for (std::size_t i = 0; i < 5; i++) { + actual.push_front("world"); + expected.push_front("world"); + } + + for (std::size_t i = 0; i < 3; i++) { + actual.pop_back(); + expected.pop_back(); + } + ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); +} + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file From 1f1f2d51b07d5acfc3459160e33bbd493ec28f42 Mon Sep 17 00:00:00 2001 From: morell Date: Sun, 31 Jan 2021 10:58:21 +0300 Subject: [PATCH 04/41] CI: added --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..5e506e0b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: ci + +on: [pull_request] + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: tests + env: + TITLE: ${{github.event.pull_request.title}} + working-directory: ./module-1/homework/ + run: prname=${TITLE} && + cmake -B ${prname}/build -S ${prname} && + cmake --build ${prname}/build && + ./${prname}/build/runner \ No newline at end of file From 64c55c20d4b4e9907edf87e715611fa39a53a0a4 Mon Sep 17 00:00:00 2001 From: morell Date: Tue, 9 Feb 2021 21:26:22 +0300 Subject: [PATCH 05/41] Allocator: C++14 --- module-1/homework/Allocator/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module-1/homework/Allocator/CMakeLists.txt b/module-1/homework/Allocator/CMakeLists.txt index 34c00966..491fae8c 100644 --- a/module-1/homework/Allocator/CMakeLists.txt +++ b/module-1/homework/Allocator/CMakeLists.txt @@ -4,6 +4,9 @@ include(GoogleTest) project("runner") +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . From 353d44b8be783d09d7f74b12b40878086edd2e9d Mon Sep 17 00:00:00 2001 From: morell Date: Fri, 12 Feb 2021 15:27:42 +0300 Subject: [PATCH 06/41] seminar16: --- .../seminar16/unique_ptr/CMakeLists.txt | 8 + .../seminar16/unique_ptr/unique_ptr.cpp | 153 ++++++++++++++ .../seminars/seminar16/variant/CMakeLists.txt | 8 + .../seminar16/variant/__union_assignment.cpp | 46 ++++ .../seminar16/variant/find_exactly_one.cpp | 99 +++++++++ .../seminars/seminar16/variant/variant.cpp | 196 ++++++++++++++++++ 6 files changed, 510 insertions(+) create mode 100644 module-1/seminars/seminar16/unique_ptr/CMakeLists.txt create mode 100644 module-1/seminars/seminar16/unique_ptr/unique_ptr.cpp create mode 100644 module-1/seminars/seminar16/variant/CMakeLists.txt create mode 100644 module-1/seminars/seminar16/variant/__union_assignment.cpp create mode 100644 module-1/seminars/seminar16/variant/find_exactly_one.cpp create mode 100644 module-1/seminars/seminar16/variant/variant.cpp diff --git a/module-1/seminars/seminar16/unique_ptr/CMakeLists.txt b/module-1/seminars/seminar16/unique_ptr/CMakeLists.txt new file mode 100644 index 00000000..778b196c --- /dev/null +++ b/module-1/seminars/seminar16/unique_ptr/CMakeLists.txt @@ -0,0 +1,8 @@ +# ставим нижнее ограничение на версию cmake для сборки проекта +cmake_minimum_required(VERSION 3.16) + +# именуем проект: значение сохраняется в переменную PROJECT_NAME +project("lecture15") + +# создаем исполняемый target +add_executable(unique_ptr unique_ptr.cpp) \ No newline at end of file diff --git a/module-1/seminars/seminar16/unique_ptr/unique_ptr.cpp b/module-1/seminars/seminar16/unique_ptr/unique_ptr.cpp new file mode 100644 index 00000000..3c9b255f --- /dev/null +++ b/module-1/seminars/seminar16/unique_ptr/unique_ptr.cpp @@ -0,0 +1,153 @@ +#include +#include +#include +#include +#include + +// auto_ptr depreceted +void seg_fault() { + std::auto_ptr w1(new int(1)); + // делегировали содержимое w2 w1 + std::auto_ptr w2 = w1; + std::cout << *w1; +} + +// problem->solution +template +void problem() { + T* ptr = new T; + // ... + delete ptr; +} + +template +void solution(T) { + class unique_ptr { + public: + + ~unique_ptr() { + delete p; + } + + private: + T* p = nullptr; + }; +} + +// unique_move only +void copy_construct_error() { + std::unique_ptr u1(new int(1)); + // CE: + // std::unique_ptr u2(u1); +} + +void move_construct() { + std::unique_ptr u1(new int(1)); + std::unique_ptr u2(std::move(u1)); +} + +// std::unique_ptr has partial specualization for arrays +// it is semantically equal for new[] expression +void unique_partial() { + class container {}; + + std::unique_ptr u(new container[3]); + container* raw_p = new container[3]; +} + +// unique_has template parameter +void deleter() { + struct FileCloser { + void operator()(FILE* fp) const { + assert(fp != nullptr); + fclose(fp); + } + }; + // we don't worry about descriptor releasing + std::unique_ptr u(fopen("C:\\tmp.txt","w")); +} + +// Shared_ptr and simple_ref counting +void simple_ref_counting() { + struct Widget { + std::atomic usecount_{1}; + Widget* acquire() { + ++usecount_; + return this; + } + void release() { + if (--usecount_ == 0) { + delete this; + } + } + }; + + Widget* p = new Widget; + Widget* q = p->acquire(); + p->release(); + q->release(); // calls delete here + + // Problem: we call acquire, release explicitly, but shared_ptr automates these process +} + +// Solution: shared_ptr stores ptr to controll block. Control block increments ref_counts +void advanced_ref_counting() { + struct control_block { + std::size_t num_refs = 0; + }; + + struct my_shared_ptr { + + my_shared_ptr(int* p) : data(p) { + control_ptr = new control_block; + }; + my_shared_ptr(const my_shared_ptr& other) : + data(other.data), + control_ptr(other.control_ptr) + { + control_ptr->num_refs += 1; + } + + ~my_shared_ptr() { + control_ptr->num_refs -= 1; + if (control_ptr->num_refs == 0) { + delete data; + delete control_ptr; + } + } + + int* data; + control_block* control_ptr; + }; + + my_shared_ptr p1(new int(1)); + my_shared_ptr p2(p1); + std::cout << p2.control_ptr->num_refs; +} + +// Problem: raw new, delete +// make_shared, make_unique to the rescue! + +void evolution_of_consciousness() { + class Widget {}; + // Step1 + // explicit delete, explicit new + auto* w1 = new Widget; + delete w1; + + // Step2 + // no delete, but explicit new + std::shared_ptr w2(new Widget()); + + // Step3 + // no delete, no explicit new + auto w3 = std::make_shared(); + + +} + +// my_make_shared +template +std::shared_ptr my_make_shared(Args&&... args) { + return std::shared_ptr(new T(std::forward(args)...)); +} \ No newline at end of file diff --git a/module-1/seminars/seminar16/variant/CMakeLists.txt b/module-1/seminars/seminar16/variant/CMakeLists.txt new file mode 100644 index 00000000..0a4bafcf --- /dev/null +++ b/module-1/seminars/seminar16/variant/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +project("runner") + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_executable(variant variant.cpp) \ No newline at end of file diff --git a/module-1/seminars/seminar16/variant/__union_assignment.cpp b/module-1/seminars/seminar16/variant/__union_assignment.cpp new file mode 100644 index 00000000..de75b91e --- /dev/null +++ b/module-1/seminars/seminar16/variant/__union_assignment.cpp @@ -0,0 +1,46 @@ +#include +#include +#include + +template struct in_place_index_t { + explicit in_place_index_t() = default; +}; + +template +constexpr in_place_index_t in_place_index{}; + + +template +union __union; + +template +union __union<_Index> {}; + +template +union __union<_Index, T, _Types...> { + public: + template + void assign_helper(U&& value, in_place_index_t<0>, __union& u) { + u.head = value; + } + + template + void assign_helper(U&& value, in_place_index_t, __union& u) { + assign_helper(std::forward(value), in_place_index, u.tail); + } + + template + void assign(U&& value) { + assign_helper(std::forward(value), in_place_index, *this); + } + + T head; + __union<_Index + 1, _Types...> tail; + +}; +int main() { + __union<0, const char*, int, float> u; + u.assign<1>(1.2); + std::cout << u.tail.head; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar16/variant/find_exactly_one.cpp b/module-1/seminars/seminar16/variant/find_exactly_one.cpp new file mode 100644 index 00000000..bc248247 --- /dev/null +++ b/module-1/seminars/seminar16/variant/find_exactly_one.cpp @@ -0,0 +1,99 @@ + +// find_exactly_one_checked +// 1. пройтись по набору типов +// 2. там где совпал поставить 1 +// 3. пройтись по полученному набору 0 и 1 +// 4. если встретили 0 => идем дальше +// если встретили 1 и one_found = 0 => взводим флаг one_found = 1 и идем дальше +// если встретили 1 и one_found = 1 => возвращаем флаг ambiguity = -2 (что означет найдены повторы) + +// const static int not_founded = - 1; +// const static int ambiguity = not_founded - 1; + +// constexpr std::size_t simplified_condition(std::size_t i, std::size_t res, bool founded_value) { +// return (!founded_value) ? res : ((res == not_founded) ? i : ambiguity); +// } + +// template +// constexpr std::size_t __check_dublicates__(std::size_t cur_pos, const bool (&founded)[SizeofFounded]) { +// // условия: +// // если мы вышли за founded => по умолчанию считаем, что не нашли 1-ц=> возвращаем not_founded (1) +// // если в границах founded => возвращаем результат вызова из хвоста founded (2) +// // ниже condition (мы вышли за founded) ? (1) : (2) +// // (2). __check_dublicates__(cur_pos + 1, founded) - идем дальше по founded в хвост +// // перед вызовом simplified_condition мы обладаем значением __check_dublicates__(cur_pos + 1, founded) +// // т.е. проходим вглубь по __check_dublicates__ и возвращаем результат в simplified_condition +// return (cur_pos == SizeofFounded) ? not_founded : simplified_condition(cur_pos, __check_dublicates__(cur_pos + 1, founded), founded[cur_pos]); +// } + +// // в момент __check_dublicates__(cur_pos + 1, founded) возможные значения результата +// // not_founded : единицы не найдены в хвосте => т.е. хвост из 0 +// // founded_exaclty_one : единица найдена в хвосте и она единаственна +// // ambiguity : в хвосте несколько единиц +// // +// // Действие на основе значения: +// // not_founded : если founded[i] == 1 => пробрасываем founded_exaclty_one +// // : если founded[i] == 0 => пробрасываем not_founded +// // founded_exaclty_one : если founded[i] == 1 => пробрасываем ambiguity (т.к. сейчас 1 (по i позиции) и в хвосте 1-ца) +// // : если founded[i] == 0 => пробрасываем founded_exaclty_one (т.к. сейчас 0 (по i позиции) и в хвосте 1-ца) +// // ambiguity: продолжаем пробрасывать 1 + +// // Заметим, что при условии founded[i] == 0 пробрасывается возвращаемое значение +// // not_founded -> not_founded +// // founded_exaclty_one -> founded_exaclty_one +// // ambiguity -> ambiguity +// // тогда пишем +// // (!founded[i]) ? tail_has_ones : <тут остальные проверки> +// // +// // Заметим, что founded[i] == 1 пробрасывается: +// // not_founded -> founded_exaclty_one +// // founded_exaclty_one -> ambiguity +// // ambiguity -> ambiguity +// // тогда смотрим если пришел not_founded, то пробрасываем founded_exaclty_one, иначе пробрасывается ambiguity +// // +// // итог: (!founded[i]) ? tail_has_ones : (tail_has_ones == not_founded) ? founded_exaclty_one : ambiguity +// // получаем +// // +// // (!founded[i]) ? __check_dublicates__(cur_pos + 1, founded) : (__check_dublicates__(cur_pos + 1, founded) == not_founded) ? founded_exaclty_one : ambiguity +// // +// // но читать такое сложно!! +// // давайте данынй condition вынесем в отдельную функцию, а значения __check_dublicates__(cur_pos + 1, founded) будем туда передавать +// // +// // simplified_condition +// // std::size_t simplified_condition(std::size_t i, std::size_t res, bool founded_val) { +// // return (!founded_val) ? res : (res == not_founded) ? founded_exaclty_one : ambiguity; +// // } +// // вот founded_exaclty_one мы отдельно явно заводить не будем, под founded_exaclty_one мы продолжим пробрасывать текущий индекс понимая, что +// // семантически это founded_exaclty_one +// // +// // приходим к +// // +// // std::size_t simplified_condition(std::size_t i, std::size_t res, bool founded_val) { +// // return (!founded_val) ? res : (res == not_founded) ? i : ambiguity; +// // } + +// template +// struct _find_exactly_one_checked_ { +// // 1. пройтись по набору типов +// // 2. там где совпал поставить 1 +// constexpr static bool founded[sizeof...(Types)] = {std::is_same::value...}; +// // 3. пройтись по полученному набору 0 и 1 +// constexpr static std::size_t value = __check_dublicates__(0, founded); +// static_assert(value != not_founded, "type not found in type list" ); +// static_assert(value != ambiguity, "type occurs more than once in type list"); +// }; + +// template +// struct _find_exactly_one_checked_ { +// static_assert(!std::is_same::value, "type not in empty type list"); +// }; + +// template +// struct _find_exactly_one_t : public _find_exactly_one_checked_ { + +// }; + + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar16/variant/variant.cpp b/module-1/seminars/seminar16/variant/variant.cpp new file mode 100644 index 00000000..09f8fcdf --- /dev/null +++ b/module-1/seminars/seminar16/variant/variant.cpp @@ -0,0 +1,196 @@ +#include +#include +#include + +//----------------Helper structures---------------- + +template struct in_place_index_t { + explicit in_place_index_t() = default; +}; + +template +constexpr in_place_index_t in_place_index{}; + + +template +union __union; + +template +union __union<_Index> {}; + +template +union __union<_Index, T, _Types...> { + public: + + T head; + __union<_Index + 1, _Types...> tail; + + friend struct __access_union; +}; + +struct __assign_union { + template + static void assign_helper(U&& value, in_place_index_t<0>, __union& u) { + u.head = value; + } + + template + static void assign_helper(U&& value, in_place_index_t, __union& u) { + assign_helper(std::forward(value), in_place_index, u.tail); + } +}; + +struct __access_union { + template + static constexpr auto&& __get_alt(U&& __v, in_place_index_t<0>) { + return std::forward(__v).__head; + } + + + template + static constexpr auto&& __get_alt(U&& __v, in_place_index_t) { + // Логика __get_alt: выдать Idx шагов -> идти вправо по tail-> шаг сделан -> Idx - 1 -> на Idx=0 проверить есть ли head + return __get_alt(std::forward(__v).__tail, in_place_index); + } +}; + +struct __my_variant { + template + static constexpr auto&& __get_alt(T&& __v) { + return __access_union::__get_alt(std::forward(__v).__data, in_place_index); + } +}; +//----------------Helper structures---------------- + + +//----------------_find_exactly_one_t---------------- +const static int not_founded = - 1; +const static int ambiguity = not_founded - 1; + +constexpr std::size_t simplified_condition(std::size_t i, std::size_t res, bool founded_value) { + return (!founded_value) ? res : ((res == not_founded) ? i : ambiguity); +} + +template +constexpr std::size_t __check_dublicates__(std::size_t cur_pos, const bool (&founded)[SizeofFounded]) { + return (cur_pos == SizeofFounded) ? not_founded : simplified_condition(cur_pos, __check_dublicates__(cur_pos + 1, founded), founded[cur_pos]); +} + +template +struct _find_exactly_one_checked_ { + constexpr static bool founded[sizeof...(Types)] = {std::is_same::value...}; + constexpr static std::size_t value = __check_dublicates__(0, founded); + // static_assert(value != not_founded, "type not found in type list" ); + // static_assert(value != ambiguity, "type occurs more than once in type list"); +}; + +template +struct _find_exactly_one_checked_ { + static_assert(!std::is_same::value, "type not in empty type list"); +}; + +template +struct _find_exactly_one_t : public _find_exactly_one_checked_ {}; +//----------------_find_exactly_one_t---------------- + + +//----------------My variant---------------- +template +class my_variant { + + public: + __union<0, Types...> __data; + + public: + + my_variant() = default; + my_variant(Types... args) {}; + my_variant& operator=(const my_variant& other) { return *this; } + template::value> + my_variant& operator=(T&& value) { + __assign_union::assign_helper(std::forward(value), in_place_index, __data); + + return *this; + } + + private: + friend __my_variant; + +}; +//----------------My variant---------------- + + +//----------------Variant alternative---------------- +template +struct Typelist{ + typedef head Head; + typedef Typelist Tail; +}; + +template struct TypeAt; + +template +struct TypeAt<0, Typelist> { + typedef Head Result; +}; +template +struct TypeAt> { + typedef typename TypeAt>::Result Result; +}; + +template +struct variant_alternative; + +template +struct variant_alternative> { + // my_variant_alternative_t> - это упаковать Types... в TypeList / tuple и применить TypeAt + using type = typename TypeAt>::Result; +}; +template +using my_variant_alternative_t = typename variant_alternative::type; +//----------------Variant alternative---------------- + +//----------------Getters---------------- +template +auto&& generic_get(T&& v) { + // __my_variant друг my_variant => _my_variant может обратиться к полям my_variant + // друг может обратиться к полям my_variant + return __my_variant::__get_alt(std::forward(v))._value; +} + +template +my_variant_alternative_t>& get(my_variant& v) { + return generic_get(v); +} + +template +T& get(my_variant& v) { + std::cout << "get"; + const auto x = _find_exactly_one_t::value; + int y = 3; + return y; +} + +template +T&& get(my_variant&& v) { + return get<_find_exactly_one_t::value>(std::move(v)); +} +//----------------Getters---------------- + +int main() { + // План: + // 1. Разименовали строчку, добавили необходимый функционал (максимально общий / generic) + + // Нужен union с произвольным числом типов + // Реш: TypeList to the rescue! см __uinion + my_variant v, w; + // // нужен operator=, с правым операндом любого типа + // // Реш: добавляем operator=, принимающий по universal reference (converting assignment) + v = 1000; + + std::cout << v.__data.tail.head; + + // get: Segfault + //int i = get(v); + return 0; +} \ No newline at end of file From 693af30ac94b9b2b25ad706d740d390a6bde7a71 Mon Sep 17 00:00:00 2001 From: morell Date: Sat, 13 Feb 2021 18:08:42 +0300 Subject: [PATCH 07/41] homework: Variant --- module-1/homework/Variant/CMakeLists.txt | 47 +++++++++++++++++++++ module-1/homework/Variant/CMakeLists.txt.in | 15 +++++++ module-1/homework/Variant/task.md | 10 +++++ module-1/homework/Variant/tests.cpp | 30 +++++++++++++ module-1/homework/Variant/variant.h | 45 ++++++++++++++++++++ 5 files changed, 147 insertions(+) create mode 100644 module-1/homework/Variant/CMakeLists.txt create mode 100644 module-1/homework/Variant/CMakeLists.txt.in create mode 100644 module-1/homework/Variant/task.md create mode 100644 module-1/homework/Variant/tests.cpp create mode 100644 module-1/homework/Variant/variant.h diff --git a/module-1/homework/Variant/CMakeLists.txt b/module-1/homework/Variant/CMakeLists.txt new file mode 100644 index 00000000..7499ed82 --- /dev/null +++ b/module-1/homework/Variant/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.16) + +include(GoogleTest) + +project("runner") + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) + +execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) + +if(result) + message(FATAL_ERROR "CMake step for googletest failed: ${result}") +endif() +execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) +if(result) + message(FATAL_ERROR "Build step for googletest failed: ${result}") +endif() + +# Prevent overriding the parent project's compiler/linker +# settings on Windows +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + +# Add googletest directly to our build. This defines +# the gtest and gtest_main targets. +add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src + ${CMAKE_CURRENT_BINARY_DIR}/googletest-build + EXCLUDE_FROM_ALL) + +# The gtest/gtest_main targets carry header search path +# dependencies automatically when using CMake 2.8.11 or +# later. Otherwise we have to add them here ourselves. +if (CMAKE_VERSION VERSION_LESS 2.8.11) + include_directories("${gtest_SOURCE_DIR}/include") +endif() + +# Now simply link against gtest or gtest_main as needed. Eg +add_executable(runner tests.cpp variant.h) +target_link_libraries(runner gtest_main) +add_test(NAME runner_test COMMAND runner) \ No newline at end of file diff --git a/module-1/homework/Variant/CMakeLists.txt.in b/module-1/homework/Variant/CMakeLists.txt.in new file mode 100644 index 00000000..f98ccb4a --- /dev/null +++ b/module-1/homework/Variant/CMakeLists.txt.in @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8.2) + +project(googletest-download NONE) + +include(ExternalProject) +ExternalProject_Add(googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG master + SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" + BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) \ No newline at end of file diff --git a/module-1/homework/Variant/task.md b/module-1/homework/Variant/task.md new file mode 100644 index 00000000..331ccb6f --- /dev/null +++ b/module-1/homework/Variant/task.md @@ -0,0 +1,10 @@ +# Variant + +## Задание + +[`Variant`](https://en.cppreference.com/w/cpp/utility/variant) - обощение типа **union** + +Реализовать функции: +* [`get`](https://en.cppreference.com/w/cpp/utility/variant/get) - получение значения в variant по индексу +* [`get`](https://en.cppreference.com/w/cpp/utility/variant/get) - получение значения в variant по типу +* [`operator=`](https://en.cppreference.com/w/cpp/utility/variant/operator%3D) - оператор присваивания значения \ No newline at end of file diff --git a/module-1/homework/Variant/tests.cpp b/module-1/homework/Variant/tests.cpp new file mode 100644 index 00000000..b74ebd9b --- /dev/null +++ b/module-1/homework/Variant/tests.cpp @@ -0,0 +1,30 @@ +#include +#include + +#include + +#include "gtest/gtest.h" + +TEST(Get, Test1) { + std::variant v; + v = "Hello world"; + ASSERT_EQ(std::get(v),"Hello world"); +} + +TEST(Get, Test2) { + std::variant v; + v = 12.0; + ASSERT_NEAR(std::get(v), 12.0, 1e-5); +} + +TEST(Get, Test3) { + std::variant v; + v = "Hello world"; + ASSERT_EQ(std::get<2>(v), "Hello world"); +} + +TEST(Get, Test4) { + std::variant v; + v = 12.0; + ASSERT_NEAR(std::get<1>(v), 12.0, 1e-5); +} \ No newline at end of file diff --git a/module-1/homework/Variant/variant.h b/module-1/homework/Variant/variant.h new file mode 100644 index 00000000..8c1e2c31 --- /dev/null +++ b/module-1/homework/Variant/variant.h @@ -0,0 +1,45 @@ +#include + +#pragma once + +template +class variant; + +template +struct variant_alternative; + +template +using variant_alternative_t = typename variant_alternative::type; + +template +struct variant_alternative> { + using type = // Your code goes here +}; + +template +class variant { + + public: + + // Special member functions + constexpr variant() noexcept; + + template + variant& operator=( T&& t ) noexcept; + + private: + // Your code goes here +}; + +// Non-member functions +template +constexpr variant_alternative_t>& get(variant& v); + +template +constexpr variant_alternative_t>&& get(variant&& v); + +template +constexpr T& get(variant& v); + +template +constexpr T&& get( variant&& v ); \ No newline at end of file From 192d540cb544809b989eebca623c27ea4fd17e22 Mon Sep 17 00:00:00 2001 From: morell Date: Sat, 13 Feb 2021 21:36:25 +0300 Subject: [PATCH 08/41] homework: Optional --- module-1/homework/Optional/CMakeLists.txt | 47 +++++++++++++++++ module-1/homework/Optional/CMakeLists.txt.in | 15 ++++++ module-1/homework/Optional/optional.h | 54 ++++++++++++++++++++ module-1/homework/Optional/task.md | 41 +++++++++++++++ module-1/homework/Optional/tests.cpp | 42 +++++++++++++++ module-1/homework/Variant/tests.cpp | 10 ++-- 6 files changed, 204 insertions(+), 5 deletions(-) create mode 100644 module-1/homework/Optional/CMakeLists.txt create mode 100644 module-1/homework/Optional/CMakeLists.txt.in create mode 100644 module-1/homework/Optional/optional.h create mode 100644 module-1/homework/Optional/task.md create mode 100644 module-1/homework/Optional/tests.cpp diff --git a/module-1/homework/Optional/CMakeLists.txt b/module-1/homework/Optional/CMakeLists.txt new file mode 100644 index 00000000..7097fd40 --- /dev/null +++ b/module-1/homework/Optional/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.16) + +include(GoogleTest) + +project("runner") + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) + +execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) + +if(result) + message(FATAL_ERROR "CMake step for googletest failed: ${result}") +endif() +execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) +if(result) + message(FATAL_ERROR "Build step for googletest failed: ${result}") +endif() + +# Prevent overriding the parent project's compiler/linker +# settings on Windows +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + +# Add googletest directly to our build. This defines +# the gtest and gtest_main targets. +add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src + ${CMAKE_CURRENT_BINARY_DIR}/googletest-build + EXCLUDE_FROM_ALL) + +# The gtest/gtest_main targets carry header search path +# dependencies automatically when using CMake 2.8.11 or +# later. Otherwise we have to add them here ourselves. +if (CMAKE_VERSION VERSION_LESS 2.8.11) + include_directories("${gtest_SOURCE_DIR}/include") +endif() + +# Now simply link against gtest or gtest_main as needed. Eg +add_executable(runner tests.cpp optional.h) +target_link_libraries(runner gtest_main) +add_test(NAME runner_test COMMAND runner) \ No newline at end of file diff --git a/module-1/homework/Optional/CMakeLists.txt.in b/module-1/homework/Optional/CMakeLists.txt.in new file mode 100644 index 00000000..f98ccb4a --- /dev/null +++ b/module-1/homework/Optional/CMakeLists.txt.in @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8.2) + +project(googletest-download NONE) + +include(ExternalProject) +ExternalProject_Add(googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG master + SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" + BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) \ No newline at end of file diff --git a/module-1/homework/Optional/optional.h b/module-1/homework/Optional/optional.h new file mode 100644 index 00000000..77153ec7 --- /dev/null +++ b/module-1/homework/Optional/optional.h @@ -0,0 +1,54 @@ +#include +#include + +#pragma once +struct nullopt_t { + // Your code goes here; +}; + +constexpr nullopt_t // Your code goes here; + +struct in_place_t { + // Your code goes here; +}; + +constexpr in_place_t // Your code goes here; + +template +class optional { + public: + + using value_type = // Your code goes here; + + constexpr optional() noexcept; + template < class U = value_type > + constexpr optional( U&& value ); + constexpr optional(nullopt_t) noexcept; + template + constexpr explicit optional(in_place_t, _Args&&... __args); + + template + constexpr T value_or(U&& default_value) const&; + + template + constexpr T value_or(U&& default_value) &&; + + constexpr bool has_value() const noexcept; + + constexpr explicit operator bool() const noexcept; + + constexpr std::add_pointer_t operator->() const; + + constexpr std::add_pointer_t operator->(); + + constexpr const value_type& operator*() const&; + + constexpr value_type& operator*() &; + + constexpr const value_type&& operator*() const&&; + + constexpr value_type&& operator*() &&; + + private: + // Your code goes here; +}; \ No newline at end of file diff --git a/module-1/homework/Optional/task.md b/module-1/homework/Optional/task.md new file mode 100644 index 00000000..843f8c2d --- /dev/null +++ b/module-1/homework/Optional/task.md @@ -0,0 +1,41 @@ +# Optional + +## Задание + +[`Optional`](https://en.cppreference.com/w/cpp/utility/optional) - контейнер, реализующий функциональность опионального хранения
заданного значения / пустого значения (отдельно выделенного) + +Конструкторы: + +````c++ +constexpr optional() noexcept; +```` + +```c++ +template< class U = value_type > +constexpr optional( U&& value ); +``` + +```c++ +constexpr optional(nullopt_t) noexcept; +``` + +```c++ +template +constexpr explicit optional(in_place_t, _Args&&... __args); +``` + +Реализовать операторы: +* `->` - разыменования с обращением к полю / методу +* `*` - разыменования +* `bool()` - преобразование к `bool` + +Методы: +* `has_value` - проверка наличия значения +* `value_or` - возвращает хранимое значение при его наличии или передаваемый аргумент
+при отсутствии хранимого значения +* `reset` - вызов деструктора у хранимого значении при наличии деструктора у типа этого значения + +Можно использовать: +* `std::is_trivially_destructible` +* `std::addressof` +* `std::add_pointer_t` \ No newline at end of file diff --git a/module-1/homework/Optional/tests.cpp b/module-1/homework/Optional/tests.cpp new file mode 100644 index 00000000..4c25c3c8 --- /dev/null +++ b/module-1/homework/Optional/tests.cpp @@ -0,0 +1,42 @@ +#include +#include + +#include + +#include "gtest/gtest.h" + +TEST(ValueOR, Test1) { + std::optional opt("Hello world"); + ASSERT_EQ(opt.value_or("empty"), "Hello world"); +} + +TEST(ValueOR, Test2) { + std::optional opt; + ASSERT_EQ(opt.value_or("empty"), "empty"); +} + +TEST(HasValue, Test1) { + std::optional opt("Hello world"); + ASSERT_TRUE(opt.has_value()); +} + +TEST(Reset, Test1) { + std::optional opt("Hello world"); + opt.reset(); + ASSERT_FALSE(opt.has_value()); +} + +TEST(ConversionToBool, Test1) { + std::optional opt("Hello world"); + ASSERT_TRUE(opt); +} + +TEST(ArrowOperator, Test1) { + std::optional opt("Hello world"); + ASSERT_EQ(std::string(opt->c_str()), "Hello world"); +} + +TEST(IndirectionOperator, Test1) { + std::optional opt(1); + ASSERT_EQ(*opt, 1); +} \ No newline at end of file diff --git a/module-1/homework/Variant/tests.cpp b/module-1/homework/Variant/tests.cpp index b74ebd9b..a6099b36 100644 --- a/module-1/homework/Variant/tests.cpp +++ b/module-1/homework/Variant/tests.cpp @@ -1,30 +1,30 @@ #include #include -#include +#include "variant.h" #include "gtest/gtest.h" TEST(Get, Test1) { - std::variant v; + variant v; v = "Hello world"; ASSERT_EQ(std::get(v),"Hello world"); } TEST(Get, Test2) { - std::variant v; + variant v; v = 12.0; ASSERT_NEAR(std::get(v), 12.0, 1e-5); } TEST(Get, Test3) { - std::variant v; + variant v; v = "Hello world"; ASSERT_EQ(std::get<2>(v), "Hello world"); } TEST(Get, Test4) { - std::variant v; + variant v; v = 12.0; ASSERT_NEAR(std::get<1>(v), 12.0, 1e-5); } \ No newline at end of file From c3f230043ab86b6526eec48295dc8b6db83c8943 Mon Sep 17 00:00:00 2001 From: morell Date: Thu, 18 Feb 2021 17:55:30 +0300 Subject: [PATCH 09/41] homework: SharedPointer --- module-1/homework/BigInteger/CMakeLists.txt | 2 +- module-1/homework/SharedPointer/.gitignore | 1 + .../homework/SharedPointer/CMakeLists.txt | 42 +++++ .../homework/SharedPointer/CMakeLists.txt.in | 15 ++ .../SharedPointer/src/control/CMakeLists.txt | 10 ++ .../SharedPointer/src/control/control.h | 26 +++ .../src/shared_ptr/CMakeLists.txt | 10 ++ .../SharedPointer/src/shared_ptr/shared_ptr.h | 110 ++++++++++++ module-1/homework/SharedPointer/task.md | 112 ++++++++++++ module-1/homework/SharedPointer/tests.cpp | 160 ++++++++++++++++++ 10 files changed, 487 insertions(+), 1 deletion(-) create mode 100644 module-1/homework/SharedPointer/.gitignore create mode 100644 module-1/homework/SharedPointer/CMakeLists.txt create mode 100644 module-1/homework/SharedPointer/CMakeLists.txt.in create mode 100644 module-1/homework/SharedPointer/src/control/CMakeLists.txt create mode 100644 module-1/homework/SharedPointer/src/control/control.h create mode 100644 module-1/homework/SharedPointer/src/shared_ptr/CMakeLists.txt create mode 100644 module-1/homework/SharedPointer/src/shared_ptr/shared_ptr.h create mode 100644 module-1/homework/SharedPointer/task.md create mode 100644 module-1/homework/SharedPointer/tests.cpp diff --git a/module-1/homework/BigInteger/CMakeLists.txt b/module-1/homework/BigInteger/CMakeLists.txt index a1330c96..dbd259a7 100644 --- a/module-1/homework/BigInteger/CMakeLists.txt +++ b/module-1/homework/BigInteger/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16) include(GoogleTest) -project("BigInteger") +project("runner") configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) diff --git a/module-1/homework/SharedPointer/.gitignore b/module-1/homework/SharedPointer/.gitignore new file mode 100644 index 00000000..3c34c2f5 --- /dev/null +++ b/module-1/homework/SharedPointer/.gitignore @@ -0,0 +1 @@ +*build* \ No newline at end of file diff --git a/module-1/homework/SharedPointer/CMakeLists.txt b/module-1/homework/SharedPointer/CMakeLists.txt new file mode 100644 index 00000000..624cb834 --- /dev/null +++ b/module-1/homework/SharedPointer/CMakeLists.txt @@ -0,0 +1,42 @@ +cmake_minimum_required(VERSION 3.16) + +include(GoogleTest) + +project("runner") + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) + +execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) + +if(result) + message(FATAL_ERROR "CMake step for googletest failed: ${result}") +endif() +execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) +if(result) + message(FATAL_ERROR "Build step for googletest failed: ${result}") +endif() + +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + +add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src + ${CMAKE_CURRENT_BINARY_DIR}/googletest-build + EXCLUDE_FROM_ALL) + +if (CMAKE_VERSION VERSION_LESS 2.8.11) + include_directories("${gtest_SOURCE_DIR}/include") +endif() + +add_subdirectory(src/shared_ptr) +add_executable(runner tests.cpp) + +target_link_libraries(runner LINK_PUBLIC shared_ptr gtest_main) + +add_test(NAME runner_test COMMAND runner) \ No newline at end of file diff --git a/module-1/homework/SharedPointer/CMakeLists.txt.in b/module-1/homework/SharedPointer/CMakeLists.txt.in new file mode 100644 index 00000000..f98ccb4a --- /dev/null +++ b/module-1/homework/SharedPointer/CMakeLists.txt.in @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8.2) + +project(googletest-download NONE) + +include(ExternalProject) +ExternalProject_Add(googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG master + SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" + BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) \ No newline at end of file diff --git a/module-1/homework/SharedPointer/src/control/CMakeLists.txt b/module-1/homework/SharedPointer/src/control/CMakeLists.txt new file mode 100644 index 00000000..c7550725 --- /dev/null +++ b/module-1/homework/SharedPointer/src/control/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.16) + +project("runner") + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_library(control INTERFACE) + +target_include_directories(control INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file diff --git a/module-1/homework/SharedPointer/src/control/control.h b/module-1/homework/SharedPointer/src/control/control.h new file mode 100644 index 00000000..55c08056 --- /dev/null +++ b/module-1/homework/SharedPointer/src/control/control.h @@ -0,0 +1,26 @@ +#pragma once + +class shared_count { + protected: + // Your code goes here... + + public: + // Your code goes here... +}; + +class shared_weak_count : public shared_count { + private: + // Your code goes here... + + public: + // Your code goes here... +}; + +template +class control_block : public shared_weak_count { + public: + // Your code goes here... + + private: + // Your code goes here... +}; diff --git a/module-1/homework/SharedPointer/src/shared_ptr/CMakeLists.txt b/module-1/homework/SharedPointer/src/shared_ptr/CMakeLists.txt new file mode 100644 index 00000000..0922bd45 --- /dev/null +++ b/module-1/homework/SharedPointer/src/shared_ptr/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.16) + +project("runner") + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_library(shared_ptr INTERFACE) + +target_include_directories(shared_ptr INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file diff --git a/module-1/homework/SharedPointer/src/shared_ptr/shared_ptr.h b/module-1/homework/SharedPointer/src/shared_ptr/shared_ptr.h new file mode 100644 index 00000000..416d9890 --- /dev/null +++ b/module-1/homework/SharedPointer/src/shared_ptr/shared_ptr.h @@ -0,0 +1,110 @@ +#pragma once + +#include "../control/control.h" + +// shared_ptr +template +class weak_ptr; + +template +class shared_ptr { + public: + using element_type = T; + + constexpr shared_ptr() noexcept = default; + ~shared_ptr(); + + template + shared_ptr(Y* p); + + template + shared_ptr(Y* p, Deleter deleter) noexcept; + + shared_ptr(const shared_ptr& other) noexcept; + shared_ptr(shared_ptr&& other) noexcept; + + shared_ptr& operator=( const shared_ptr& r ) noexcept; + + template + shared_ptr& operator=( const shared_ptr& r ) noexcept; + + shared_ptr& operator=( shared_ptr&& r ) noexcept; + + template + shared_ptr& operator=( shared_ptr&& r ) noexcept; + + // Modifiers + void reset() noexcept; + + template + void reset(Y* p) noexcept; + + template + void reset(Y*p, Deleter deleter) noexcept; + + void swap(shared_ptr& other) noexcept; + + // Observers + T* get() const noexcept; + long use_count() const noexcept; + T& operator*() const noexcept; + T* operator->() const noexcept; + element_type& operator[](std::ptrdiff_t idx) const; + explicit operator bool() const noexcept; + + private: + // Your code goes here... +}; + +// make_shared + +// Your code goes here... + +// make_shared + +// shared_ptr + +// Your code goes here... + +// shared_ptr + +template +class weak_ptr { + + using element_type = T; + +public: + + // Special-member functions + constexpr weak_ptr() noexcept = default; + template + weak_ptr(const shared_ptr& other); + weak_ptr(const weak_ptr& other) noexcept; + weak_ptr(weak_ptr&& other) noexcept; + template + weak_ptr& operator=(const shared_ptr& other); + weak_ptr& operator=(const weak_ptr& other) noexcept; + weak_ptr& operator=(weak_ptr&& other) noexcept; + + ~weak_ptr() = default; + + // Modifiers + void reset() noexcept; + void swap(weak_ptr& other) noexcept; + + // Observers + bool expired() noexcept; + shared_ptr lock() const noexcept; + + template friend class shared_ptr; + +public: + // Your code goes here... +}; + + +// weak_ptr + +// Your code goes here... + +// weak_ptr \ No newline at end of file diff --git a/module-1/homework/SharedPointer/task.md b/module-1/homework/SharedPointer/task.md new file mode 100644 index 00000000..571d4023 --- /dev/null +++ b/module-1/homework/SharedPointer/task.md @@ -0,0 +1,112 @@ +# SharedPointer + +## Задание + +Реализовать control_block в `control.h` +* без аллокатора +* счетчик ссылок + + ```c++ + std::atomic + ``` + +Написать класс [shared_ptr](https://en.cppreference.com/w/cpp/memory/shared_ptr) + +Реализовать: +* **Special member functions** + + ```c++ + constexpr shared_ptr() noexcept = default; + + template + shared_ptr(Y* p); + + template + shared_ptr(Y* p, Deleter deleter) noexcept; + + shared_ptr(const shared_ptr& other) noexcept; + + shared_ptr(shared_ptr&& other) noexcept; + + shared_ptr& operator=( const shared_ptr& r ) noexcept; + + template + shared_ptr& operator=( const shared_ptr& r ) noexcept; + + shared_ptr& operator=( shared_ptr&& r ) noexcept; + + template + shared_ptr& operator=( shared_ptr&& r ) noexcept; + + ~shared_ptr(); + ``` + +* **Modifiers** + + ```c++ + void reset() noexcept; + + template + void reset(Y* p) noexcept; + + template + void reset(Y*p, Deleter deleter) noexcept; + + void swap(shared_ptr& other) noexcept; + ``` + +* **Observers** + + ```c++ + T* get() const noexcept; + + long use_count() const noexcept; + + T& operator*() const noexcept; + + T* operator->() const noexcept; + + element_type& operator[](std::ptrdiff_t idx) const; + + explicit operator bool() const noexcept; + ``` + + +Написать класс [weak_ptr](https://en.cppreference.com/w/cpp/memory/weak_ptr) + +Реализовать: +* **Special member functions** + + ```c++ + constexpr weak_ptr() noexcept = default; + + template + weak_ptr(const shared_ptr& other); + + weak_ptr(const weak_ptr& other) noexcept; + + weak_ptr(weak_ptr&& other) noexcept; + + template + weak_ptr& operator=(const shared_ptr& other); + + weak_ptr& operator=(const weak_ptr& other) noexcept; + + weak_ptr& operator=(weak_ptr&& other) noexcept; + + ~weak_ptr(); + ``` + +* **Modifiers** + + ```c++ + void reset() noexcept; + void swap(weak_ptr& other) noexcept; + ``` + +* **Observers** + + ```c++ + bool expired() noexcept; + shared_ptr lock() const noexcept; + ``` \ No newline at end of file diff --git a/module-1/homework/SharedPointer/tests.cpp b/module-1/homework/SharedPointer/tests.cpp new file mode 100644 index 00000000..f38a6f6a --- /dev/null +++ b/module-1/homework/SharedPointer/tests.cpp @@ -0,0 +1,160 @@ +#include +#include + +#include "src/shared_ptr/shared_ptr.h" + +#include "gtest/gtest.h" + +// weak_ptr +TEST(WeakExpired, Test1) { + weak_ptr w; + { + auto sp = make_shared(42); + w = sp; + ASSERT_FALSE(w.expired()); + } +} + +TEST(WeakExpired, Test2) { + weak_ptr w; + { + auto sp = make_shared(42); + w = sp; + } + ASSERT_TRUE(w.expired()); +} + +TEST(WeakReset, Test3) { + weak_ptr w; + auto sp = make_shared(42); + w = sp; + w.reset(); + ASSERT_TRUE(w.expired()); +} + +TEST(WeakLock, Test1) { + weak_ptr w; + auto sp = make_shared(42); + w = sp; + ASSERT_TRUE(*w.lock() == 42); +} + +TEST(WeakLock, Test2) { + weak_ptr w; + { + auto sp = make_shared(42); + w = sp; + } + ASSERT_FALSE(w.lock()); +} + +// shared_ptr +TEST(SharedMoveConstructor, Test1) { + class contrainer {}; + shared_ptr s1 = make_shared(); + contrainer* raw_s1 = s1.get(); + shared_ptr s2 = std::move(s1); + ASSERT_TRUE(s1.use_count() == 0 && s1.get() == nullptr && s2.get() == raw_s1 && s2.use_count() == 1); +} + +TEST(SharedMoveAssignment, Test1) { + class contrainer {}; + shared_ptr s1 = make_shared(); + contrainer* raw_s1 = s1.get(); + shared_ptr s2; + s2 = std::move(s1); + ASSERT_TRUE(s1.use_count() == 0 && s1.get() == nullptr && s2.get() == raw_s1 && s2.use_count() == 1); +} + +TEST(SharedAssignment, Test1) { + class contrainer {}; + shared_ptr s1 = make_shared(); + shared_ptr s2; + shared_ptr s3; + s2 = s1; + s3 = s2; + + ASSERT_TRUE(s1.use_count() == 3 && s2.use_count() == 3 && s3.use_count() == 3 && s1.get() == s2.get() && s2.get() == s3.get()); +} + +TEST(SharedReset, Test1) { + class contrainer {}; + shared_ptr s1 = make_shared(); + s1.reset(); + ASSERT_FALSE(s1); +} + +TEST(SharedReset, Test2) { + class contrainer {}; + shared_ptr s1 = make_shared(); + contrainer* p = new contrainer; + s1.reset(p); + + ASSERT_TRUE(s1.get() == p && s1.use_count() == 1); +} + +TEST(SharedReset, Test3) { + class contrainer {}; + + shared_ptr s1 = make_shared(); + contrainer* p = new contrainer; + s1.reset(p, std::default_delete()); + + ASSERT_TRUE(s1.get() == p && s1.use_count() == 1); +} + +TEST(SharedUseCount, Test1) { + class contrainer {}; + + shared_ptr s1 = make_shared(); + shared_ptr s2 = s1; + { + shared_ptr s3 = s2; + } + + ASSERT_TRUE(s1.use_count() == 2 && s2.use_count() == 2 && s1.get() == s2.get()); +} + +TEST(SharedSwap, Test1) { + shared_ptr s1 = make_shared(1); + shared_ptr s2 = s1; + shared_ptr s3 = make_shared(2); + auto raw_s1 = s1.get(); + auto raw_s3 = s3.get(); + s1.swap(s3); + + ASSERT_TRUE(s1.use_count() == 1 && s2.use_count() == 2 && s3.use_count() == 2 && s2.get() == s3.get() && s2.get() == raw_s1 && s1.get() == raw_s3); +} + +TEST(SharedIndirectionOperator, Test1) { + shared_ptr s1 = make_shared(1); + ASSERT_TRUE(*s1 == 1); +} + +TEST(SharedArrowOperator, Test1) { + struct contrainer { + constexpr int foo() const noexcept { return 1; } + }; + + shared_ptr s1 = make_shared(); + ASSERT_TRUE(s1->foo() == 1); +} + +TEST(SharedBoolOperator, Test1) { + class contrainer {}; + + shared_ptr s1 = make_shared(); + ASSERT_TRUE(s1); +} + +TEST(SharedBoolOperator, Test2) { + class contrainer {}; + + shared_ptr s1; + ASSERT_FALSE(s1); +} + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file From 2643dcc72470ae4bf72bed9230e7606fffa1850a Mon Sep 17 00:00:00 2001 From: morell Date: Fri, 19 Feb 2021 16:16:05 +0300 Subject: [PATCH 10/41] grim --- module-1/seminars/seminar17/CMakeLists.txt | 8 ++ module-1/seminars/seminar17/grim.cpp | 153 +++++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 module-1/seminars/seminar17/CMakeLists.txt create mode 100644 module-1/seminars/seminar17/grim.cpp diff --git a/module-1/seminars/seminar17/CMakeLists.txt b/module-1/seminars/seminar17/CMakeLists.txt new file mode 100644 index 00000000..72b8cb67 --- /dev/null +++ b/module-1/seminars/seminar17/CMakeLists.txt @@ -0,0 +1,8 @@ +# ставим нижнее ограничение на версию cmake для сборки проекта +cmake_minimum_required(VERSION 3.16) + +# именуем проект: значение сохраняется в переменную PROJECT_NAME +project("seminar17") + +# включаем файлы в поддиректория в сборку проекта +add_executable(grim grim.cpp) \ No newline at end of file diff --git a/module-1/seminars/seminar17/grim.cpp b/module-1/seminars/seminar17/grim.cpp new file mode 100644 index 00000000..dcb93d44 --- /dev/null +++ b/module-1/seminars/seminar17/grim.cpp @@ -0,0 +1,153 @@ +#include +#include +#include +#include + +// weak_ptr +void weak_ptr_break_cycles() { + struct Son; + struct Daughter; + + struct Mother { + ~Mother() { + std::cout << "Mother gone" << std::endl; + } + + void setSon(const std::shared_ptr s) { + mySon = s; + } + + void setDaughter(const std::shared_ptr d) { + myDaughter = d; + } + + std::shared_ptr mySon; + std::weak_ptr myDaughter; + }; + + struct Son { + Son(std::shared_ptr m) : myMother(m) {} + ~Son() { + std::cout << "Som gone" << std::endl; + } + + std::shared_ptr myMother; + }; + + struct Daughter { + Daughter(std::shared_ptr m) : myMother(m) {} + ~Daughter() { + std::cout << "Daughter gone" << std::endl; + } + + std::shared_ptr myMother; + }; + + { + std::shared_ptr mother = std::shared_ptr(new Mother); + std::shared_ptr son = std::shared_ptr(new Son(mother)); + std::shared_ptr daughter = std::shared_ptr(new Daughter(mother)); + + mother->setSon(son); + mother->setDaughter(daughter); + } +} + +void weak_ptr_lock_logic() { + auto shared_ptr = std::make_shared(2011); + std::weak_ptr weak_ptr(shared_ptr); + + if (std::shared_ptr shared_from_weak = weak_ptr.lock()) { + std::cout << "use_count_A:" << shared_from_weak.use_count() << std::endl; + } else { + std::cout << "Empty_A!" << std::endl; + } + + weak_ptr.reset(); + if (std::shared_ptr shared_from_weak = weak_ptr.lock()) { + std::cout << "use_count_B:" << shared_from_weak.use_count() << std::endl; + } else { + std::cout << "Empty_B!" << std::endl; + } +} + +//p.19 +void perfomance() { + auto start = std::chrono::system_clock::now(); + for (long long i = 0; i < 100000000; i++) { + // Case1: + //int* tmp(new int(i)); + //delete tmp; + + // Case2: + //std::unique_ptr tmp(new int(i)); + // Case3: + //std::unique_ptr tmp = std::make_unique(i); + // Case4: + //std::shared_ptr tmp(new int(i)); + // Case5: + std::shared_ptr tmp = std::make_shared(i); + } + + auto end = std::chrono::system_clock::now(); + std::chrono::duration diff = end-start; + std::cout << diff.count(); +} + +// Ownership semantic part 1 +class container {}; + +void func(container cont) { + // 1. Independent owner of the resource + // 2. Deletes at the end of the scope +} + +void func(container* cont) { + // 1. Borrows resources + // 2. The resource could BE empty + // 3. May delete resource +} + +void func(container& cont) { + // 1. Borrows resources + // 2. The resource could NOT NE empty + // 3. Can not delete the resource +} + +void func(std::unique_ptr cont) { + // 1. Independent owner of the resource + // 2. Deletes at the end of the scope +} + +void func(std::shared_ptr cont) { + // 1. Borrow resource + // 2. The resource could BE empty + // 3. May delete resource at the end of the scope +} + +// Ownership semantic part 2 +void func(std::unique_ptr p) { + // func takes ownership +} + +void func(std::unique_ptr& p) { + // func may reset resource +} + +void func(std::shared_ptr p) { + // func shares ownership +} + +void func(std::shared_ptr& p) { + // func may reset reource +} + +void func(const std::shared_ptr& p) { + // func may retain a reference counter +} + + +int main() { + perfomance(); + return 0; +} \ No newline at end of file From 7081e484c9d956aa5f64dbf9e46f532dff16e44a Mon Sep 17 00:00:00 2001 From: morell Date: Sun, 21 Feb 2021 12:55:10 +0300 Subject: [PATCH 11/41] homework: Optional --- module-1/homework/Optional/CMakeLists.txt | 2 +- module-1/homework/Optional/optional.h | 5 +++++ module-1/homework/Optional/tests.cpp | 14 +++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/module-1/homework/Optional/CMakeLists.txt b/module-1/homework/Optional/CMakeLists.txt index 7097fd40..cea3b7a6 100644 --- a/module-1/homework/Optional/CMakeLists.txt +++ b/module-1/homework/Optional/CMakeLists.txt @@ -4,7 +4,7 @@ include(GoogleTest) project("runner") -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) diff --git a/module-1/homework/Optional/optional.h b/module-1/homework/Optional/optional.h index 77153ec7..38745814 100644 --- a/module-1/homework/Optional/optional.h +++ b/module-1/homework/Optional/optional.h @@ -2,6 +2,9 @@ #include #pragma once + +namespace task { + struct nullopt_t { // Your code goes here; }; @@ -51,4 +54,6 @@ class optional { private: // Your code goes here; +}; + }; \ No newline at end of file diff --git a/module-1/homework/Optional/tests.cpp b/module-1/homework/Optional/tests.cpp index 4c25c3c8..a58b5773 100644 --- a/module-1/homework/Optional/tests.cpp +++ b/module-1/homework/Optional/tests.cpp @@ -6,37 +6,37 @@ #include "gtest/gtest.h" TEST(ValueOR, Test1) { - std::optional opt("Hello world"); + task::optional opt("Hello world"); ASSERT_EQ(opt.value_or("empty"), "Hello world"); } TEST(ValueOR, Test2) { - std::optional opt; + task::optional opt; ASSERT_EQ(opt.value_or("empty"), "empty"); } TEST(HasValue, Test1) { - std::optional opt("Hello world"); + task::optional opt("Hello world"); ASSERT_TRUE(opt.has_value()); } TEST(Reset, Test1) { - std::optional opt("Hello world"); + task::optional opt("Hello world"); opt.reset(); ASSERT_FALSE(opt.has_value()); } TEST(ConversionToBool, Test1) { - std::optional opt("Hello world"); + task::optional opt("Hello world"); ASSERT_TRUE(opt); } TEST(ArrowOperator, Test1) { - std::optional opt("Hello world"); + task::optional opt("Hello world"); ASSERT_EQ(std::string(opt->c_str()), "Hello world"); } TEST(IndirectionOperator, Test1) { - std::optional opt(1); + task::optional opt(1); ASSERT_EQ(*opt, 1); } \ No newline at end of file From bee15c5665ab7c346f8d68b221162c9fe426d0cd Mon Sep 17 00:00:00 2001 From: morell Date: Sun, 21 Feb 2021 12:57:32 +0300 Subject: [PATCH 12/41] homework: Variant --- module-1/homework/Variant/CMakeLists.txt | 2 +- module-1/homework/Variant/tests.cpp | 8 ++++---- module-1/homework/Variant/variant.h | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/module-1/homework/Variant/CMakeLists.txt b/module-1/homework/Variant/CMakeLists.txt index 7499ed82..b04afad3 100644 --- a/module-1/homework/Variant/CMakeLists.txt +++ b/module-1/homework/Variant/CMakeLists.txt @@ -4,7 +4,7 @@ include(GoogleTest) project("runner") -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) diff --git a/module-1/homework/Variant/tests.cpp b/module-1/homework/Variant/tests.cpp index a6099b36..3075960e 100644 --- a/module-1/homework/Variant/tests.cpp +++ b/module-1/homework/Variant/tests.cpp @@ -6,25 +6,25 @@ #include "gtest/gtest.h" TEST(Get, Test1) { - variant v; + task::variant v; v = "Hello world"; ASSERT_EQ(std::get(v),"Hello world"); } TEST(Get, Test2) { - variant v; + task::variant v; v = 12.0; ASSERT_NEAR(std::get(v), 12.0, 1e-5); } TEST(Get, Test3) { - variant v; + task::variant v; v = "Hello world"; ASSERT_EQ(std::get<2>(v), "Hello world"); } TEST(Get, Test4) { - variant v; + task::variant v; v = 12.0; ASSERT_NEAR(std::get<1>(v), 12.0, 1e-5); } \ No newline at end of file diff --git a/module-1/homework/Variant/variant.h b/module-1/homework/Variant/variant.h index 8c1e2c31..428e1966 100644 --- a/module-1/homework/Variant/variant.h +++ b/module-1/homework/Variant/variant.h @@ -2,6 +2,8 @@ #pragma once +namespace task { + template class variant; @@ -42,4 +44,6 @@ template constexpr T& get(variant& v); template -constexpr T&& get( variant&& v ); \ No newline at end of file +constexpr T&& get( variant&& v ); + +}; \ No newline at end of file From b7902f077af2d33d12d600ed4cd97a0bf7f01f82 Mon Sep 17 00:00:00 2001 From: morell Date: Tue, 23 Feb 2021 11:55:38 +0300 Subject: [PATCH 13/41] homework: TypeTraits --- module-1/homework/TypeTraits/.gitignore | 1 + module-1/homework/TypeTraits/CMakeLists.txt | 41 ++++++ .../homework/TypeTraits/CMakeLists.txt.in | 15 +++ module-1/homework/TypeTraits/task.md | 24 ++++ module-1/homework/TypeTraits/tests.cpp | 127 ++++++++++++++++++ .../TypeTraits/type_traits/CMakeLists.txt | 7 + .../type_traits/is_copy_constructible.h | 42 ++++++ .../is_nothrow_move_constructible.h | 27 ++++ .../TypeTraits/type_traits/move_if_noexcept.h | 22 +++ .../homework/TypeTraits/type_traits/utility.h | 36 +++++ 10 files changed, 342 insertions(+) create mode 100644 module-1/homework/TypeTraits/.gitignore create mode 100644 module-1/homework/TypeTraits/CMakeLists.txt create mode 100644 module-1/homework/TypeTraits/CMakeLists.txt.in create mode 100644 module-1/homework/TypeTraits/task.md create mode 100644 module-1/homework/TypeTraits/tests.cpp create mode 100644 module-1/homework/TypeTraits/type_traits/CMakeLists.txt create mode 100644 module-1/homework/TypeTraits/type_traits/is_copy_constructible.h create mode 100644 module-1/homework/TypeTraits/type_traits/is_nothrow_move_constructible.h create mode 100644 module-1/homework/TypeTraits/type_traits/move_if_noexcept.h create mode 100644 module-1/homework/TypeTraits/type_traits/utility.h diff --git a/module-1/homework/TypeTraits/.gitignore b/module-1/homework/TypeTraits/.gitignore new file mode 100644 index 00000000..3c34c2f5 --- /dev/null +++ b/module-1/homework/TypeTraits/.gitignore @@ -0,0 +1 @@ +*build* \ No newline at end of file diff --git a/module-1/homework/TypeTraits/CMakeLists.txt b/module-1/homework/TypeTraits/CMakeLists.txt new file mode 100644 index 00000000..7f228dd5 --- /dev/null +++ b/module-1/homework/TypeTraits/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +include(GoogleTest) + +project("runner") + +configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) + +execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . + + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) + +if(result) + message(FATAL_ERROR "CMake step for googletest failed: ${result}") +endif() +execute_process(COMMAND ${CMAKE_COMMAND} --build . + RESULT_VARIABLE result + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) +if(result) + message(FATAL_ERROR "Build step for googletest failed: ${result}") +endif() + +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + +add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src + ${CMAKE_CURRENT_BINARY_DIR}/googletest-build + EXCLUDE_FROM_ALL) + +if (CMAKE_VERSION VERSION_LESS 2.8.11) + include_directories("${gtest_SOURCE_DIR}/include") +endif() + +add_subdirectory(type_traits) +add_executable(runner tests.cpp) +target_link_libraries(runner LINK_PUBLIC type_traits gtest_main) + +add_test(NAME runner_test COMMAND runner) \ No newline at end of file diff --git a/module-1/homework/TypeTraits/CMakeLists.txt.in b/module-1/homework/TypeTraits/CMakeLists.txt.in new file mode 100644 index 00000000..f98ccb4a --- /dev/null +++ b/module-1/homework/TypeTraits/CMakeLists.txt.in @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8.2) + +project(googletest-download NONE) + +include(ExternalProject) +ExternalProject_Add(googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG master + SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" + BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) \ No newline at end of file diff --git a/module-1/homework/TypeTraits/task.md b/module-1/homework/TypeTraits/task.md new file mode 100644 index 00000000..1b228e07 --- /dev/null +++ b/module-1/homework/TypeTraits/task.md @@ -0,0 +1,24 @@ +# TypeTraits + +## Задание + +Реализовать: +* [std::is_copy_constructible](https://en.cppreference.com/w/cpp/types/is_copy_constructible) +* [std::is_nothrow_move_constructible](https://en.cppreference.com/w/cpp/types/is_move_constructible) +* [std::move_if_noexcept](https://en.cppreference.com/w/cpp/utility/move_if_noexcept) + +Реализация в соответсвующих header файлах + +При реализации использовать хелперы из `utility.h` + +Замечание: следующие type_traits можно брать из std +* `std::negation` +* `std::is_base_of` +* `std::is_reference` +* `std::disjunction` +* `std::is_same` +* `std::false_type` +* `std::true_type` +* `std::integral_constant` +* `std::is_destructible` +* `std::conjunction` \ No newline at end of file diff --git a/module-1/homework/TypeTraits/tests.cpp b/module-1/homework/TypeTraits/tests.cpp new file mode 100644 index 00000000..adfa97f4 --- /dev/null +++ b/module-1/homework/TypeTraits/tests.cpp @@ -0,0 +1,127 @@ +#include +#include +#include +#include + +#include "type_traits/is_copy_constructible.h" +#include "type_traits/is_nothrow_move_constructible.h" +#include "type_traits/move_if_noexcept.h" + +#include "gtest/gtest.h" + +TEST(is_constructible, Test1) { + + class Foo { + private: + int v1; + double v2; + public: + Foo(int n) : v1(n), v2() {} + Foo(int n, double f) noexcept : v1(n), v2(f) {} + }; + + static_assert(is_constructible::value, "expected true"); +} + +TEST(is_constructible, Test2) { + + static_assert(is_constructible::value, "expected true"); +} + +TEST(is_constructible, Test3) { + + struct Base {}; + + struct Derived : Base {}; + + static_assert(!is_constructible::value, "expected false"); + + static_assert(is_constructible::value, "expected true"); +} + +TEST(is_constructible, Test4) { + + struct Foo {}; + + static_assert(!is_constructible::value, "expected false"); + + static_assert(is_constructible::value, "expected true"); + + static_assert(!is_constructible::value, "expected false"); +} + +TEST(is_constructible, Test5) { + + struct Foo {}; + + static_assert(is_constructible::value, "expected true"); + + static_assert(!is_constructible::value, "expected false"); + + static_assert(is_constructible::value, "expected true"); +} + +TEST(is_constructible, Test6) { + + struct Foo {}; + + static_assert(is_constructible::value, "expected true"); + + static_assert(is_constructible::value, "expected true"); + + static_assert(is_constructible::value, "expected true"); +} + +TEST(is_nothrow_move_constructible, Test1) { + + struct Foo { + std::string str; + }; + + static_assert(is_nothrow_move_constructible::value, "expected true"); +} + +TEST(is_nothrow_move_constructible, Test2) { + + struct Foo { + int n; + Foo(Foo&&) = default; + }; + + static_assert(is_nothrow_move_constructible::value, "expected true"); +} + +TEST(is_nothrow_move_constructible, Test3) { + + struct Foo { + Foo(const Foo&) {} + }; + + static_assert(!is_nothrow_move_constructible::value, "expected true"); +} + +TEST(move_if_noexcept, Test1) { + + struct ThrowFoo { + bool copy = false; + ThrowFoo() = default; + ThrowFoo(ThrowFoo&&) {}; + ThrowFoo(const ThrowFoo&) { copy = true; }; + }; + ThrowFoo foo; + ThrowFoo foo2 = move_if_noexcept(foo); + ASSERT_TRUE(foo2.copy); +} + +TEST(move_if_noexcept, Test2) { + + struct NonThrowFoo { + bool copy = false; + NonThrowFoo() = default; + NonThrowFoo(NonThrowFoo&&) noexcept {}; + NonThrowFoo(const NonThrowFoo&) noexcept { copy = true; }; + }; + NonThrowFoo foo; + NonThrowFoo foo2 = move_if_noexcept(foo); + ASSERT_FALSE(foo2.copy); +} \ No newline at end of file diff --git a/module-1/homework/TypeTraits/type_traits/CMakeLists.txt b/module-1/homework/TypeTraits/type_traits/CMakeLists.txt new file mode 100644 index 00000000..5899089e --- /dev/null +++ b/module-1/homework/TypeTraits/type_traits/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.16) + +project("runner") + +add_library(type_traits INTERFACE) + +target_include_directories(type_traits INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file diff --git a/module-1/homework/TypeTraits/type_traits/is_copy_constructible.h b/module-1/homework/TypeTraits/type_traits/is_copy_constructible.h new file mode 100644 index 00000000..794f3771 --- /dev/null +++ b/module-1/homework/TypeTraits/type_traits/is_copy_constructible.h @@ -0,0 +1,42 @@ +# pragma once + +#include +#include + +#include "utility.h" + +template +struct is_constructible_impl; + +template +struct is_invalid_base_to_derived_cast { + ... +}; + +template +struct is_invalid_lvalue_to_rvalue_cast : std::false_type { + ... +}; + +template +struct is_invalid_lvalue_to_rvalue_cast { + ... +}; + +struct is_constructible_helper { + ... +}; + +template +struct is_constructible_impl { + ... +}; + +// is_constructible_impl - partial specializations +... + +template +struct is_constructible {...}; + +template +struct is_copy_constructible {...}; \ No newline at end of file diff --git a/module-1/homework/TypeTraits/type_traits/is_nothrow_move_constructible.h b/module-1/homework/TypeTraits/type_traits/is_nothrow_move_constructible.h new file mode 100644 index 00000000..fb9cf1c1 --- /dev/null +++ b/module-1/homework/TypeTraits/type_traits/is_nothrow_move_constructible.h @@ -0,0 +1,27 @@ +#pragma once + +#include + +#include "is_copy_constructible.h" +#include "utility.h" + +// +template struct is_nothrow_constructible_impl; + +// is_nothrow_constructible_impl - partial specializations +... + +template +struct is_nothrow_constructible { + ... +}; + +template +struct is_nothrow_constructible { + ... +}; + +template +struct is_nothrow_move_constructible { + ... +}; \ No newline at end of file diff --git a/module-1/homework/TypeTraits/type_traits/move_if_noexcept.h b/module-1/homework/TypeTraits/type_traits/move_if_noexcept.h new file mode 100644 index 00000000..b5fa23d9 --- /dev/null +++ b/module-1/homework/TypeTraits/type_traits/move_if_noexcept.h @@ -0,0 +1,22 @@ +# pragma once + +#include +#include + +#include "is_copy_constructible.h" +#include "is_nothrow_move_constructible.h" +#include "utility.h" + +// conditional +template +struct conditional { + ... +}; + +// conditional - partial specialization +... + +template +using conditional_v = ... + +// move_if_noexcept \ No newline at end of file diff --git a/module-1/homework/TypeTraits/type_traits/utility.h b/module-1/homework/TypeTraits/type_traits/utility.h new file mode 100644 index 00000000..e48decbb --- /dev/null +++ b/module-1/homework/TypeTraits/type_traits/utility.h @@ -0,0 +1,36 @@ +# pragma once + +#include +#include + +template +struct uncvref { + ... +}; + +template +using uncvref_t = ...; + +template +struct add_const { + ... +}; + +template +using add_const_t = ...; + +template +struct add_lvalue_reference { + ... +}; + +template +struct add_rvalue_reference { + ... +}; + +template +using add_lvalue_reference_t = ... + +template +using add_rvalue_reference_t = ... \ No newline at end of file From 572b10fa0ad901ea0558687c47e6dfb61dd95abe Mon Sep 17 00:00:00 2001 From: morell Date: Fri, 26 Feb 2021 16:10:44 +0300 Subject: [PATCH 14/41] seminars: 18 added --- module-1/seminars/seminar18/.gitignore | 1 + module-1/seminars/seminar18/decltype/1.cpp | 19 ++++++++ module-1/seminars/seminar18/decltype/2.cpp | 18 ++++++++ module-1/seminars/seminar18/decltype/3.cpp | 22 +++++++++ .../seminar18/decltype/CMakeLists.txt | 8 ++++ .../decltype/inspect_value_category.cpp | 12 +++++ .../seminar18/is_constructible/CMakeLists.txt | 8 ++++ .../seminar18/is_constructible/default.cpp | 26 +++++++++++ .../seminar18/is_constructible/delete.cpp | 26 +++++++++++ .../seminars/seminar18/lambdas/CMakeLists.txt | 8 ++++ .../seminar18/lambdas/capturing_by_&=13_1.cpp | 21 +++++++++ .../lambdas/capturing_by_move_12.cpp | 16 +++++++ .../lambdas/capturing_reference_11.cpp | 34 ++++++++++++++ .../lambdas/contains_title_copy_9.cpp | 34 ++++++++++++++ .../lambdas/contains_title_pointer_10.cpp | 32 +++++++++++++ .../lambdas/lambdas_reduce_boilerplate_7.cpp | 44 ++++++++++++++++++ .../seminar18/lambdas/member_function_4.cpp | 46 +++++++++++++++++++ .../seminar18/lambdas/mutable_state_15.cpp | 28 +++++++++++ .../seminar18/lambdas/mutable_state_16.cpp | 19 ++++++++ .../lambdas/operator_overloading_6.cpp | 27 +++++++++++ .../seminar18/lambdas/other_features_14.cpp | 16 +++++++ .../seminar18/lambdas/overloading_2.cpp | 37 +++++++++++++++ .../seminars/seminar18/lambdas/puzzle_13.cpp | 17 +++++++ .../seminar18/lambdas/single_function_1.cpp | 21 +++++++++ .../lambdas/static_typing_to_the_rescue5.cpp | 22 +++++++++ .../seminars/seminar18/lambdas/template_3.cpp | 33 +++++++++++++ 26 files changed, 595 insertions(+) create mode 100644 module-1/seminars/seminar18/.gitignore create mode 100644 module-1/seminars/seminar18/decltype/1.cpp create mode 100644 module-1/seminars/seminar18/decltype/2.cpp create mode 100644 module-1/seminars/seminar18/decltype/3.cpp create mode 100644 module-1/seminars/seminar18/decltype/CMakeLists.txt create mode 100644 module-1/seminars/seminar18/decltype/inspect_value_category.cpp create mode 100644 module-1/seminars/seminar18/is_constructible/CMakeLists.txt create mode 100644 module-1/seminars/seminar18/is_constructible/default.cpp create mode 100644 module-1/seminars/seminar18/is_constructible/delete.cpp create mode 100644 module-1/seminars/seminar18/lambdas/CMakeLists.txt create mode 100644 module-1/seminars/seminar18/lambdas/capturing_by_&=13_1.cpp create mode 100644 module-1/seminars/seminar18/lambdas/capturing_by_move_12.cpp create mode 100644 module-1/seminars/seminar18/lambdas/capturing_reference_11.cpp create mode 100644 module-1/seminars/seminar18/lambdas/contains_title_copy_9.cpp create mode 100644 module-1/seminars/seminar18/lambdas/contains_title_pointer_10.cpp create mode 100644 module-1/seminars/seminar18/lambdas/lambdas_reduce_boilerplate_7.cpp create mode 100644 module-1/seminars/seminar18/lambdas/member_function_4.cpp create mode 100644 module-1/seminars/seminar18/lambdas/mutable_state_15.cpp create mode 100644 module-1/seminars/seminar18/lambdas/mutable_state_16.cpp create mode 100644 module-1/seminars/seminar18/lambdas/operator_overloading_6.cpp create mode 100644 module-1/seminars/seminar18/lambdas/other_features_14.cpp create mode 100644 module-1/seminars/seminar18/lambdas/overloading_2.cpp create mode 100644 module-1/seminars/seminar18/lambdas/puzzle_13.cpp create mode 100644 module-1/seminars/seminar18/lambdas/single_function_1.cpp create mode 100644 module-1/seminars/seminar18/lambdas/static_typing_to_the_rescue5.cpp create mode 100644 module-1/seminars/seminar18/lambdas/template_3.cpp diff --git a/module-1/seminars/seminar18/.gitignore b/module-1/seminars/seminar18/.gitignore new file mode 100644 index 00000000..c795b054 --- /dev/null +++ b/module-1/seminars/seminar18/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/module-1/seminars/seminar18/decltype/1.cpp b/module-1/seminars/seminar18/decltype/1.cpp new file mode 100644 index 00000000..4cee1257 --- /dev/null +++ b/module-1/seminars/seminar18/decltype/1.cpp @@ -0,0 +1,19 @@ +#include + +// args is visible in function scope => we can pass args to T (1) +struct D { + template + static void foo(Args&&... args) { + decltype(T(std::forward(args)...)) x; + } +}; + +struct Base { + template + Base(Args...) {}; +}; + +int main() { + D::foo(1, 2, 3); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/decltype/2.cpp b/module-1/seminars/seminar18/decltype/2.cpp new file mode 100644 index 00000000..1a6f470f --- /dev/null +++ b/module-1/seminars/seminar18/decltype/2.cpp @@ -0,0 +1,18 @@ +#include +// args is not visible in function scope => we can not pass args to T +// but we NEED to call T with Args +// Solution: declval to the rescue +struct D { + template(args)...))> + static void foo(Args&&... args) {} +}; + +struct Base { + template + Base(Args...) {}; +}; + +int main() { + D::foo(1, 2, 3); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/decltype/3.cpp b/module-1/seminars/seminar18/decltype/3.cpp new file mode 100644 index 00000000..147837f4 --- /dev/null +++ b/module-1/seminars/seminar18/decltype/3.cpp @@ -0,0 +1,22 @@ +#include + +// args is not visible in function scope => we can not pass args to T +// but we NEED to call T with Args +// Solution: declval to the rescue +struct D { + template()...))> + static void foo(Args&&...) { + decltype(T(std::declval()...)) x; + x = 3; + } +}; + +struct Base { + template + Base(Args...) {}; +}; + +int main() { + D::foo(1, 2, 3); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/decltype/CMakeLists.txt b/module-1/seminars/seminar18/decltype/CMakeLists.txt new file mode 100644 index 00000000..db05b5d1 --- /dev/null +++ b/module-1/seminars/seminar18/decltype/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner 3.cpp) \ No newline at end of file diff --git a/module-1/seminars/seminar18/decltype/inspect_value_category.cpp b/module-1/seminars/seminar18/decltype/inspect_value_category.cpp new file mode 100644 index 00000000..f7eb3af9 --- /dev/null +++ b/module-1/seminars/seminar18/decltype/inspect_value_category.cpp @@ -0,0 +1,12 @@ +#include +#include + +int main() { + // 1. put identifer (id-expression) into paranthesis + // 2. apply decltype to paranthesised id-exp + // 3. print std::is_same + int* p = new int(1); + std::cout << std::is_same::value; + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/is_constructible/CMakeLists.txt b/module-1/seminars/seminar18/is_constructible/CMakeLists.txt new file mode 100644 index 00000000..5f0c1edb --- /dev/null +++ b/module-1/seminars/seminar18/is_constructible/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner delete.cpp) \ No newline at end of file diff --git a/module-1/seminars/seminar18/is_constructible/default.cpp b/module-1/seminars/seminar18/is_constructible/default.cpp new file mode 100644 index 00000000..901f9c59 --- /dev/null +++ b/module-1/seminars/seminar18/is_constructible/default.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include + + +struct B { + B() = default; +}; + +struct D { + + template()...))> + static std::true_type foo(int); + + template + static std::false_type foo(...); +}; + + +int main() { + using v = decltype(D::foo(0)); + std::cout << v::value; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/is_constructible/delete.cpp b/module-1/seminars/seminar18/is_constructible/delete.cpp new file mode 100644 index 00000000..e1be0888 --- /dev/null +++ b/module-1/seminars/seminar18/is_constructible/delete.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include + + +struct B { + B() = delete; +}; + +struct D { + + template()...))> + static std::true_type foo(int); + + template + static std::false_type foo(...); +}; + + +int main() { + using v = decltype(D::foo(0)); + std::cout << v::value; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/CMakeLists.txt b/module-1/seminars/seminar18/lambdas/CMakeLists.txt new file mode 100644 index 00000000..2009b344 --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner runner.cpp) \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/capturing_by_&=13_1.cpp b/module-1/seminars/seminar18/lambdas/capturing_by_&=13_1.cpp new file mode 100644 index 00000000..dee6dac9 --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/capturing_by_&=13_1.cpp @@ -0,0 +1,21 @@ +#include +#include + +void foo() { + + std::string title("hello"); + auto has_title_t = [&]() { + std::cout << "lam1:" << title << std::endl; + // Explanation: [&] - means get all needed data by reference to the scope => assignment to outer title + // [=] - captur by const + copy => CE on assignment + title = "world"; + std::cout << "lam2:" << title << std::endl; + return true; + }; + has_title_t(); + std::cout << "title:" << title << std::endl; +} +int main() { + foo(); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/capturing_by_move_12.cpp b/module-1/seminars/seminar18/lambdas/capturing_by_move_12.cpp new file mode 100644 index 00000000..d2dfa007 --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/capturing_by_move_12.cpp @@ -0,0 +1,16 @@ +#include +#include + +void foo() { + + std::string title("hello"); + auto has_title_t = [t = std::move(title)]() { + return true; + }; + std::cout << "title:" << title << std::endl; +} + +int main() { + foo(); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/capturing_reference_11.cpp b/module-1/seminars/seminar18/lambdas/capturing_reference_11.cpp new file mode 100644 index 00000000..b1ef5451 --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/capturing_reference_11.cpp @@ -0,0 +1,34 @@ +#include +#include +#include + +class Book { + public: + Book(std::string&& _title) : title(std::move(_title)) {} + std::string get_title() const { return title; } + + private: + std::string title; +}; + +bool contains_title(const std::vector& v, std::string title) { + // Explanation: equavalent to auto& t = title; + // be careful: if title is a local <=> on the stack -> returning the has_title you get a dangling reference t + // (title is destroyed, t refs to title ) + auto has_title = [&t = title](const Book& b) { + return b.get_title() == t; + }; + + return std::find_if(v.begin(), v.end(), has_title) != v.end(); +} + +// stack +// title -> 1 +// [has_title, a $ 1_object] t -> title + +// heap +// 1: "the lliad" + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/contains_title_copy_9.cpp b/module-1/seminars/seminar18/lambdas/contains_title_copy_9.cpp new file mode 100644 index 00000000..bfc35d7e --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/contains_title_copy_9.cpp @@ -0,0 +1,34 @@ +#include +#include +#include + +class Book { + public: + Book(std::string&& _title) : title(std::move(_title)) {} + std::string get_title() const { return title; } + + private: + std::string title; +}; + + +bool contains_title(const std::vector& v, std::string title) { + // Explanation: copy constructor call + // <=> auto t = title; + auto has_title = [t = title](const Book& b) { + return b.get_title() == t; + }; + + return std::find_if(v.begin(), v.end(), has_title) != v.end(); +} + +// stack +// title -> 1 +// [has_title, a $ 1_object] t -> 2 + +// heap +// 1: "the lliad" +// 2: "the lliad" +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/contains_title_pointer_10.cpp b/module-1/seminars/seminar18/lambdas/contains_title_pointer_10.cpp new file mode 100644 index 00000000..fbef6d11 --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/contains_title_pointer_10.cpp @@ -0,0 +1,32 @@ +#include +#include +#include + +class Book { + public: + Book(std::string&& _title) : title(std::move(_title)) {} + std::string get_title() const { return title; } + + private: + std::string title; +}; + +bool contains_title(const std::vector& v, std::string title) { + // Explanation: equals auto pt = &title; + auto has_title = [pt = &title](const Book& b) { + return b.get_title() == *pt; + }; + + return std::find_if(v.begin(), v.end(), has_title) != v.end(); +} + +// stack +// title -> 1 +// [has_title, a $ 1_object] pt -> title + +// heap +// 1: "the lliad" + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/lambdas_reduce_boilerplate_7.cpp b/module-1/seminars/seminar18/lambdas/lambdas_reduce_boilerplate_7.cpp new file mode 100644 index 00000000..4cdbcb52 --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/lambdas_reduce_boilerplate_7.cpp @@ -0,0 +1,44 @@ +class Plus { + int value; + public: + Plus(int v); + + int operator() (int x) const { + return x + value; + } +}; + +// Plus::operator()(int) const: # @Plus::operator()(int) const +// push rbp +// mov rbp, rsp +// mov qword ptr [rbp - 8], rdi +// mov dword ptr [rbp - 12], esi +// mov rax, qword ptr [rbp - 8] +// mov ecx, dword ptr [rbp - 12] +// add ecx, dword ptr [rax] +// mov eax, ecx +// pop rbp +// ret + +// Explanation: +// 1. reduce boilerplate +// 2. implementaion is same as call operator (operator()) + +auto plus = [value=1](int x) {return x + value;}; + +// $_0::operator()(int) const: # @"$_0::operator()(int) const" +// push rbp +// mov rbp, rsp +// mov qword ptr [rbp - 8], rdi +// mov dword ptr [rbp - 12], esi +// mov rax, qword ptr [rbp - 8] +// mov ecx, dword ptr [rbp - 12] +// add ecx, dword ptr [rax] +// mov eax, ecx +// pop rbp +// ret +// plus: +int main() { + plus(42); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/member_function_4.cpp b/module-1/seminars/seminar18/lambdas/member_function_4.cpp new file mode 100644 index 00000000..3e3bf1cd --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/member_function_4.cpp @@ -0,0 +1,46 @@ +class Plus { + int value; + public: + Plus(int v); + + int plusme(int x) const { + return x + value; + } +}; + + +// main: # @main +// push rbp +// mov rbp, rsp +// sub rsp, 16 +// mov dword ptr [rbp - 4], 0 +// lea rdi, [rbp - 8] +// mov esi, 1 +// call Plus::Plus(int) +// lea rdi, [rbp - 8] +// mov esi, 1 +// call Plus::plusme(int) const +// xor ecx, ecx +// mov dword ptr [rbp - 12], eax # 4-byte Spill +// mov eax, ecx +// add rsp, 16 +// pop rbp +// ret +// Plus::plusme(int) const: # @Plus::plusme(int) const +// push rbp +// mov rbp, rsp +// mov qword ptr [rbp - 8], rdi +// mov dword ptr [rbp - 12], esi +// mov rax, qword ptr [rbp - 8] +// mov ecx, dword ptr [rbp - 12] +// add ecx, dword ptr [rax] +// mov eax, ecx +// pop rbp +// ret + +int main() { + // Compiler produces: Plus::plusme(int) const: + Plus p(1); + p.plusme(1); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/mutable_state_15.cpp b/module-1/seminars/seminar18/lambdas/mutable_state_15.cpp new file mode 100644 index 00000000..2e39e952 --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/mutable_state_15.cpp @@ -0,0 +1,28 @@ +#include + +auto counter = []() { + static int i; + return ++i; +}; + +// the behavior is equivalent to the following class + +class Counter { + public: + int operator() () const { + static int i; + return ++i; + } +}; + +int main() { + auto c1 = counter; + auto c2 = counter; + // equivalent to + // Counter c1; + // Counter c2; + + std::cout << c1() << c1() << c1() << std::endl; + std::cout << c2() << c2() << c2() << std::endl; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/mutable_state_16.cpp b/module-1/seminars/seminar18/lambdas/mutable_state_16.cpp new file mode 100644 index 00000000..990818ca --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/mutable_state_16.cpp @@ -0,0 +1,19 @@ +#include + +int main() { + // Explanation: we want to have a unique i for each object + // lets declare lambda's member in square bracket. We get a CE, the reason is + // captye by copy -> data member read only + auto lam = [i=0]() { return ++i; }; + // stack + // [c1, a $_o obj] i(0) + // [c2, a $_o obj] i(0) + + // CE: Increment read-only + // CE: cannot assign to a varible captured by copy in a non-mutable lambda + + // Correct + auto lam = [i=0]() mutable { return ++i; }; + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/operator_overloading_6.cpp b/module-1/seminars/seminar18/lambdas/operator_overloading_6.cpp new file mode 100644 index 00000000..7f2ad081 --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/operator_overloading_6.cpp @@ -0,0 +1,27 @@ +class Plus { + int value; + public: + Plus(int v); + + int operator() (int x) const { + return x + value; + } +}; + +// Plus::operator()(int) const: # @Plus::operator()(int) const +// push rbp +// mov rbp, rsp +// mov qword ptr [rbp - 8], rdi +// mov dword ptr [rbp - 12], esi +// mov rax, qword ptr [rbp - 8] +// mov ecx, dword ptr [rbp - 12] +// add ecx, dword ptr [rax] +// mov eax, ecx +// pop rbp +// ret + +int main() { + auto plus = Plus(1); + plus(42); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/other_features_14.cpp b/module-1/seminars/seminar18/lambdas/other_features_14.cpp new file mode 100644 index 00000000..3b85bccc --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/other_features_14.cpp @@ -0,0 +1,16 @@ + +void foo() { + // C++20: + auto lam = [](int x) {return x + 1;}; + // lambda default constructible since C++20 + // decltype(lam) copy; + + // C++17: lambda constexpr by default + static_assert(lam(42) == 43); + static_assert(not noexcept(lam(42))); +} + +int main() { + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/overloading_2.cpp b/module-1/seminars/seminar18/lambdas/overloading_2.cpp new file mode 100644 index 00000000..fdccb7fb --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/overloading_2.cpp @@ -0,0 +1,37 @@ +#include + +// Explanation: +// 1. there is a problem, we need write difference version for each type +// 2. C++ magles the titles to linker symbols plus1(int), plus1(double) +int plus1(int x) { + return x + 1; +} + +int plus1(double x) { + return x + 1; +} + +// plus1(int): # @plus1(int) +// push rbp +// mov rbp, rsp +// mov dword ptr [rbp - 4], edi +// mov eax, dword ptr [rbp - 4] +// add eax, 1 +// pop rbp +// ret +// .LCPI1_0: +// .quad 4607182418800017408 # double 1 +// plus1(double): # @plus1(double) +// push rbp +// mov rbp, rsp +// movsd xmm1, qword ptr [rip + .LCPI1_0] # xmm1 = mem[0],zero +// movsd qword ptr [rbp - 8], xmm0 +// addsd xmm1, qword ptr [rbp - 8] +// cvttsd2si eax, xmm1 +// pop rbp +// ret + +int main() { + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/puzzle_13.cpp b/module-1/seminars/seminar18/lambdas/puzzle_13.cpp new file mode 100644 index 00000000..dda75fd6 --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/puzzle_13.cpp @@ -0,0 +1,17 @@ +#include + +int g = 10; +auto kitten = [=]() { return g + 1; }; +auto cat = [g=g]() { return g + 1; }; + +int main() { + + g = 20; + printf("%d %d\t", kitten(), cat()); + // Out: 21 11 + // Explanation: cat makes a local copy g; kitten always tracks global g and make a copy just on the function call + // expression kitten(), only on the kitten() you make a copy of g in kitten + // in the cat lambda you make a copy of g just you reach line 5, because lambda is an object + // and ypu intialize an object in line 5 + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/single_function_1.cpp b/module-1/seminars/seminar18/lambdas/single_function_1.cpp new file mode 100644 index 00000000..5620529b --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/single_function_1.cpp @@ -0,0 +1,21 @@ + +// Explanation: C lang legacy +int plus1(int x) { + return x + 1; +} + +// this is clang for x86-64 arch +// Hypothesis: Arthur used x86 djgpp +// +// plus1(int): # @plus1(int) +// push rbp +// mov rbp, rsp +// mov dword ptr [rbp - 4], edi +// mov eax, dword ptr [rbp - 4] +// add eax, 1 +// pop rbp +// ret + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar18/lambdas/static_typing_to_the_rescue5.cpp b/module-1/seminars/seminar18/lambdas/static_typing_to_the_rescue5.cpp new file mode 100644 index 00000000..a5c876e8 --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/static_typing_to_the_rescue5.cpp @@ -0,0 +1,22 @@ +#include + +class Plus { + int value; + public: + Plus(int v); + + int plusme(int x) const { + return x + value; + } +}; + +int main() { + auto plus = Plus(1); + // Static typing gives as the knowladge that we call plusme of the Plus object, + // not something other plus me object + auto x = plus.plusme(42); + assert(x == 43); + return 0; +} + + diff --git a/module-1/seminars/seminar18/lambdas/template_3.cpp b/module-1/seminars/seminar18/lambdas/template_3.cpp new file mode 100644 index 00000000..f2715d3c --- /dev/null +++ b/module-1/seminars/seminar18/lambdas/template_3.cpp @@ -0,0 +1,33 @@ +template +T plus1(T x) { + return x + 1; +} + +// int plus1(int): # @int plus1(int) +// push rbp +// mov rbp, rsp +// mov dword ptr [rbp - 4], edi +// mov eax, dword ptr [rbp - 4] +// add eax, 1 +// pop rbp +// ret +// .LCPI2_0: +// .quad 4607182418800017408 # double 1 +// double plus1(double): # @double plus1(double) +// push rbp +// mov rbp, rsp +// movsd xmm1, qword ptr [rip + .LCPI2_0] # xmm1 = mem[0],zero +// movsd qword ptr [rbp - 8], xmm0 +// addsd xmm1, qword ptr [rbp - 8] +// movaps xmm0, xmm1 +// pop rbp +// ret + + +int main() { + // Compiler produces: plus1 + auto x = plus1(42); + // Compiler produces: plus1 + auto y = plus1(3.14); + return 0; +} \ No newline at end of file From 7a45e50a558a4e5c10c93a44d2587d0a9ac849c9 Mon Sep 17 00:00:00 2001 From: morell Date: Thu, 4 Mar 2021 07:43:45 +0300 Subject: [PATCH 15/41] lectures: 1,3-course, lecture 3 fix --- README.md | 5 ++--- module-1/lectures/1-course/lecture3.pdf | Bin 235815 -> 235800 bytes module-1/lectures/3-course/lecture3.pdf | Bin 235816 -> 235800 bytes 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 326ac5ea..3f8b0b95 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ ## Структура репозитория -`module-1` - задания и семинары за 1-ое учебное полугодие
-`module-2` - задания и семинары за 2-ое учебное полугодие
+`module-1` - задания и семинары
## Сдача заданий @@ -23,4 +22,4 @@ ## Связь -[Slack Workspace](https://join.slack.com/t/1c-hseworkspace/shared_invite/zt-h4q9ff3l-oKj26qGMHhmoLH5G7hDpYA) \ No newline at end of file +[Slack Workspace](https://join.slack.com/t/1c-hseworkspace/shared_invite/zt-n67k87vo-d~ypzAzri~Tu4e15zQLSBw) \ No newline at end of file diff --git a/module-1/lectures/1-course/lecture3.pdf b/module-1/lectures/1-course/lecture3.pdf index 5ce5809ae9fef563bf316fdff2b828e479f575d2..2f4816be4777ad3bc6d6b5e88516fecbabf82915 100644 GIT binary patch delta 31409 zcmZ^~1CS@rwlzBKY4@~k+qN}r+qV5{_q1)>wr$(CZM`}FbHDf9bMJe#BX(r%S}QAJ z=Smc^xDGC*4lag~m7X4-P8?qopP8MR0iT7P8DATpP8OemftekjP6VHknTd@BpH2p! zg$_)uY%pAsy#zxErCdQ0L>OeXsA7eGWp zK#1vZ#4GQ>;E8$1Id1Y7jXEgVPuf7pu43~nabF> zRl3w%wy*@SfdniG@X-eI7X?jF!C=$1O8-PaHZozD1)L1t)c z3x=WwB_jxBLPO&AD`jNm!i~GRR;_gRG_itj5|YnFm)bs6E-x%Dlzmg6;uwh0pdcWr zlZGX!Gu9}nR1XGjw7`HvTx3LaaxTIvO!KI6iLD^j3sD|w#YRMFuXb@BU3K`BQ>R`Q zlmWPF6=o?SRbe|U-Btu@xoIuNTqZ4Oz@*0WtSgMfOe!P@RyR14DXTR<0z zQZ>s@hbkA_lP^>Re;yI8j#*<`M5xdX$|0eR7s@#{mL~{Rx@*yFl5tio$)!qHf0rs$ zYURxsG&zI{Nm(4m1zz!&LztT#jW4hVR{_jr?VvtKsvO{cyJ^w*?aiDo7IQzefKkql zT{g=ZQzdiAO>4*ikKPbl?xb8~4D^_jKNsy(>}$bkEj|>0k}~j=`l%ke9M{aTiwU%K zCY{sh1j7saM}S-B3AChuX-l@G>UzXG$HtBeI5h~m#uq79fmg0RG=MG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{=r<^8|$-$yf zSQ+~mdXRKc|7|wy=X6nPQ4;lz21ORp^t-qi8ND`6XyVDfyMixz0_huT#Je zWU?94+!XK!F8+$X2S2~1ZSNiqfos+-s;oI1GWSY&e6-RYc%Vl(SoiL5OUAXE%W-}i zPUM}GGzhrqBVtDP4eZMC`Q4?`1rW(GQrwBJ^96r`N^xzid&F`Qzkk>{z&sofbG&W~ ztsrq26Mloa!{mk<^qKFLS_C*Fwy-1d>~4hjbub+k{zhyZt+W$N)rrTeRHaS+&Tcul p;iXQNKC&;np(|ES$2|X#E>|@Re(zDHP1f4w)D~}b2EdDP{s-ar>{S2& diff --git a/module-1/lectures/3-course/lecture3.pdf b/module-1/lectures/3-course/lecture3.pdf index fe1466a1165f21c81116dafb01e6d38f921a642f..2f4816be4777ad3bc6d6b5e88516fecbabf82915 100644 GIT binary patch delta 28045 zcmZ^K1CS=&(&n^{Y1_7KYudJL`)&8MZF}0bZQHi(?w$MHfA`=WCQQa0jLaPD#%yeVvFt32Oh&BCrUnTYK*XXz zNEz@XEAM`w%P<7J02qmzDsUtjcK;w0kXU^hQ+-42bOgnT9uBEUq=EqkG7MUXHL!vK z3PvKxpMj)gFd1Q8=#rogK5X@0NtQhWT)Mm1_?v<`Jmo2P;>>z!}-)UY`8tul~^D8{CYvw)MqdxD!9 z%{Ab#MAi$dYUV0bo>(xpA3r2NtQQi1^ib+qP+>l&yqZh2yw%TM?w~uDuw0nY^G0o0h=4t~e4uah2>PJG3|lXSZ)z zEkw6(2~#9S-K;Pjrc&ZSu}~56c|^22W`kuJsY*8}kBmNEB=6K%o+w=Dp-sC<&Q-M} zpC(iNU8-2Aoj+sPyN z!t>AqMm0Nj*(`5Dox&+UttksUdP8EhlX{Uk&|^XIT)b1UuMMxg_)rK+#>iXhuXgBq zTrp)=K&75Y8J_$+Q1)yPhI zIruXD^-Xuhtrf&ASG+yx3k#S?vFq!#esgVttd=c4KK@KTj;P;%u6_&S2H<`30o*>; z*ZKSD-5h1GoNT){I46t4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*k&l^Tm|s1;N^rDmMK2a;sfE0zgrVmU)<9$?J9W&d=+H+A{j<9p}o%H*jU~!XO6| ze^Jud#11rhz=qh>F4s}+*IEZ?s>`QRjfz|(8ac?}hQe>}F*M~30P$SWN7WRIqzZ*C zKJNI0rDcg&9Rf{!lJF`e();-JA)H-kK5blDV7ATf$D`=p8`Ok*1DpM0G%%0W;34eY z-#CF~n4lXmAZjCqVIc7@{xX@^+xhAPQ2XD6vzy_co{K|~!v3`E8xJDTD)g8FukiTM z#ytpk3C^K@$vDz-m80OV)(V$LGdgvSW3NTa;N-^#3@*BBOhjngXT0K*3rsmWn>rXu z-GaG>kCr%l+$kt^47DmFAOMCA0OuF(BsbjgxhWB>II6}qv0 z_O_yvz~}0t`kPI7WP}%#cVn}V1z{y|*Wyh0Np5c;?kSZVh;smDOBMqT~w??&WdmTifHMDHv)aTOFmT^Te{hX+}!+R z4T`;Y*ft{nVr&wwAxFVCj!?VL+guQ(w$vSHT1U z-JKB3Mu-`tEWPv4P2JW0D^{W*SVlx^SYxR-o-Qj7P#BlWE2z`0bY0Zb`q#d$%cpry z>h%t#R4VXi+KHsJEZ)<3Y3tC8MA~^ZMO6^cGD(ouukM}IdE%sUc0tgbUiUk&D7VkdLWP$!l zlPLP2PcqD*ou!b?pw%U<=_^&tX(`@=d2*kX_~cu(mrk#^#Dc7@PF8qUowE;f#>Ggt z3d#Hlx{yIqbkDRtR4 Date: Fri, 5 Mar 2021 16:19:43 +0300 Subject: [PATCH 16/41] seminars: 19 added --- module-1/seminars/seminar19/.gitignore | 1 + .../seminar19/lambda_abi/CMakeLists.txt | 8 ++++ .../seminars/seminar19/lambda_abi/main.cpp | 7 +++ .../seminars/seminar19/lambda_abi/shelf.cpp | 13 +++++ .../seminars/seminar19/lambda_abi/shelf.h | 29 +++++++++++ .../seminar19/lambda_single_TU/CMakeLists.txt | 8 ++++ .../seminar19/lambda_single_TU/main.cpp | 48 +++++++++++++++++++ .../lambda_template_abi_fail/CMakeLists.txt | 8 ++++ .../lambda_template_abi_fail/main.cpp | 9 ++++ .../lambda_template_abi_fail/shelf.cpp | 14 ++++++ .../lambda_template_abi_fail/shelf.h | 30 ++++++++++++ .../seminars/seminar19/lambdas/CMakeLists.txt | 8 ++++ .../lambdas/Plus_template_operator_1.cpp | 21 ++++++++ .../seminar19/lambdas/accept_lambdas_7.cpp | 34 +++++++++++++ .../seminar19/lambdas/accept_lambdas_8.cpp | 34 +++++++++++++ .../seminar19/lambdas/capture_this_5.cpp | 11 +++++ .../seminar19/lambdas/clarification_=.cpp | 45 +++++++++++++++++ .../seminars/seminar19/lambdas/forward_6.cpp | 22 +++++++++ .../seminar19/lambdas/generic_lambda_2.cpp | 46 ++++++++++++++++++ .../seminar19/lambdas/lambda_this_4.cpp | 38 +++++++++++++++ .../lambdas/lambdas_may_be_copyable_10.cpp | 17 +++++++ .../seminar19/lambdas/variadic_lambdas_3.cpp | 23 +++++++++ .../templates_implementation/CMakeLists.txt | 8 ++++ .../templates_implementation/main.cpp | 6 +++ .../templates_implementation/template.cpp | 6 +++ .../templates_implementation/template.h | 4 ++ .../type_traits/is_copy_constructible.cpp | 25 ++++++++++ 27 files changed, 523 insertions(+) create mode 100644 module-1/seminars/seminar19/.gitignore create mode 100644 module-1/seminars/seminar19/lambda_abi/CMakeLists.txt create mode 100644 module-1/seminars/seminar19/lambda_abi/main.cpp create mode 100644 module-1/seminars/seminar19/lambda_abi/shelf.cpp create mode 100644 module-1/seminars/seminar19/lambda_abi/shelf.h create mode 100644 module-1/seminars/seminar19/lambda_single_TU/CMakeLists.txt create mode 100644 module-1/seminars/seminar19/lambda_single_TU/main.cpp create mode 100644 module-1/seminars/seminar19/lambda_template_abi_fail/CMakeLists.txt create mode 100644 module-1/seminars/seminar19/lambda_template_abi_fail/main.cpp create mode 100644 module-1/seminars/seminar19/lambda_template_abi_fail/shelf.cpp create mode 100644 module-1/seminars/seminar19/lambda_template_abi_fail/shelf.h create mode 100644 module-1/seminars/seminar19/lambdas/CMakeLists.txt create mode 100644 module-1/seminars/seminar19/lambdas/Plus_template_operator_1.cpp create mode 100644 module-1/seminars/seminar19/lambdas/accept_lambdas_7.cpp create mode 100644 module-1/seminars/seminar19/lambdas/accept_lambdas_8.cpp create mode 100644 module-1/seminars/seminar19/lambdas/capture_this_5.cpp create mode 100644 module-1/seminars/seminar19/lambdas/clarification_=.cpp create mode 100644 module-1/seminars/seminar19/lambdas/forward_6.cpp create mode 100644 module-1/seminars/seminar19/lambdas/generic_lambda_2.cpp create mode 100644 module-1/seminars/seminar19/lambdas/lambda_this_4.cpp create mode 100644 module-1/seminars/seminar19/lambdas/lambdas_may_be_copyable_10.cpp create mode 100644 module-1/seminars/seminar19/lambdas/variadic_lambdas_3.cpp create mode 100644 module-1/seminars/seminar19/templates_implementation/CMakeLists.txt create mode 100644 module-1/seminars/seminar19/templates_implementation/main.cpp create mode 100644 module-1/seminars/seminar19/templates_implementation/template.cpp create mode 100644 module-1/seminars/seminar19/templates_implementation/template.h create mode 100644 module-1/seminars/seminar19/type_traits/is_copy_constructible.cpp diff --git a/module-1/seminars/seminar19/.gitignore b/module-1/seminars/seminar19/.gitignore new file mode 100644 index 00000000..c795b054 --- /dev/null +++ b/module-1/seminars/seminar19/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambda_abi/CMakeLists.txt b/module-1/seminars/seminar19/lambda_abi/CMakeLists.txt new file mode 100644 index 00000000..b5ffef87 --- /dev/null +++ b/module-1/seminars/seminar19/lambda_abi/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner main.cpp shelf.cpp shelf.h) \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambda_abi/main.cpp b/module-1/seminars/seminar19/lambda_abi/main.cpp new file mode 100644 index 00000000..29546f3e --- /dev/null +++ b/module-1/seminars/seminar19/lambda_abi/main.cpp @@ -0,0 +1,7 @@ +#include "shelf.h" + +int main() { + Shelf shelf(5); + shelf.ForEachBook([](auto&& book){book.print();}); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambda_abi/shelf.cpp b/module-1/seminars/seminar19/lambda_abi/shelf.cpp new file mode 100644 index 00000000..5facafa0 --- /dev/null +++ b/module-1/seminars/seminar19/lambda_abi/shelf.cpp @@ -0,0 +1,13 @@ +#include "shelf.h" + +Book::Book(std::string&& _title) : title(std::move(_title)) {} + +std::string Book::get_title() const { return title; } + +void Book::print() const { std::cout << title; } + +void Shelf::ForEachBook(std::function f) { + for (const Book& b : books_) { + f(b); + } +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambda_abi/shelf.h b/module-1/seminars/seminar19/lambda_abi/shelf.h new file mode 100644 index 00000000..02173306 --- /dev/null +++ b/module-1/seminars/seminar19/lambda_abi/shelf.h @@ -0,0 +1,29 @@ +#pragma once + +#include +#include +#include +#include + +class Book { + public: + Book() = default; + Book(std::string&& _title); + std::string get_title() const; + void print() const; + + private: + std::string title = "Hello\n"; +}; + +class Shelf { + public: + Shelf(const uint32_t num_books) : + books_(num_books) + {} + + void ForEachBook(std::function f); + + private: + std::vector books_; +}; \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambda_single_TU/CMakeLists.txt b/module-1/seminars/seminar19/lambda_single_TU/CMakeLists.txt new file mode 100644 index 00000000..62c052da --- /dev/null +++ b/module-1/seminars/seminar19/lambda_single_TU/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner main.cpp) \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambda_single_TU/main.cpp b/module-1/seminars/seminar19/lambda_single_TU/main.cpp new file mode 100644 index 00000000..dba4b398 --- /dev/null +++ b/module-1/seminars/seminar19/lambda_single_TU/main.cpp @@ -0,0 +1,48 @@ +#include +#include +#include +#include + +class Book { + public: + Book() = default; + Book(std::string&& _title); + std::string get_title() const; + void print() const; + + private: + std::string title = "Hello\n"; +}; + +class Shelf { + public: + Shelf(const uint32_t num_books) : + books_(num_books) + {} + + template + void ForEachBook(Func f); + + private: + std::vector books_; +}; + + +Book::Book(std::string&& _title) : title(std::move(_title)) {} + +std::string Book::get_title() const { return title; } + +void Book::print() const { std::cout << title; } + +template +void Shelf::ForEachBook(Func f) { + for (const Book& b : books_) { + f(b); + } +} + +int main() { + Shelf shelf(5); + shelf.ForEachBook([](auto&& book){book.print();}); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambda_template_abi_fail/CMakeLists.txt b/module-1/seminars/seminar19/lambda_template_abi_fail/CMakeLists.txt new file mode 100644 index 00000000..b5ffef87 --- /dev/null +++ b/module-1/seminars/seminar19/lambda_template_abi_fail/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner main.cpp shelf.cpp shelf.h) \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambda_template_abi_fail/main.cpp b/module-1/seminars/seminar19/lambda_template_abi_fail/main.cpp new file mode 100644 index 00000000..6820d776 --- /dev/null +++ b/module-1/seminars/seminar19/lambda_template_abi_fail/main.cpp @@ -0,0 +1,9 @@ +#include "shelf.h" + +int main() { + Shelf shelf(5); + // CE: Reason: template declaration and implmentaion in different files + // See lecture18/templates_implementation minimal sample + shelf.ForEachBook([](auto&& book){book.print();}); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambda_template_abi_fail/shelf.cpp b/module-1/seminars/seminar19/lambda_template_abi_fail/shelf.cpp new file mode 100644 index 00000000..ba7ae17b --- /dev/null +++ b/module-1/seminars/seminar19/lambda_template_abi_fail/shelf.cpp @@ -0,0 +1,14 @@ +#include "shelf.h" + +Book::Book(std::string&& _title) : title(std::move(_title)) {} + +std::string Book::get_title() const { return title; } + +void Book::print() const { std::cout << title; } + +template +void Shelf::ForEachBook(Func f) { + for (const Book& b : books_) { + f(b); + } +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambda_template_abi_fail/shelf.h b/module-1/seminars/seminar19/lambda_template_abi_fail/shelf.h new file mode 100644 index 00000000..534984d6 --- /dev/null +++ b/module-1/seminars/seminar19/lambda_template_abi_fail/shelf.h @@ -0,0 +1,30 @@ +#pragma once + +#include +#include +#include +#include + +class Book { + public: + Book() = default; + Book(std::string&& _title); + std::string get_title() const; + void print() const; + + private: + std::string title = "Hello\n"; +}; + +class Shelf { + public: + Shelf(const uint32_t num_books) : + books_(num_books) + {} + + template + void ForEachBook(Func f); + + private: + std::vector books_; +}; \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/CMakeLists.txt b/module-1/seminars/seminar19/lambdas/CMakeLists.txt new file mode 100644 index 00000000..2009b344 --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner runner.cpp) \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/Plus_template_operator_1.cpp b/module-1/seminars/seminar19/lambdas/Plus_template_operator_1.cpp new file mode 100644 index 00000000..ab8f979b --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/Plus_template_operator_1.cpp @@ -0,0 +1,21 @@ +class Plus { +public: + Plus(int v) : value(v) {} + + // plus me is a tempate for stamping member functions + template + T operator()(T x) const { + return x + value; + } + +private: + int value; +}; + +int main() { + auto plus = Plus(1); + auto x = plus(42); + auto y = plus(3.14); + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/accept_lambdas_7.cpp b/module-1/seminars/seminar19/lambdas/accept_lambdas_7.cpp new file mode 100644 index 00000000..fa2b5308 --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/accept_lambdas_7.cpp @@ -0,0 +1,34 @@ +#include +#include +#include + +class Book { + public: + Book(std::string&& _title) : title(std::move(_title)) {} + std::string get_title() const { return title; } + + private: + std::string title; +}; + +// using +class Shelf { + public: + + // 1 translation unit => just use template parameter + template + void ForEachBook(Func f) { + for (const Book& b : books_) { + std::cout << f(b); + } + } + + private: + std::vector books_; +}; + +int main() { + Shelf shelf; + shelf.ForEachBook([](auto&& book){book.get_title();}); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/accept_lambdas_8.cpp b/module-1/seminars/seminar19/lambdas/accept_lambdas_8.cpp new file mode 100644 index 00000000..2b36556d --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/accept_lambdas_8.cpp @@ -0,0 +1,34 @@ +#include +#include +#include + +class Book { + public: + Book(std::string&& _title) : title(std::move(_title)) {} + std::string get_title() const { return title; } + + private: + std::string title; +}; + +// using +class Shelf { + public: + // several translation units (if we want to a lambda from one obf file to another obj file) => + // use concreate type with overloaded operator(): syntax ConcreateType f + // here we use std::function + void ForEachBook(std::function f) { + for (const Book& b : books_) { + std::cout << f(b); + } + } + + private: + std::vector books_; +}; + +int main() { + Shelf shelf; + shelf.ForEachBook([](auto&& book){book.get_title();}); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/capture_this_5.cpp b/module-1/seminars/seminar19/lambdas/capture_this_5.cpp new file mode 100644 index 00000000..5f8bb13d --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/capture_this_5.cpp @@ -0,0 +1,11 @@ +// 1. Deprecated: C++20. Reason: "=" means capture by value, this - pointer => just copy pointer + // run_in_thread([=]() {this->printer(x);}); + + // 2. To capture "this" by value you should capture it explicitly + // run_in_thread([=]() {this->printer(x);}); + + // 3. "this" by copy other by reference + // run_in_thread([&, this]() {this->printer(x);}); + + // 4. capture by "*this" captures Widget object explicitly + // run_in_thread([*this]() {this->printer(x);}); \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/clarification_=.cpp b/module-1/seminars/seminar19/lambdas/clarification_=.cpp new file mode 100644 index 00000000..b10c600d --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/clarification_=.cpp @@ -0,0 +1,45 @@ +#include + +class Container { + public: + Container() = default; + Container(const Container& other) { + std::cout << "copy" << std::endl; + }; +}; + +Container y; + +int main() { + // [] , [&], [=] difference + // [] - capture no local variables + // [=] - capture all local variables (that are used in the lambda) by copy + // [&] - capture all local variables (that are used in the lambda) by reference + + // CE: + Container x; + // auto lam1 = []() { x;}; + //lam1(); + + // Copy constructor + auto lam2 = [=]() { x;}; + lam2(); + + // No copy + auto lam3 = [&]() { x;}; + lam3(); + + // [] , [=] similarity + // [] - capture global variables by reference + // [=] - capture global variables by reference + // [&] - capture global variables by reference + auto lam4 = []() { y;}; + auto lam5 = [=]() { y;}; + auto lam6 = [&]() { y;}; + + //lam4(); + //lam5(); + //lam6(); + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/forward_6.cpp b/module-1/seminars/seminar19/lambdas/forward_6.cpp new file mode 100644 index 00000000..a13da2f7 --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/forward_6.cpp @@ -0,0 +1,22 @@ +#include +#include +#include + +int32_t foo(std::vector& v) {return 1;} + +int32_t foo(std::vector&& v) {return 2;} + +// Before C++20 +auto times = [](auto&&... args) { + return foo(std::forward(args)...); +}; + +// Since C++20 +auto times2 = [](Ts&&... args) { + return (std::forward(args)...); +} + +int main() { + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/generic_lambda_2.cpp b/module-1/seminars/seminar19/lambdas/generic_lambda_2.cpp new file mode 100644 index 00000000..2054799c --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/generic_lambda_2.cpp @@ -0,0 +1,46 @@ +#include + +class Int { +public: + Int(int val) : val_(val) {}; + + Int& operator+=(const Int& rhs) { + val_ += rhs.val_; + return *this; + } + + friend Int operator+(Int& lhs, const Int& rhs); + friend std::ostream& operator<<(std::ostream& lhs, const Int& rhs); + +private: + int val_; +}; + +Int operator+(Int& lhs, const Int& rhs) { + lhs += rhs; + return lhs; +} + +std::ostream& operator<<(std::ostream& lhs, const Int& rhs) { + lhs << rhs.val_; + return lhs; +} + +int main() { + + Int myInt(2); + auto non_template_plus = [value=1](int x) { return x + value; }; + // OK! + std::cout << non_template_plus(2); + // CE: + std::cout << non_template_plus(myInt); + + // 1. Template parameter disappeared + // 2. auto here is an equivalent for template parameter + auto template_plus = [value=1](auto x) { return x + value; }; + // OK! + std::cout << template_plus(2); + // OK! + std::cout << template_plus(myInt); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/lambda_this_4.cpp b/module-1/seminars/seminar19/lambdas/lambda_this_4.cpp new file mode 100644 index 00000000..132dfec0 --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/lambda_this_4.cpp @@ -0,0 +1,38 @@ +#include +#include +#include + +class Widget { +public: + + void SyncPrinter(int32_t x) { + this->printer(x); + } + + void AsyncPrinter(int32_t x) { + run_in_thread([=]() {this->printer(x);}); + std::thread::id this_id = std::this_thread::get_id(); + std::cout << "t1:" << this_id << std::endl; + } + +private: + + // TODO: set type for accepting lambdas + template + void run_in_thread(Func f) { + auto t = std::thread(f); + t.join(); + }; + + void printer(int32_t x) { + std::thread::id this_id = std::this_thread::get_id(); + std::cout << "t2:" << this_id << std::endl; + std::cout << x * x << std::endl; + } +}; + +int main() { + Widget w; + w.AsyncPrinter(10); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/lambdas_may_be_copyable_10.cpp b/module-1/seminars/seminar19/lambdas/lambdas_may_be_copyable_10.cpp new file mode 100644 index 00000000..cd6c0ff3 --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/lambdas_may_be_copyable_10.cpp @@ -0,0 +1,17 @@ +#include +#include +#include + + +int main() { + std::unique_ptr prop; + auto lam = [p = std::move(prop)]() {}; + auto lam2 = std::move(lam); + + // CE: call to implicitly deleted copy constructor + // auto lam3 = lam2; + + // CE + // std::function f = std::move(lam); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/lambdas/variadic_lambdas_3.cpp b/module-1/seminars/seminar19/lambdas/variadic_lambdas_3.cpp new file mode 100644 index 00000000..b02f3872 --- /dev/null +++ b/module-1/seminars/seminar19/lambdas/variadic_lambdas_3.cpp @@ -0,0 +1,23 @@ + +int main() { + // 1. Template parameter disappeared + // 2. auto here is an equivalent for template parameter + + // tuple: + // 1. stores arguments + // 2. applies foo to arguments + auto tuple = [](auto ...xs) { + return [=](auto foo) { return foo(xs...); }; + }; + + // length: + // 1. stores arg + // 2. call arg with another func + auto length = [](auto xs) { + return xs([](auto ...z) { return sizeof...(z); }); + }; + + auto three = length(tuple(1, '2', "3")); + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/templates_implementation/CMakeLists.txt b/module-1/seminars/seminar19/templates_implementation/CMakeLists.txt new file mode 100644 index 00000000..8a4af1c1 --- /dev/null +++ b/module-1/seminars/seminar19/templates_implementation/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner main.cpp template.h template.cpp) \ No newline at end of file diff --git a/module-1/seminars/seminar19/templates_implementation/main.cpp b/module-1/seminars/seminar19/templates_implementation/main.cpp new file mode 100644 index 00000000..74013f8a --- /dev/null +++ b/module-1/seminars/seminar19/templates_implementation/main.cpp @@ -0,0 +1,6 @@ +#include "template.h" + +int main() { + foo(); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/templates_implementation/template.cpp b/module-1/seminars/seminar19/templates_implementation/template.cpp new file mode 100644 index 00000000..2e31fde3 --- /dev/null +++ b/module-1/seminars/seminar19/templates_implementation/template.cpp @@ -0,0 +1,6 @@ +#include "template.h" + +template +void foo() +{ +} \ No newline at end of file diff --git a/module-1/seminars/seminar19/templates_implementation/template.h b/module-1/seminars/seminar19/templates_implementation/template.h new file mode 100644 index 00000000..9984d34c --- /dev/null +++ b/module-1/seminars/seminar19/templates_implementation/template.h @@ -0,0 +1,4 @@ +#pragma once + +template +extern void foo(); diff --git a/module-1/seminars/seminar19/type_traits/is_copy_constructible.cpp b/module-1/seminars/seminar19/type_traits/is_copy_constructible.cpp new file mode 100644 index 00000000..d1c9abfe --- /dev/null +++ b/module-1/seminars/seminar19/type_traits/is_copy_constructible.cpp @@ -0,0 +1,25 @@ +#include +#include +#include + +template()))> +static std::true_type unary(int); + +template +static std::false_type unary(...); + +struct S { + S(int x) {}; + ~S() = delete; + + static int v; +}; + +int main() { + using T = S; + using A = int; + std::cout << std::is_destructible::value << std::endl; + std::cout << std::is_constructible::value << std::endl; + std::cout << decltype(unary(0))::value; + return 0; +} \ No newline at end of file From 63fb2fdd8e048fcb7f16cd17cdcbbfc7ae8ae7e0 Mon Sep 17 00:00:00 2001 From: morell Date: Mon, 8 Mar 2021 09:23:30 +0300 Subject: [PATCH 17/41] homework: variant get fixes --- module-1/homework/Variant/tests.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module-1/homework/Variant/tests.cpp b/module-1/homework/Variant/tests.cpp index 3075960e..f0e247db 100644 --- a/module-1/homework/Variant/tests.cpp +++ b/module-1/homework/Variant/tests.cpp @@ -8,23 +8,23 @@ TEST(Get, Test1) { task::variant v; v = "Hello world"; - ASSERT_EQ(std::get(v),"Hello world"); + ASSERT_EQ(get(v),"Hello world"); } TEST(Get, Test2) { task::variant v; v = 12.0; - ASSERT_NEAR(std::get(v), 12.0, 1e-5); + ASSERT_NEAR(get(v), 12.0, 1e-5); } TEST(Get, Test3) { task::variant v; v = "Hello world"; - ASSERT_EQ(std::get<2>(v), "Hello world"); + ASSERT_EQ(get<2>(v), "Hello world"); } TEST(Get, Test4) { task::variant v; v = 12.0; - ASSERT_NEAR(std::get<1>(v), 12.0, 1e-5); + ASSERT_NEAR(get<1>(v), 12.0, 1e-5); } \ No newline at end of file From 08c1804d62b3a7c8a48b26ce7a00197c9d31d052 Mon Sep 17 00:00:00 2001 From: morell5 Date: Fri, 12 Mar 2021 15:36:28 +0300 Subject: [PATCH 18/41] seminars: 20 added --- module-1/seminars/seminar20/.gitignore | 1 + .../seminars/seminar20/type_traits/0_spec.cpp | 86 +++++++++++++++++++ .../seminar20/type_traits/10_mass_prod2.cpp | 50 +++++++++++ .../seminar20/type_traits/11_mass_prod3.cpp | 26 ++++++ .../seminar20/type_traits/12_mass_prod4.cpp | 16 ++++ .../type_traits/13_conditional_t.cpp | 18 ++++ .../seminar20/type_traits/14_enable_if_t1.cpp | 33 +++++++ .../seminar20/type_traits/15_enable_if_t2.cpp | 41 +++++++++ .../type_traits/1_integral_const.cpp | 17 ++++ .../seminar20/type_traits/2_is_reference.cpp | 20 +++++ .../type_traits/3_remove_reference.cpp | 26 ++++++ .../type_traits/4_add_lvalue_reference.cpp | 21 +++++ .../type_traits/5_1_trouble_looms.cpp | 37 ++++++++ .../type_traits/5_2_trouble_looms.cpp | 25 ++++++ .../5_3_void_t_as_tool_for_mass_prod.cpp | 36 ++++++++ .../type_traits/6_0_distance_impl.cpp | 16 ++++ .../type_traits/6_1_assignment_result.cpp | 13 +++ .../type_traits/6_2_is_assignable.cpp | 23 +++++ .../seminar20/type_traits/6_void_t.cpp | 23 +++++ .../8_expressions_to_trigger_sfinae.cpp | 12 +++ .../seminar20/type_traits/9_mass_prod1.cpp | 16 ++++ .../seminar20/type_traits/CMakeLists.txt | 8 ++ 22 files changed, 564 insertions(+) create mode 100644 module-1/seminars/seminar20/.gitignore create mode 100644 module-1/seminars/seminar20/type_traits/0_spec.cpp create mode 100644 module-1/seminars/seminar20/type_traits/10_mass_prod2.cpp create mode 100644 module-1/seminars/seminar20/type_traits/11_mass_prod3.cpp create mode 100644 module-1/seminars/seminar20/type_traits/12_mass_prod4.cpp create mode 100644 module-1/seminars/seminar20/type_traits/13_conditional_t.cpp create mode 100644 module-1/seminars/seminar20/type_traits/14_enable_if_t1.cpp create mode 100644 module-1/seminars/seminar20/type_traits/15_enable_if_t2.cpp create mode 100644 module-1/seminars/seminar20/type_traits/1_integral_const.cpp create mode 100644 module-1/seminars/seminar20/type_traits/2_is_reference.cpp create mode 100644 module-1/seminars/seminar20/type_traits/3_remove_reference.cpp create mode 100644 module-1/seminars/seminar20/type_traits/4_add_lvalue_reference.cpp create mode 100644 module-1/seminars/seminar20/type_traits/5_1_trouble_looms.cpp create mode 100644 module-1/seminars/seminar20/type_traits/5_2_trouble_looms.cpp create mode 100644 module-1/seminars/seminar20/type_traits/5_3_void_t_as_tool_for_mass_prod.cpp create mode 100644 module-1/seminars/seminar20/type_traits/6_0_distance_impl.cpp create mode 100644 module-1/seminars/seminar20/type_traits/6_1_assignment_result.cpp create mode 100644 module-1/seminars/seminar20/type_traits/6_2_is_assignable.cpp create mode 100644 module-1/seminars/seminar20/type_traits/6_void_t.cpp create mode 100644 module-1/seminars/seminar20/type_traits/8_expressions_to_trigger_sfinae.cpp create mode 100644 module-1/seminars/seminar20/type_traits/9_mass_prod1.cpp create mode 100644 module-1/seminars/seminar20/type_traits/CMakeLists.txt diff --git a/module-1/seminars/seminar20/.gitignore b/module-1/seminars/seminar20/.gitignore new file mode 100644 index 00000000..c795b054 --- /dev/null +++ b/module-1/seminars/seminar20/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/0_spec.cpp b/module-1/seminars/seminar20/type_traits/0_spec.cpp new file mode 100644 index 00000000..dd2106c8 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/0_spec.cpp @@ -0,0 +1,86 @@ +#include + +template +struct A { // #0 primary template + constexpr static int32_t val = 0; +}; + +template +struct A { // #4: + constexpr static int32_t val = 4; +}; + +template +struct A { // #1: + constexpr static int32_t val = 1; +}; + +template +struct A { // #3: + constexpr static int32_t val = 3; +}; + +template +struct A { // #2: + constexpr static int32_t val = 2; +}; + +// Expected: partial order +// branch0: #2 \subset #0 +// barnch1: #3 \subset #1 \subset #4 \subset #0 + +int main() { + + // Selection algorithm + // 0. Branch 0 analysis + // 0. check #2 fail on first parameter T1*: reason first is int32_t + // 1. Branch 1 analysis + // 0. check #3: fail on third parameter 5: reason third parameter is 1 + // 1. check #1: success: reason T1=int32_t, T1*=int32_t*, I=1 -> choose #1 + + std::cout << A::val << std::endl; // uses partial specialization #1 (T=int32_t, I=1) + + // Selection algorithm + // 0. Branch 0 analysis + // 0. check #2 fail on first parameter T1*: reason first is int32_t + // 1. Branch 1 analysis + // 0. check #3: success: reason T1=char -> spec accepts -> choose #3 + + std::cout << A::val << std::endl; // uses partial specialization #3, (T=char) + + // Selection algorithm + // 0. Branch 0 analysis + // 0. check #2 fail on first parameter T1*: reason first is int32_t + // 1. Branch 1 analysis + // 0. check #3: fail on third parameter 5: reason third parameter is 1 + // 1. check #1: fail on second parameter char*: reason T1=int32_t-> spec accepts + // 2. check #4: success: reason T1=int32_t, T2=char, I=1 -> spec accepts -> choose #4 + + std::cout << A::val << std::endl; // uses partial specialization #4, (X=int32_t, T=char, I=1) + + // Selection algorithm + // 0. Branch 0 analysis + // 0. check #2: fail on: T1*=int32_t** + // 1. Branch 1 analysis + // 0. check #3: fail on third parameter 5 + // 1. check #1: fail on T1*=int32_t** + // 2. check #4: fail on T2*=int32_t** + // 3. choose primary template + + std::cout << A::val << std::endl; // primary template + + + + // Selection algorithm + // 0. Branch 0 analysis + // 0. check #1: success: reason T1=int32_t, T1*=int32_t*, I=1 -> choose #1 + // 1. Branch 1 analysis + // 0. check #3: fail on third parameter 5: reason third parameter is 1 + // 1. check #1: fail on T1*=int32_t** + // 2. check #4: success: reason T1=int32_t, T2*=int32_t**, I=2 -> choose #1 + + // CE: branch 0 succeeded, branch 1 succeeded + // std::cout << A::val << std::endl; + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/10_mass_prod2.cpp b/module-1/seminars/seminar20/type_traits/10_mass_prod2.cpp new file mode 100644 index 00000000..165e23b2 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/10_mass_prod2.cpp @@ -0,0 +1,50 @@ +#include + +// Via functions + +struct is_polymorhic_helper { + + template(std::declval>()))> + static std::true_type foo(int); + + template + static std::false_type foo(...); +}; + +template +struct is_polymorhic_via_functions : public decltype(is_polymorhic_helper::foo(0)) {}; + +// Via structs + +template +struct IP_IMPL : std::false_type {}; + +template +struct IP_IMPL(std::declval>()))> : std::true_type {}; + + +template +// IP_IMPL well-formed -> true +// IP_IMPL ill-formed -> false +struct is_polymorhic_via_structs : IP_IMPL {}; + + +void remove_cv_t_explanation() { + // we use remove_cv_t to handle cast error from const T* / volatile T* to void* + + struct Foo { + public: + virtual void foo() {}; + }; + + + using T = const Foo; + using U = int; + // Example: CE + using M = decltype(dynamic_cast(std::declval())); +}; + +int main() { + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/11_mass_prod3.cpp b/module-1/seminars/seminar20/type_traits/11_mass_prod3.cpp new file mode 100644 index 00000000..f7501400 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/11_mass_prod3.cpp @@ -0,0 +1,26 @@ +#include +#include +#include + +template +struct IC_IMPL : std::false_type {}; + +template +struct IC_IMPL()...))), Ts...> : std::true_type { + constexpr static auto t = std::tuple(); +}; + +template +struct is_constructible : IC_IMPL {}; + +struct Foo { + Foo(int,double); +}; + +int main() { + auto t = is_constructible::t; + // void maps to second parameter -> decltype(void(::new T(std::declval()...))) + // there is no void in Ts... + std::cout << std::is_same>::value; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/12_mass_prod4.cpp b/module-1/seminars/seminar20/type_traits/12_mass_prod4.cpp new file mode 100644 index 00000000..b0f2cbed --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/12_mass_prod4.cpp @@ -0,0 +1,16 @@ +#include + +template +struct INCTImpl : std::false_type {}; + +// we use std::bool_constant to store noexcept result +template +struct INCTImpl()...))), Us...> : +std::bool_constant()...))> {}; + +template +struct IsNothrowConstructible : INCTImpl {}; + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/13_conditional_t.cpp b/module-1/seminars/seminar20/type_traits/13_conditional_t.cpp new file mode 100644 index 00000000..a4820494 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/13_conditional_t.cpp @@ -0,0 +1,18 @@ +#include + +template +struct Conditional { + using type = T; +}; + +template +struct Conditional { + using type = F; +}; + +template +using ConditionalT = typename Conditional::type; + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/14_enable_if_t1.cpp b/module-1/seminars/seminar20/type_traits/14_enable_if_t1.cpp new file mode 100644 index 00000000..05884479 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/14_enable_if_t1.cpp @@ -0,0 +1,33 @@ +#include +#include +#include + +template +struct EnableIf { + using type = T; +}; + +template +// Simplification from Conditional: Conditional -> Conditional +// { using type = F; } -> {} +struct EnableIf {}; + +template +using EnableIfT = typename EnableIf::type; + +template +struct A { + std::string name = "primary"; +}; + +template +struct A::value>> { + std::string name = "spec"; +}; + + +int main() { + std::cout << A().name << std::endl; + std::cout << A().name << std::endl; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/15_enable_if_t2.cpp b/module-1/seminars/seminar20/type_traits/15_enable_if_t2.cpp new file mode 100644 index 00000000..a063221e --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/15_enable_if_t2.cpp @@ -0,0 +1,41 @@ +#include +#include + +template +struct EnableIf { + using type = T; +}; + +template +struct EnableIf {}; + +template +using EnableIfT = typename EnableIf::type; + +// EnableIfT is an opposite to partial specializations with SFINAE +// EnableIfT maps: +// true -> well-formed expression +// false -> ill-formed expression + +// partial specializations with SFINAE maps: +// well-formed expression -> true +// ill-formed expression -> false + + +// Via structs + +template +struct IP_IMPL : std::false_type {}; + +template +struct IP_IMPL(std::declval>()))> : std::true_type {}; + + +template +// IP_IMPL well-formed -> true +// IP_IMPL ill-formed -> false +struct is_polymorhic_via_structs : IP_IMPL {}; + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/1_integral_const.cpp b/module-1/seminars/seminar20/type_traits/1_integral_const.cpp new file mode 100644 index 00000000..58d65a20 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/1_integral_const.cpp @@ -0,0 +1,17 @@ +#include +#include + +template +struct IntegralConst { + static constexpr T kValue = v; +}; + +template +using BoolConstant = IntegralConst; + +using TrueType = BoolConstant; +using FalseType = BoolConstant; + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/2_is_reference.cpp b/module-1/seminars/seminar20/type_traits/2_is_reference.cpp new file mode 100644 index 00000000..d429d5f9 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/2_is_reference.cpp @@ -0,0 +1,20 @@ +#include +#include + +template +struct IsReference : std::false_type {}; + +template +struct IsReference : std::true_type {}; + +template +struct IsReference : std::true_type {}; + +template +inline constexpr bool kIsReferenceV = typename IsReference::value; + +int main() { + static_assert(kIsReferenceV); + static_assert(!kIsReferenceV); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/3_remove_reference.cpp b/module-1/seminars/seminar20/type_traits/3_remove_reference.cpp new file mode 100644 index 00000000..aa881303 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/3_remove_reference.cpp @@ -0,0 +1,26 @@ +#include +#include + +template +struct RemoveReference { + using Type = T; +}; + +template +struct remove_reference { + using Type = T; +}; + +template +struct remove_reference { + using Type = T; +}; + +template +using RemoveReferenceT = typename RemoveReference::type; + +int main() { + static_assert(std::is_same, int>); + static_assert(std::is_same, int>); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/4_add_lvalue_reference.cpp b/module-1/seminars/seminar20/type_traits/4_add_lvalue_reference.cpp new file mode 100644 index 00000000..768b87eb --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/4_add_lvalue_reference.cpp @@ -0,0 +1,21 @@ +#include +#include + +template +struct add_lvalue_reference { + using type = T&; +}; + +template +using add_lvalue_reference_t = typename add_lvalue_reference::type; + +int main() { + // It is ok, but what about void? + static_assert( std::is_same_v, int&> ); + static_assert( std::is_same_v, int&> ); + static_assert( std::is_same_v, int&> ); + // CE: forming reference to void + static_assert( std::is_same, void> ); + // Solution: partial spec comes to the rescue + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/5_1_trouble_looms.cpp b/module-1/seminars/seminar20/type_traits/5_1_trouble_looms.cpp new file mode 100644 index 00000000..6e9b9f48 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/5_1_trouble_looms.cpp @@ -0,0 +1,37 @@ +#include +#include + +template +struct add_lvalue_reference { + using type = T&; +}; + +template <> +struct add_lvalue_reference { + using type = void; +}; + +template <> +struct add_lvalue_reference { + +}; + +template <> +struct add_lvalue_reference { + +}; + +template <> +struct add_lvalue_reference { + +}; + +template +using add_lvalue_reference_t = typename add_lvalue_reference::type; + +int main() { + // Now it works, but it's naive =( + static_assert( std::is_same_v, void> ); + // Motivation: make compiler add reference if and only if it would caused an error + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/5_2_trouble_looms.cpp b/module-1/seminars/seminar20/type_traits/5_2_trouble_looms.cpp new file mode 100644 index 00000000..74b25893 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/5_2_trouble_looms.cpp @@ -0,0 +1,25 @@ +#include +#include + +template +struct ALR_impl { + using type = T; +}; + +template +// we put std::remove_reference_t here to triggere sfinae on +// std::remove_reference_t - because it causes CE +struct ALR_impl> { + using type = T&; +}; + +template +struct add_lvalue_reference : ALR_impl> {}; + +int main() { + + // Notice that: + // - we use partial spec => std::remove_reference_t == std::remove_reference_t (same type) + // - we don't user patial spec => std::remove_reference_t is ill-formed + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/5_3_void_t_as_tool_for_mass_prod.cpp b/module-1/seminars/seminar20/type_traits/5_3_void_t_as_tool_for_mass_prod.cpp new file mode 100644 index 00000000..0dbffa35 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/5_3_void_t_as_tool_for_mass_prod.cpp @@ -0,0 +1,36 @@ +#include +#include + +template +using void_t = void; + +template +struct ALR_impl { + using type = T; +}; + +template +struct ALR_impl> { + using type = T&; +}; + +template +struct ARR_impl { + using type = T; +}; + +template +struct ARR_impl> { + using type = T&&; +}; + + +template +struct add_lvalue_reference : ALR_impl {}; + +template +struct add_rvalue_reference : ARR_impl {}; + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/6_0_distance_impl.cpp b/module-1/seminars/seminar20/type_traits/6_0_distance_impl.cpp new file mode 100644 index 00000000..c74baea5 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/6_0_distance_impl.cpp @@ -0,0 +1,16 @@ +#include + +template +struct PriorityTag {}; + +auto DistanceImpl(It first, It last, PriorityTag<0>); + +template +auto Distance(It first, It last) { + return DistanceImpl(first, last, PriorityTag<1>{}); +} + +int main() { + + return 0; +} diff --git a/module-1/seminars/seminar20/type_traits/6_1_assignment_result.cpp b/module-1/seminars/seminar20/type_traits/6_1_assignment_result.cpp new file mode 100644 index 00000000..5e7960ee --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/6_1_assignment_result.cpp @@ -0,0 +1,13 @@ +#include +#include + +template +using assignment_result_t = decltype( std::declval() = std::declval() ); + +int main() { + static_assert( std::is_same, int&>::value ); + // CE: ill-formed we can not assign int* to int& + // assignment_result_t x; + // Next: what if the ill-formed expression is a = b? + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/6_2_is_assignable.cpp b/module-1/seminars/seminar20/type_traits/6_2_is_assignable.cpp new file mode 100644 index 00000000..f37a0213 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/6_2_is_assignable.cpp @@ -0,0 +1,23 @@ +#include +#include +#include + +template +struct is_assignable_impl : std::false_type {}; + +template +// is_assignable_impl resolution algo: +// 1. ensure well-formedness std::declval() = std::declval() +// 2. cast expression to void +// 3. use void as third parameter (decltype) +// 4. add spec as candidate + +struct is_assignable_impl< T, U, decltype(static_cast( std::declval() = std::declval() ))> : std::true_type {}; + +template +struct is_assignable : is_assignable_impl {}; + +int main() { + std::cout << is_assignable::value; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/6_void_t.cpp b/module-1/seminars/seminar20/type_traits/6_void_t.cpp new file mode 100644 index 00000000..0200e002 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/6_void_t.cpp @@ -0,0 +1,23 @@ +#include +#include + +template +using void_t = void; + +template +struct ALR_impl { + using type = T; +}; + +template +struct ALR_impl> { + using type = T&; +}; + +template +struct add_lvalue_reference : ALR_impl {}; + +int main() { + // add_lvalue_ref == impl == impl> + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/8_expressions_to_trigger_sfinae.cpp b/module-1/seminars/seminar20/type_traits/8_expressions_to_trigger_sfinae.cpp new file mode 100644 index 00000000..1b51e489 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/8_expressions_to_trigger_sfinae.cpp @@ -0,0 +1,12 @@ +#include + +int main() { + using T = int&; + using U = int; + + decltype(void( std::declval() = std::declval() )); + decltype( std::declval() = std::declval(), void()); + std::void_t() = std::declval() )>; + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/9_mass_prod1.cpp b/module-1/seminars/seminar20/type_traits/9_mass_prod1.cpp new file mode 100644 index 00000000..a691ae3b --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/9_mass_prod1.cpp @@ -0,0 +1,16 @@ +#include + +// Via functions + +template +struct ISC_IMPL : std::false_type {}; + +template +struct ISC_IMPL(std::declval())))> : std::true_type {}; + +template +struct is_static_castable : ISC_IMPL {}; + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar20/type_traits/CMakeLists.txt b/module-1/seminars/seminar20/type_traits/CMakeLists.txt new file mode 100644 index 00000000..2b488911 --- /dev/null +++ b/module-1/seminars/seminar20/type_traits/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner 0_spec) \ No newline at end of file From ea9496692356fcda0d9e429885da3d6ac0af3c1e Mon Sep 17 00:00:00 2001 From: morell5 Date: Fri, 19 Mar 2021 15:57:18 +0300 Subject: [PATCH 19/41] seminars: 21 added --- .../seminar21/interprocess/CMakeLists.txt | 8 + .../seminars/seminar21/interprocess/p1.cpp | 21 + .../seminars/seminar21/interprocess/p2.cpp | 26 + .../seminar21/type_traits/22_0_offset_ptr.cpp | 33 + .../seminar21/type_traits/22_1_offset_ptr.cpp | 47 ++ .../seminar21/type_traits/22_2_offset_ptr.cpp | 53 ++ .../seminar21/type_traits/22_3_offset_ptr.cpp | 53 ++ .../type_traits/23_1_pointer_traits.cpp | 28 + .../type_traits/23_2_pointer_traits.cpp | 33 + .../type_traits/23_3_pointer_traits.cpp | 32 + .../type_traits/23_4_pointer_traits.cpp | 35 + .../type_traits/23_5_pointer_traits.cpp | 29 + .../seminar21/type_traits/CMakeLists.txt | 8 + .../type_traits/build/CMakeCache.txt | 366 ++++++++++ .../CMakeFiles/3.16.3/CMakeCCompiler.cmake | 76 ++ .../CMakeFiles/3.16.3/CMakeCXXCompiler.cmake | 88 +++ .../3.16.3/CMakeDetermineCompilerABI_C.bin | Bin 0 -> 16552 bytes .../3.16.3/CMakeDetermineCompilerABI_CXX.bin | Bin 0 -> 16560 bytes .../build/CMakeFiles/3.16.3/CMakeSystem.cmake | 15 + .../3.16.3/CompilerIdC/CMakeCCompilerId.c | 671 ++++++++++++++++++ .../build/CMakeFiles/3.16.3/CompilerIdC/a.out | Bin 0 -> 16712 bytes .../CompilerIdCXX/CMakeCXXCompilerId.cpp | 660 +++++++++++++++++ .../CMakeFiles/3.16.3/CompilerIdCXX/a.out | Bin 0 -> 16720 bytes .../CMakeDirectoryInformation.cmake | 16 + .../build/CMakeFiles/CMakeOutput.log | 461 ++++++++++++ .../build/CMakeFiles/Makefile.cmake | 120 ++++ .../type_traits/build/CMakeFiles/Makefile2 | 106 +++ .../build/CMakeFiles/TargetDirectories.txt | 3 + .../build/CMakeFiles/cmake.check_cache | 1 + .../build/CMakeFiles/progress.marks | 1 + .../build/CMakeFiles/runner.dir/0_spec.cpp.o | Bin 0 -> 3096 bytes .../CMakeFiles/runner.dir/CXX.includecache | 12 + .../CMakeFiles/runner.dir/DependInfo.cmake | 20 + .../build/CMakeFiles/runner.dir/build.make | 98 +++ .../CMakeFiles/runner.dir/cmake_clean.cmake | 10 + .../CMakeFiles/runner.dir/depend.internal | 5 + .../build/CMakeFiles/runner.dir/depend.make | 5 + .../build/CMakeFiles/runner.dir/flags.make | 10 + .../build/CMakeFiles/runner.dir/link.txt | 1 + .../build/CMakeFiles/runner.dir/progress.make | 3 + .../seminar21/type_traits/build/Makefile | 178 +++++ .../type_traits/build/cmake_install.cmake | 49 ++ .../seminar21/type_traits/build/runner | Bin 0 -> 17224 bytes .../seminars/seminar21/type_traits/runner.py | 23 + 44 files changed, 3404 insertions(+) create mode 100644 module-1/seminars/seminar21/interprocess/CMakeLists.txt create mode 100644 module-1/seminars/seminar21/interprocess/p1.cpp create mode 100644 module-1/seminars/seminar21/interprocess/p2.cpp create mode 100644 module-1/seminars/seminar21/type_traits/22_0_offset_ptr.cpp create mode 100644 module-1/seminars/seminar21/type_traits/22_1_offset_ptr.cpp create mode 100644 module-1/seminars/seminar21/type_traits/22_2_offset_ptr.cpp create mode 100644 module-1/seminars/seminar21/type_traits/22_3_offset_ptr.cpp create mode 100644 module-1/seminars/seminar21/type_traits/23_1_pointer_traits.cpp create mode 100644 module-1/seminars/seminar21/type_traits/23_2_pointer_traits.cpp create mode 100644 module-1/seminars/seminar21/type_traits/23_3_pointer_traits.cpp create mode 100644 module-1/seminars/seminar21/type_traits/23_4_pointer_traits.cpp create mode 100644 module-1/seminars/seminar21/type_traits/23_5_pointer_traits.cpp create mode 100644 module-1/seminars/seminar21/type_traits/CMakeLists.txt create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeCache.txt create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeCCompiler.cmake create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_C.bin create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_CXX.bin create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeSystem.cmake create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdC/a.out create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdCXX/a.out create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/CMakeDirectoryInformation.cmake create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/CMakeOutput.log create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/Makefile.cmake create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/Makefile2 create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/TargetDirectories.txt create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/cmake.check_cache create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/progress.marks create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/0_spec.cpp.o create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/CXX.includecache create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/DependInfo.cmake create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/build.make create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/cmake_clean.cmake create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/depend.internal create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/depend.make create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/flags.make create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/link.txt create mode 100644 module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/progress.make create mode 100644 module-1/seminars/seminar21/type_traits/build/Makefile create mode 100644 module-1/seminars/seminar21/type_traits/build/cmake_install.cmake create mode 100644 module-1/seminars/seminar21/type_traits/build/runner create mode 100644 module-1/seminars/seminar21/type_traits/runner.py diff --git a/module-1/seminars/seminar21/interprocess/CMakeLists.txt b/module-1/seminars/seminar21/interprocess/CMakeLists.txt new file mode 100644 index 00000000..26696b51 --- /dev/null +++ b/module-1/seminars/seminar21/interprocess/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(p2 p2.cpp) \ No newline at end of file diff --git a/module-1/seminars/seminar21/interprocess/p1.cpp b/module-1/seminars/seminar21/interprocess/p1.cpp new file mode 100644 index 00000000..cc5abbf7 --- /dev/null +++ b/module-1/seminars/seminar21/interprocess/p1.cpp @@ -0,0 +1,21 @@ +#include +#include +#include +#include +#include + +int main() { + // Ptr -> String + int* x = new int(100); + + // connector + std::filesystem::path path_to_connector("connector.txt"); + std::fstream connector(path_to_connector, std::ios::out); + connector << x; + connector.close(); + std::cout << "addr:" << (x) << std::endl; + std::cout << "*addr:" << (*x) << std::endl; + + while (true) {}; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar21/interprocess/p2.cpp b/module-1/seminars/seminar21/interprocess/p2.cpp new file mode 100644 index 00000000..3ebaa703 --- /dev/null +++ b/module-1/seminars/seminar21/interprocess/p2.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include + +int main() { + + std::string name; + + // connector + std::filesystem::path path_to_connector("connector.txt"); + std::fstream connector(path_to_connector, std::ios::in); + connector >> name; + + std::cout << "name:" << name << std::endl; + // String -> Ptr + std::stringstream ss_in; + ss_in << name; + long long unsigned int i; + ss_in >> std::hex >> i; + int* i_ptr = reinterpret_cast(i); + + std::cout << "*i_ptr:" << (*i_ptr) << std::endl; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar21/type_traits/22_0_offset_ptr.cpp b/module-1/seminars/seminar21/type_traits/22_0_offset_ptr.cpp new file mode 100644 index 00000000..c6b72d1e --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/22_0_offset_ptr.cpp @@ -0,0 +1,33 @@ +#include + +// Topic: Conditional explicit constructor +// Boost offset_ptr minimal sample +template +class offset_ptr { +public: + explicit offset_ptr(T* p) { + m_ptr = reinterpret_cast(p) - reinterpret_cast(this); + } + + T* ptr() const noexcept { + return reinterpret_cast(reinterpret_cast(this) + m_ptr); + } + + // Attempt 1 + + // U* is convertible to T* implicitly + template + offset_ptr(const offset_ptr& rhs) : offset_ptr(rhs.ptr()) {} + + // U* is convertible to T* with a static_cast + template + explicit offset_ptr(const offset_ptr& rhs) : offset_ptr(static_cast(rhs.ptr())) {} + + // Result: CE offset_ptr is redeclared. Reason: signatures are the same +private: + uintptr_t m_ptr; +}; + +int main() { + return 0; +} diff --git a/module-1/seminars/seminar21/type_traits/22_1_offset_ptr.cpp b/module-1/seminars/seminar21/type_traits/22_1_offset_ptr.cpp new file mode 100644 index 00000000..f2b330af --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/22_1_offset_ptr.cpp @@ -0,0 +1,47 @@ +#include +#include + +template +struct ISC_IMPL : std::false_type {}; + +template +struct ISC_IMPL(std::declval())))> : std::true_type {}; + +template +struct is_static_castable : ISC_IMPL {}; + +template +constexpr bool is_static_castable_v = is_static_castable::value; + +// Topic: Conditional explicit constructor +// Boost offset_ptr minimal sample + +template +class offset_ptr { +public: + explicit offset_ptr(T* p) { + m_ptr = reinterpret_cast(p) - reinterpret_cast(this); + } + + T* ptr() const noexcept { + return reinterpret_cast(reinterpret_cast(this) + m_ptr); + } + + // Attempt 2 + + // U* is convertible to T* implicitly + template >> + offset_ptr(const offset_ptr& rhs) : offset_ptr(rhs.ptr()) {} + + // U* is convertible to T* with a static_cast + template && !std::is_convertible_v >> + explicit offset_ptr(const offset_ptr& rhs) : offset_ptr(static_cast(rhs.ptr())) {} + + // Result: CE same error Reason: signatures are still the same +private: + uintptr_t m_ptr; +}; + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar21/type_traits/22_2_offset_ptr.cpp b/module-1/seminars/seminar21/type_traits/22_2_offset_ptr.cpp new file mode 100644 index 00000000..84403cdb --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/22_2_offset_ptr.cpp @@ -0,0 +1,53 @@ + + +#include +#include + +template +struct ISC_IMPL : std::false_type {}; + +template +struct ISC_IMPL(std::declval())))> : std::true_type {}; + +template +struct is_static_castable : ISC_IMPL {}; + +template +constexpr bool is_static_castable_v = is_static_castable::value; + +// Topic: Conditional explicit constructor +// Boost offset_ptr minimal sample + +template +class offset_ptr { +public: + explicit offset_ptr(T* p) { + m_ptr = reinterpret_cast(p) - reinterpret_cast(this); + } + + T* ptr() const noexcept { + return reinterpret_cast(reinterpret_cast(this) + m_ptr); + } + + // Attempt 3: add dummpy parameter + + // U* is convertible to T* implicitly + // 1. check the signature + // 2. define the type + template >> + offset_ptr(const offset_ptr& rhs, int=0) : offset_ptr(rhs.ptr()) {} + + // U* is convertible to T* with a static_cast + // 1. check the signature + // 2. define the type + template && !std::is_convertible_v >> + explicit offset_ptr(const offset_ptr& rhs, double=0) : offset_ptr(static_cast(rhs.ptr())) {} + + // Cons: we need to introduce new tag type for overloading resolution +private: + uintptr_t m_ptr; +}; + +int main() { + return 0; +} diff --git a/module-1/seminars/seminar21/type_traits/22_3_offset_ptr.cpp b/module-1/seminars/seminar21/type_traits/22_3_offset_ptr.cpp new file mode 100644 index 00000000..ae979ba8 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/22_3_offset_ptr.cpp @@ -0,0 +1,53 @@ +#include +#include + +template +struct ISC_IMPL : std::false_type {}; + +template +struct ISC_IMPL(std::declval())))> : std::true_type {}; + +template +struct is_static_castable : ISC_IMPL {}; + +template +constexpr bool is_static_castable_v = is_static_castable::value; + +template +using bool_if_t = std::enable_if_t; + +// Topic: Conditional explicit constructor +// Boost offset_ptr minimal sample + +template +class offset_ptr { +public: + explicit offset_ptr(T* p) { + m_ptr = reinterpret_cast(p) - reinterpret_cast(this); + } + + T* ptr() const noexcept { + return reinterpret_cast(reinterpret_cast(this) + m_ptr); + } + + // Attempt 4: bool_if_t + + // U* is convertible to T* implicitly + // 1. define the type + // 2. check the signature + template > = true> + offset_ptr(const offset_ptr& rhs) : offset_ptr(rhs.ptr()) {} + + // U* is convertible to T* with a static_cast + // 1. define the type + // 2. check the signature + template && !std::is_convertible_v> = true> + explicit offset_ptr(const offset_ptr& rhs) : offset_ptr(static_cast(rhs.ptr())) {} + +private: + uintptr_t m_ptr; +}; + +int main() { + return 0; +} diff --git a/module-1/seminars/seminar21/type_traits/23_1_pointer_traits.cpp b/module-1/seminars/seminar21/type_traits/23_1_pointer_traits.cpp new file mode 100644 index 00000000..e6ac241c --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/23_1_pointer_traits.cpp @@ -0,0 +1,28 @@ +#include + +template +struct PointerTraits; + +template +struct PointerTraits { + using pointer = T*; + using element_type = T; + using difference_type = std::ptrdiff_t; + + template + using rebind = U*; + + // Attempt 1: + // Cons: T=void -> void& -> CE + static auto PointerTo(T& r) { + return &r; + } +}; + +int main() { + int32_t x = 1; + + int32_t* ptr_x = PointerTraits::PointerTo(x); + void* ptr_void = PointerTraits::PointerTo(x); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar21/type_traits/23_2_pointer_traits.cpp b/module-1/seminars/seminar21/type_traits/23_2_pointer_traits.cpp new file mode 100644 index 00000000..fdcf6dfd --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/23_2_pointer_traits.cpp @@ -0,0 +1,33 @@ +#include +#include + +template +struct PointerTraits; + +template +struct PointerTraits { + using pointer = T*; + using element_type = T; + using difference_type = std::ptrdiff_t; + + template + using rebind = U*; + + // Attempt 2: use std::is_void_v + std::enable_if_t + // Result: CE again + // Reson: function signature is argly evaluated (T& evaluates early than std::is_void_v + std::enable_if_t) + template , typename = std::enable_if_t> + static auto PointerTo(T& r) { + return &r; + } + + +}; + +int main() { + int32_t x = 1; + + int32_t* ptr_x = PointerTraits::PointerTo(x); + void* ptr_void = PointerTraits::PointerTo(x); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar21/type_traits/23_3_pointer_traits.cpp b/module-1/seminars/seminar21/type_traits/23_3_pointer_traits.cpp new file mode 100644 index 00000000..4c21bcce --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/23_3_pointer_traits.cpp @@ -0,0 +1,32 @@ +#include +#include + +template +struct PointerTraits; + +template +struct PointerTraits { + using pointer = T*; + using element_type = T; + using difference_type = std::ptrdiff_t; + + template + using rebind = U*; + + // Attempt 3: we will try to handle T before usage inside parameter list + // put T to enable_if_t -> use result type (TR) in the signature + // Result: CE again + // Reson: we have T& at enable_if_t (T=void -> void& -> CE) + template , typename TR = std::enable_if_t> + static auto PointerTo(TR r) { + return &r; + } +}; + +int main() { + int32_t x = 1; + + int32_t* ptr_x = PointerTraits::PointerTo(x); + void* ptr_void = PointerTraits::PointerTo(x); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar21/type_traits/23_4_pointer_traits.cpp b/module-1/seminars/seminar21/type_traits/23_4_pointer_traits.cpp new file mode 100644 index 00000000..623bb78d --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/23_4_pointer_traits.cpp @@ -0,0 +1,35 @@ +#include +#include +#include + +template +struct PointerTraits; + +template +struct PointerTraits { + using pointer = T*; + using element_type = T; + using difference_type = std::ptrdiff_t; + + template + using rebind = U*; + + // Attempt 4: add & after enable_if_t evaluation + // Pros: it compiles + // Cons: it leads to segfault + template , typename TR = std::enable_if_t&> + static auto PointerTo(TR r) { + return &r; + } +}; + +int main() { + int32_t x = 1; + + int32_t* ptr_x = PointerTraits::PointerTo(x); + void* ptr_void = PointerTraits::PointerTo(x); + + // UB: Segfault (GCC: 9.2.0): + std::cout << *ptr_x; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar21/type_traits/23_5_pointer_traits.cpp b/module-1/seminars/seminar21/type_traits/23_5_pointer_traits.cpp new file mode 100644 index 00000000..d758ba19 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/23_5_pointer_traits.cpp @@ -0,0 +1,29 @@ +#include +#include + +template +struct PointerTraits; + +template +struct PointerTraits { + using pointer = T*; + using element_type = T; + using difference_type = std::ptrdiff_t; + + template + using rebind = U*; + + // Attempt 5: add constraint to template parameter (std::enable_if_t) + template > + static auto PointerTo(std::enable_if_t& r) { + return &r; + } +}; + +int main() { + int32_t x = 1; + + int32_t* ptr_x = PointerTraits::PointerTo(x); + void* ptr_void = PointerTraits::PointerTo(x); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar21/type_traits/CMakeLists.txt b/module-1/seminars/seminar21/type_traits/CMakeLists.txt new file mode 100644 index 00000000..2b488911 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner 0_spec) \ No newline at end of file diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeCache.txt b/module-1/seminars/seminar21/type_traits/build/CMakeCache.txt new file mode 100644 index 00000000..5be9141a --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeCache.txt @@ -0,0 +1,366 @@ +# This is the CMakeCache file. +# For build in directory: /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Choose the type of build, options are: None Debug Release RelWithDebInfo +// MinSizeRel ... +CMAKE_BUILD_TYPE:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9 + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9 + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=runner + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Path to a program. +CMAKE_READELF:FILEPATH=/usr/bin/readelf + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Value Computed by CMake +runner_BINARY_DIR:STATIC=/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build + +//Value Computed by CMake +runner_SOURCE_DIR:STATIC=/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=16 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=3 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.16 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeCCompiler.cmake b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeCCompiler.cmake new file mode 100644 index 00000000..2692f733 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeCCompiler.cmake @@ -0,0 +1,76 @@ +set(CMAKE_C_COMPILER "/usr/bin/cc") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "9.3.0") +set(CMAKE_C_COMPILER_VERSION_INTERNAL "") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") +set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") +set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") + +set(CMAKE_C_PLATFORM_ID "Linux") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_C_SIMULATE_VERSION "") + + + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-9") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "ELF") +set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include") +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake new file mode 100644 index 00000000..504c2505 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake @@ -0,0 +1,88 @@ +set(CMAKE_CXX_COMPILER "/usr/bin/c++") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "9.3.0") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") +set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20") + +set(CMAKE_CXX_PLATFORM_ID "Linux") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_CXX_SIMULATE_VERSION "") + + + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-9") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCXX 1) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_CXX_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) + +foreach (lang C OBJC OBJCXX) + if (CMAKE_${lang}_COMPILER_ID_RUN) + foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) + list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) + endforeach() + endif() +endforeach() + +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "8") +set(CMAKE_CXX_COMPILER_ABI "ELF") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/9;/usr/include/x86_64-linux-gnu/c++/9;/usr/include/c++/9/backward;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include") +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_C.bin b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CMakeDetermineCompilerABI_C.bin new file mode 100644 index 0000000000000000000000000000000000000000..a3225b1f9d09c95af35231b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q}vp-A7X3% zxqK5cXp8;x`YS~G?1$y)a=0k`Kp;orHJ>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +#if !defined(__STDC__) +# if (defined(_MSC_VER) && !defined(__clang__)) \ + || (defined(__ibmxl__) || defined(__IBMC__)) +# define C_DIALECT "90" +# else +# define C_DIALECT +# endif +#elif __STDC_VERSION__ >= 201000L +# define C_DIALECT "11" +#elif __STDC_VERSION__ >= 199901L +# define C_DIALECT "99" +#else +# define C_DIALECT "90" +#endif +const char* info_language_dialect_default = + "INFO" ":" "dialect_default[" C_DIALECT "]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdC/a.out b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdC/a.out new file mode 100644 index 0000000000000000000000000000000000000000..46f1233d9a6b2e660d5d0c5fc3dbde0dfb7e863d GIT binary patch literal 16712 zcmeHOe{3699e<9KHr*QA?NXYx+j4ZBl#a!9`Xfubh1yA+UQp7GHep3sc3fg7v2g5Q zpII`|QD_;M5-6e);}4{1NPwXHQG_-P2}mg$Fb!B4Dn)=+0fT@_myH%>(A9ju?|r|{ z-Nl&@;}3-HNxtuUpYPB6zIW$)ckg{T-rHT}^9e3~@lJuQXh^ zcGEb;$&~qJe;O)7(d4mAFQ5Pvrgl9HWxiRm#eBPyM#-N}l=ZMFPa&-2p*vI|I!peT zay~I9_-mtlx~ZnDl*4!H9U?t9?IJy<=mX2am#xHq;_p7vJEci8!cFg0uwcsm-VJ)x zwIuQ8guD3w`CG0ZLX>}|lwPqlof>Z4u{E7&PNy=3sphG+*5=k7;e0l{O*+Q7&M8Q{bJpo+_%2Jy@73@Pn5xe`aC4Cjdk>a zGV1(40yP@TK+h$AIw65&4sC#I6?hu}TU!C|2TZGgk1T`V2>7N7@&fWVg6V1%hA}c_ z8l$OJEYNk!_(d{M z8&!P9xgB!hnx^C$TzHOf&4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w-K4UjZERFiZOml4R%^pdlDeWsYEJc6!OW0NM%N|2EWc{Cm0u|N^$w~0dR-&d2%6l{z&DtnHejX zV~}v?JAV*|?LVAG+!s`FvyXFok@KXaeflV&V!>|=LWJ|v6P7s))XFJ3&b3qqwjE81 za3*Ud!(*93crurrOy;a<8#G)QZ;s94DmQ=$L8hDS%24O~F~dDBeSV%~s<9wZxBmTr{~ez7IewnsFlGPv?Fx%K zeiJa9+ps>*f0&*?B`A1~m}l1Kc}of~JZ0AB=UApZe*zI%(1yKy02(-#VSRqyWyxJ<&rCH6nEkuY|MQ@WBFu-s7FCGyJeANT z{r^Q^*!4BiW6I`OpW95IaOv}NJ5!chPG3F8Eyf=u1*TVB9p<)o+U1|;0Ze%w&;H%x z_bJln{0ogFiJqb+6N0%Zz6Ui7k@ZiJ0MmQRlB(kN{}X`i`aJ(&I`7iw{%81?P{C(; zo(A&sD)0Ms%X6FQ??E?c)92^-g=PSuu$*cwwi$l~7&!LWfB88Y)^B5(rT)Y5kA?NP zAHNJ3im*PvznG;5yD0GNh4q;(0Mo87q9h$rln8-~{u#Iq6|}|v`S~tFitLBw>2$a$ z`~V>4_QU#jmL*k%_3f0$j$QP9WKgFI8?WQL;K%Xs{cjau9J^irtN6zNrO#!Y{VFa# Ri&oaZ+NLB{yA)ha@h^*jkRt#9 literal 0 HcmV?d00001 diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 00000000..69cfdba6 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,660 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) || defined(__GNUG__) +# define COMPILER_ID "GNU" +# if defined(__GNUC__) +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# else +# define COMPILER_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG +#else +# define CXX_STD __cplusplus +#endif + +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if CXX_STD > 201703L + "20" +#elif CXX_STD >= 201703L + "17" +#elif CXX_STD >= 201402L + "14" +#elif CXX_STD >= 201103L + "11" +#else + "98" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdCXX/a.out b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/3.16.3/CompilerIdCXX/a.out new file mode 100644 index 0000000000000000000000000000000000000000..c8684265455284359fc556a1ef0b98aa7a612508 GIT binary patch literal 16720 zcmeHOZ)_Y#6`%9jiIXPhOX@TxY3glABq!9Dvy-?^T9Z55=j@?N(k6E6;=0S)ceYR5 zA9J@y?243t)1p%_L~11Z0i>u%2#KHqABu`pa1@#XBD6tO2?_`ci0Yz{x`iSGX^!`1 z-#hQFFBPJE0qsb)znS0rGqZ1I_jYz?J{yVkRCzptlUICHU@7D`nGgy5dnp4D676C& z95;zO#WE;YOU{&sOaQ5wE?3#HmUu59+BION0^VuTP=lGcg@|Z(tJH)Ig2X83JkYKN z1ypw8ZfYkZ%ggmCXbee_$1+|<1xSomJ8a5)vlNT@4m*aZK9!K|uqaOSN@1VodPYPVsc2VtOez-)YxRc24XjJ4UPn(~+x2{6DGh0kS)*NH@ZX_nWj}!b_6cw^gB*oX_C-CFQNDK5&@0*_-+pby#g_)Q-&6m~sTc0cun(*gbughl4+$(| z9_v6I^ZY*tIU37=mlD57OX3!XcHor?vJJqkt-$vJr&QpFZ^7RN{N@V!0^&D};c63_ zHawwgBgu@ON4_GH)buy$8Bd z*-WBWA4;L+XgZrAOU+cRs3_ZGMv-Ibfe2y@d0Z4WBv)W`@1eHy^~u+Tvc?oF&~?lF zEIFtRnR4d2?04{rV(K+G_#E+ygZ~2YO%DEP;xF$LGT~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R@wK~2(E^qHzar(gFKPcQ@E*L&I{NWV(&zsHS%kw4nOQon>Y$;X3jO{v@Ks{z zb+HxrwHP=0-{Jp>-M}kcnFS{$zjXXO2)tjcFZUOl>;Qgk)za&wA9+@?;8F799G@qE zS1fv*eH!>RRqF-cSD8P9JhX_7=x;(iC;9clxliCl;4u#0q5TL6a&!gI596>s#GXw& zM*1Nd&pSwbk^K8fpZ^E10FQox#FM&sgZylxdgVJz5MCoc&ix51VbcMguhY*Rz$@(3 zff;f!0Td3j|Ap52x`$6EIvR+8j8b4cWe7Y3MzfGH5)*L5u?m`5*?ED)7>&-c zIM{Q^v^R&TX~B7LuBVg3&>Zah0K{DcpdZpO?D+!xfQa(}xJAG{-Aw#^$H?;m5=&jq zBYqfu_^izK{2a)rfXtf8_Xi@|0Il}@^jyfe#cB+BzW*{Eb=dQBC8NTMgiia1f&Uvk z^K<)op2NuX<2Ni!&i3oT;T(tUc^<@g3XLG)IbxjIp64$~;P8~$o}XtKc^(BSGNBJ^ z`VvxXd?~^^pUnrzWc$SI`L~~L62y)m&wm(Y>jQ5u{&5X1Di$GiLc^<+z z@380oXZlx=!Do7&4)XIU@Bek`bD8lEU|VOg=jZu_W*{N4o>^KfGyfI{aO`pY<>zKt z-;HU8`VYrHCbr{#{04BS!uI?gV}>5&LLjpywr5-bq19f5NIPgE0g;RKGjS6#=!@&; z=eZymay_h1r^7|z1p+x|J#4?dtZ8Q0-ikbStg4?NhbmpzcpYPxaC`Xvw*okByVd@i d_{RY0A%}CW*OcP3XJz}F?WV>mhk>Ig{sl?qig^G4 literal 0 HcmV?d00001 diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/CMakeDirectoryInformation.cmake b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 00000000..207091f4 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/CMakeOutput.log b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/CMakeOutput.log new file mode 100644 index 00000000..4a92aec6 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/CMakeOutput.log @@ -0,0 +1,461 @@ +The system is: Linux - 5.4.72-microsoft-standard-WSL2 - x86_64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /usr/bin/cc +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" + +The C compiler identification is GNU, found in "/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/3.16.3/CompilerIdC/a.out" + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: /usr/bin/c++ +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" + +The CXX compiler identification is GNU, found in "/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/3.16.3/CompilerIdCXX/a.out" + +Determining if the C compiler works passed with the following output: +Change Dir: /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make cmTC_18298/fast && /usr/bin/make -f CMakeFiles/cmTC_18298.dir/build.make CMakeFiles/cmTC_18298.dir/build +make[1]: Entering directory '/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_18298.dir/testCCompiler.c.o +/usr/bin/cc -o CMakeFiles/cmTC_18298.dir/testCCompiler.c.o -c /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp/testCCompiler.c +Linking C executable cmTC_18298 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_18298.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_18298.dir/testCCompiler.c.o -o cmTC_18298 +make[1]: Leaving directory '/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp' + + + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make cmTC_dc3f3/fast && /usr/bin/make -f CMakeFiles/cmTC_dc3f3.dir/build.make CMakeFiles/cmTC_dc3f3.dir/build +make[1]: Entering directory '/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o +/usr/bin/cc -v -o CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c +Using built-in specs. +COLLECT_GCC=/usr/bin/cc +OFFLOAD_TARGET_NAMES=nvptx-none:hsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -quiet -v -imultiarch x86_64-linux-gnu /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/cc9HR3j4.s +GNU C17 (Ubuntu 9.3.0-17ubuntu1~20.04) version 9.3.0 (x86_64-linux-gnu) + compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/lib/gcc/x86_64-linux-gnu/9/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +GNU C17 (Ubuntu 9.3.0-17ubuntu1~20.04) version 9.3.0 (x86_64-linux-gnu) + compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: bbf13931d8de1abe14040c9909cb6969 +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' + as -v --64 -o CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o /tmp/cc9HR3j4.s +GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34 +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64' +Linking C executable cmTC_dc3f3 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_dc3f3.dir/link.txt --verbose=1 +/usr/bin/cc -v CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o -o cmTC_dc3f3 +Using built-in specs. +COLLECT_GCC=/usr/bin/cc +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper +OFFLOAD_TARGET_NAMES=nvptx-none:hsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_dc3f3' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccw8YqKv.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_dc3f3 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_dc3f3' '-mtune=generic' '-march=x86-64' +make[1]: Leaving directory '/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp' + + + +Parsed C implicit include dir info from above output: rv=done + found start of include info + found start of implicit include info + add: [/usr/lib/gcc/x86_64-linux-gnu/9/include] + add: [/usr/local/include] + add: [/usr/include/x86_64-linux-gnu] + add: [/usr/include] + end of search list found + collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include] + collapse include dir [/usr/local/include] ==> [/usr/local/include] + collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu] + collapse include dir [/usr/include] ==> [/usr/include] + implicit include dirs: [/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include] + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command(s):/usr/bin/make cmTC_dc3f3/fast && /usr/bin/make -f CMakeFiles/cmTC_dc3f3.dir/build.make CMakeFiles/cmTC_dc3f3.dir/build] + ignore line: [make[1]: Entering directory '/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp'] + ignore line: [Building C object CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o] + ignore line: [/usr/bin/cc -v -o CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/cc] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) ] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -quiet -v -imultiarch x86_64-linux-gnu /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/cc9HR3j4.s] + ignore line: [GNU C17 (Ubuntu 9.3.0-17ubuntu1~20.04) version 9.3.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 9.3.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include] + ignore line: [ /usr/local/include] + ignore line: [ /usr/include/x86_64-linux-gnu] + ignore line: [ /usr/include] + ignore line: [End of search list.] + ignore line: [GNU C17 (Ubuntu 9.3.0-17ubuntu1~20.04) version 9.3.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 9.3.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: bbf13931d8de1abe14040c9909cb6969] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'] + ignore line: [ as -v --64 -o CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o /tmp/cc9HR3j4.s] + ignore line: [GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'] + ignore line: [Linking C executable cmTC_dc3f3] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_dc3f3.dir/link.txt --verbose=1] + ignore line: [/usr/bin/cc -v CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o -o cmTC_dc3f3 ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/cc] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_dc3f3' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccw8YqKv.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_dc3f3 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccw8YqKv.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-pie] ==> ignore + arg [-znow] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_dc3f3] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> ignore + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] + arg [CMakeFiles/cmTC_dc3f3.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [-lgcc] ==> lib [gcc] + arg [--push-state] ==> ignore + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--pop-state] ==> ignore + arg [-lc] ==> lib [c] + arg [-lgcc] ==> lib [gcc] + arg [--push-state] ==> ignore + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--pop-state] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> ignore + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib] + implicit libs: [gcc;gcc_s;c;gcc;gcc_s] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + +Determining if the CXX compiler works passed with the following output: +Change Dir: /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make cmTC_59337/fast && /usr/bin/make -f CMakeFiles/cmTC_59337.dir/build.make CMakeFiles/cmTC_59337.dir/build +make[1]: Entering directory '/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_59337.dir/testCXXCompiler.cxx.o +/usr/bin/c++ -std=gnu++17 -o CMakeFiles/cmTC_59337.dir/testCXXCompiler.cxx.o -c /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +Linking CXX executable cmTC_59337 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_59337.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_59337.dir/testCXXCompiler.cxx.o -o cmTC_59337 +make[1]: Leaving directory '/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp' + + + +Detecting CXX compiler ABI info compiled with the following output: +Change Dir: /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make cmTC_9cdd0/fast && /usr/bin/make -f CMakeFiles/cmTC_9cdd0.dir/build.make CMakeFiles/cmTC_9cdd0.dir/build +make[1]: Entering directory '/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o +/usr/bin/c++ -v -std=gnu++17 -o CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp +Using built-in specs. +COLLECT_GCC=/usr/bin/c++ +OFFLOAD_TARGET_NAMES=nvptx-none:hsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) +COLLECT_GCC_OPTIONS='-v' '-std=gnu++17' '-o' 'CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/9/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o -std=gnu++17 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccuWQZ3Y.s +GNU C++17 (Ubuntu 9.3.0-17ubuntu1~20.04) version 9.3.0 (x86_64-linux-gnu) + compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/9" +ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed" +ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/include/c++/9 + /usr/include/x86_64-linux-gnu/c++/9 + /usr/include/c++/9/backward + /usr/lib/gcc/x86_64-linux-gnu/9/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +GNU C++17 (Ubuntu 9.3.0-17ubuntu1~20.04) version 9.3.0 (x86_64-linux-gnu) + compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: 466f818abe2f30ba03783f22bd12d815 +COLLECT_GCC_OPTIONS='-v' '-std=gnu++17' '-o' 'CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + as -v --64 -o CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccuWQZ3Y.s +GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34 +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-std=gnu++17' '-o' 'CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' +Linking CXX executable cmTC_9cdd0 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9cdd0.dir/link.txt --verbose=1 +/usr/bin/c++ -v CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_9cdd0 +Using built-in specs. +COLLECT_GCC=/usr/bin/c++ +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper +OFFLOAD_TARGET_NAMES=nvptx-none:hsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_9cdd0' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccbXMtir.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_9cdd0 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_9cdd0' '-shared-libgcc' '-mtune=generic' '-march=x86-64' +make[1]: Leaving directory '/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp' + + + +Parsed CXX implicit include dir info from above output: rv=done + found start of include info + found start of implicit include info + add: [/usr/include/c++/9] + add: [/usr/include/x86_64-linux-gnu/c++/9] + add: [/usr/include/c++/9/backward] + add: [/usr/lib/gcc/x86_64-linux-gnu/9/include] + add: [/usr/local/include] + add: [/usr/include/x86_64-linux-gnu] + add: [/usr/include] + end of search list found + collapse include dir [/usr/include/c++/9] ==> [/usr/include/c++/9] + collapse include dir [/usr/include/x86_64-linux-gnu/c++/9] ==> [/usr/include/x86_64-linux-gnu/c++/9] + collapse include dir [/usr/include/c++/9/backward] ==> [/usr/include/c++/9/backward] + collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include] + collapse include dir [/usr/local/include] ==> [/usr/local/include] + collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu] + collapse include dir [/usr/include] ==> [/usr/include] + implicit include dirs: [/usr/include/c++/9;/usr/include/x86_64-linux-gnu/c++/9;/usr/include/c++/9/backward;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include] + + +Parsed CXX implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command(s):/usr/bin/make cmTC_9cdd0/fast && /usr/bin/make -f CMakeFiles/cmTC_9cdd0.dir/build.make CMakeFiles/cmTC_9cdd0.dir/build] + ignore line: [make[1]: Entering directory '/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/CMakeTmp'] + ignore line: [Building CXX object CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o] + ignore line: [/usr/bin/c++ -v -std=gnu++17 -o CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/c++] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) ] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-std=gnu++17' '-o' 'CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o -std=gnu++17 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccuWQZ3Y.s] + ignore line: [GNU C++17 (Ubuntu 9.3.0-17ubuntu1~20.04) version 9.3.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 9.3.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/9"] + ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /usr/include/c++/9] + ignore line: [ /usr/include/x86_64-linux-gnu/c++/9] + ignore line: [ /usr/include/c++/9/backward] + ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include] + ignore line: [ /usr/local/include] + ignore line: [ /usr/include/x86_64-linux-gnu] + ignore line: [ /usr/include] + ignore line: [End of search list.] + ignore line: [GNU C++17 (Ubuntu 9.3.0-17ubuntu1~20.04) version 9.3.0 (x86_64-linux-gnu)] + ignore line: [ compiled by GNU C version 9.3.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: 466f818abe2f30ba03783f22bd12d815] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-std=gnu++17' '-o' 'CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + ignore line: [ as -v --64 -o CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccuWQZ3Y.s] + ignore line: [GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-std=gnu++17' '-o' 'CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + ignore line: [Linking CXX executable cmTC_9cdd0] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9cdd0.dir/link.txt --verbose=1] + ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_9cdd0 ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/c++] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] + ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa] + ignore line: [OFFLOAD_TARGET_DEFAULT=1] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_9cdd0' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccbXMtir.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_9cdd0 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccbXMtir.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-pie] ==> ignore + arg [-znow] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_9cdd0] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> ignore + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] + arg [CMakeFiles/cmTC_9cdd0.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore + arg [-lstdc++] ==> lib [stdc++] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lc] ==> lib [c] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> ignore + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib] + implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/Makefile.cmake b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/Makefile.cmake new file mode 100644 index 00000000..1cde416c --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/Makefile.cmake @@ -0,0 +1,120 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "../CMakeLists.txt" + "CMakeFiles/3.16.3/CMakeCCompiler.cmake" + "CMakeFiles/3.16.3/CMakeCXXCompiler.cmake" + "CMakeFiles/3.16.3/CMakeSystem.cmake" + "/usr/share/cmake-3.16/Modules/CMakeCCompiler.cmake.in" + "/usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c" + "/usr/share/cmake-3.16/Modules/CMakeCInformation.cmake" + "/usr/share/cmake-3.16/Modules/CMakeCXXCompiler.cmake.in" + "/usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp" + "/usr/share/cmake-3.16/Modules/CMakeCXXInformation.cmake" + "/usr/share/cmake-3.16/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake" + "/usr/share/cmake-3.16/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake-3.16/Modules/CMakeCompilerIdDetection.cmake" + "/usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake" + "/usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake" + "/usr/share/cmake-3.16/Modules/CMakeDetermineCompileFeatures.cmake" + "/usr/share/cmake-3.16/Modules/CMakeDetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerABI.cmake" + "/usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake" + "/usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake" + "/usr/share/cmake-3.16/Modules/CMakeFindBinUtils.cmake" + "/usr/share/cmake-3.16/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake-3.16/Modules/CMakeInitializeConfigs.cmake" + "/usr/share/cmake-3.16/Modules/CMakeLanguageInformation.cmake" + "/usr/share/cmake-3.16/Modules/CMakeParseImplicitIncludeInfo.cmake" + "/usr/share/cmake-3.16/Modules/CMakeParseImplicitLinkInfo.cmake" + "/usr/share/cmake-3.16/Modules/CMakeSystem.cmake.in" + "/usr/share/cmake-3.16/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake-3.16/Modules/CMakeSystemSpecificInitialize.cmake" + "/usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake" + "/usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake" + "/usr/share/cmake-3.16/Modules/CMakeTestCompilerCommon.cmake" + "/usr/share/cmake-3.16/Modules/CMakeUnixFindMake.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/ADSP-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/ARMClang-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Borland-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Bruce-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Clang-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Cray-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/GHS-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/GNU-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/GNU-C.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/GNU-CXX.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/GNU-FindBinUtils.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/GNU.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/HP-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/IAR-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Intel-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/MSVC-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/NVIDIA-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/PGI-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/PathScale-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/SCO-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/TI-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/Watcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/XL-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/XLClang-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/zOS-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.16/Modules/Internal/CMakeCheckCompilerFlag.cmake" + "/usr/share/cmake-3.16/Modules/Internal/FeatureTesting.cmake" + "/usr/share/cmake-3.16/Modules/Platform/Linux-Determine-CXX.cmake" + "/usr/share/cmake-3.16/Modules/Platform/Linux-GNU-C.cmake" + "/usr/share/cmake-3.16/Modules/Platform/Linux-GNU-CXX.cmake" + "/usr/share/cmake-3.16/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake-3.16/Modules/Platform/Linux.cmake" + "/usr/share/cmake-3.16/Modules/Platform/UnixPaths.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/3.16.3/CMakeSystem.cmake" + "CMakeFiles/3.16.3/CMakeCCompiler.cmake" + "CMakeFiles/3.16.3/CMakeCXXCompiler.cmake" + "CMakeFiles/3.16.3/CMakeCCompiler.cmake" + "CMakeFiles/3.16.3/CMakeCXXCompiler.cmake" + "CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + "CMakeFiles/runner.dir/DependInfo.cmake" + ) diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/Makefile2 b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/Makefile2 new file mode 100644 index 00000000..afc4cf16 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/Makefile2 @@ -0,0 +1,106 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build + +#============================================================================= +# Directory level rules for the build root directory + +# The main recursive "all" target. +all: CMakeFiles/runner.dir/all + +.PHONY : all + +# The main recursive "preinstall" target. +preinstall: + +.PHONY : preinstall + +# The main recursive "clean" target. +clean: CMakeFiles/runner.dir/clean + +.PHONY : clean + +#============================================================================= +# Target rules for target CMakeFiles/runner.dir + +# All Build rule for target. +CMakeFiles/runner.dir/all: + $(MAKE) -f CMakeFiles/runner.dir/build.make CMakeFiles/runner.dir/depend + $(MAKE) -f CMakeFiles/runner.dir/build.make CMakeFiles/runner.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles --progress-num=1,2 "Built target runner" +.PHONY : CMakeFiles/runner.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/runner.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles 2 + $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/runner.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles 0 +.PHONY : CMakeFiles/runner.dir/rule + +# Convenience name for target. +runner: CMakeFiles/runner.dir/rule + +.PHONY : runner + +# clean rule for target. +CMakeFiles/runner.dir/clean: + $(MAKE) -f CMakeFiles/runner.dir/build.make CMakeFiles/runner.dir/clean +.PHONY : CMakeFiles/runner.dir/clean + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/TargetDirectories.txt b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/TargetDirectories.txt new file mode 100644 index 00000000..3c15cfd3 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,3 @@ +/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/rebuild_cache.dir +/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/edit_cache.dir +/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/runner.dir diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/cmake.check_cache b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/cmake.check_cache new file mode 100644 index 00000000..3dccd731 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/progress.marks b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/progress.marks new file mode 100644 index 00000000..0cfbf088 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/progress.marks @@ -0,0 +1 @@ +2 diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/0_spec.cpp.o b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/0_spec.cpp.o new file mode 100644 index 0000000000000000000000000000000000000000..40728620d08d6178278bd8ae0132bc06120fc040 GIT binary patch literal 3096 zcmbtW-H#Jh6u)f|kg&_Lenf+jJ{eG$v``U0Q+Ao%HWt`y*@U3vI-QPoLOavU2Pq^g z(M{CGkgV^-SN#)wT8$Wt@x>Q|Pri}xpbthL2-&2b-^{(;%iU=(@g%qBp5OhQbI&<5 zb8oMkjfH$J$E4)gTWrgcC}S6PZ_TU8w959eY4-QN=O3)phIcpMRJ-vemhR!FHvGQ! z`D5wqc5Qek0XGU*c_eGce_|!E9~J8xurA$_Y1Y>Mm>I5a4&(c4tDCv_*hj1PMB1BQk{o=g?XU0Y_k!A$PJ-d(%bY3t_* z$AEl=A9H%=}jJc}Q>zLYEj$rMz*gZ)Jf*e-?4 zHwd-JY996}P$XUU5|C4H><2kOBTp+ytu#++BK@|&{~--YYDuTGYw{inYfBXvH7G+0 z?C}f~`R|#4@7ji6BxF|UgUpu`j_0h4OF$NWeF8q5fd4Q7|8)ZXCvbY%ba?<=2g#nL z2a$!d5)b>1ZP@)j;}@Gz<0R*~CBmkB%GvO>zlr(GSZSEm>yZZ=PB1zB2HZu(7bCQ+l4t{-x8 zaVmAneZFj7VVt)^pLZzvu9HPNos#T<#jVI0P!GmEL#wB0Y|?=NNlqHF<@Yb~gM>j| zq_Lld#9>3gpQR!3697r{_^+q%w)m#N_4rE)UyU!%2tB@~@bO;Ad@fIje?{S|@jn*0 z9{*E?ug3pkLj0QwUyc8>5+A*jdH$mCpHT2S3Lj^$d7iwd;W7?0!mGW=YLSkDRCnYoaJrU3?`6b{wiQ{- zXoVp&5)_{&w}QaB$_(4@^&F2#o*y{|T}nsk8@4YC`vWgF`hnkff{3_@v(w@42UgD! zDg7^1ByaR)rxv9u>?tfNqM6A(fu2_t4yGM(705F$y=U0?CU{2hUm%T``i*r)-$?Lv z_z2;+T_*YKeBH+PjB`TwUlK(9=90G5W%A9ce;}?ZStsg8OQfH~=Lo}AB^s(+5c|KR zf;5-;OO5+j&QdP(i%B~|A8b5t^0d~XZ3Gg z^sgrT(7!!2q`&N6*4}U_ii8dcJw+IX?vH;U`m-m9)sPg)K~YC)ZSOVij4c1(ME]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/0_spec.cpp +iostream +- + diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/DependInfo.cmake b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/DependInfo.cmake new file mode 100644 index 00000000..68a53073 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/DependInfo.cmake @@ -0,0 +1,20 @@ +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + "CXX" + ) +# The set of files for implicit dependencies of each language: +set(CMAKE_DEPENDS_CHECK_CXX + "/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/0_spec.cpp" "/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/runner.dir/0_spec.cpp.o" + ) +set(CMAKE_CXX_COMPILER_ID "GNU") + +# The include file search paths: +set(CMAKE_CXX_TARGET_INCLUDE_PATH + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/build.make b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/build.make new file mode 100644 index 00000000..734aaf5b --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/build.make @@ -0,0 +1,98 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build + +# Include any dependencies generated for this target. +include CMakeFiles/runner.dir/depend.make + +# Include the progress variables for this target. +include CMakeFiles/runner.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/runner.dir/flags.make + +CMakeFiles/runner.dir/0_spec.cpp.o: CMakeFiles/runner.dir/flags.make +CMakeFiles/runner.dir/0_spec.cpp.o: ../0_spec.cpp + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/runner.dir/0_spec.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/runner.dir/0_spec.cpp.o -c /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/0_spec.cpp + +CMakeFiles/runner.dir/0_spec.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/runner.dir/0_spec.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/0_spec.cpp > CMakeFiles/runner.dir/0_spec.cpp.i + +CMakeFiles/runner.dir/0_spec.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/runner.dir/0_spec.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/0_spec.cpp -o CMakeFiles/runner.dir/0_spec.cpp.s + +# Object files for target runner +runner_OBJECTS = \ +"CMakeFiles/runner.dir/0_spec.cpp.o" + +# External object files for target runner +runner_EXTERNAL_OBJECTS = + +runner: CMakeFiles/runner.dir/0_spec.cpp.o +runner: CMakeFiles/runner.dir/build.make +runner: CMakeFiles/runner.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable runner" + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/runner.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/runner.dir/build: runner + +.PHONY : CMakeFiles/runner.dir/build + +CMakeFiles/runner.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/runner.dir/cmake_clean.cmake +.PHONY : CMakeFiles/runner.dir/clean + +CMakeFiles/runner.dir/depend: + cd /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/runner.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/runner.dir/depend + diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/cmake_clean.cmake b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/cmake_clean.cmake new file mode 100644 index 00000000..20ddb78d --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/cmake_clean.cmake @@ -0,0 +1,10 @@ +file(REMOVE_RECURSE + "CMakeFiles/runner.dir/0_spec.cpp.o" + "runner" + "runner.pdb" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/runner.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/depend.internal b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/depend.internal new file mode 100644 index 00000000..f59d63dc --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/depend.internal @@ -0,0 +1,5 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +CMakeFiles/runner.dir/0_spec.cpp.o + /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/0_spec.cpp diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/depend.make b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/depend.make new file mode 100644 index 00000000..cfc3a3f5 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/depend.make @@ -0,0 +1,5 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +CMakeFiles/runner.dir/0_spec.cpp.o: ../0_spec.cpp + diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/flags.make b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/flags.make new file mode 100644 index 00000000..5788ee6a --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# compile CXX with /usr/bin/c++ +CXX_FLAGS = -std=gnu++17 + +CXX_DEFINES = + +CXX_INCLUDES = + diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/link.txt b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/link.txt new file mode 100644 index 00000000..85e3155f --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ CMakeFiles/runner.dir/0_spec.cpp.o -o runner diff --git a/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/progress.make b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/progress.make new file mode 100644 index 00000000..abadeb0c --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/CMakeFiles/runner.dir/progress.make @@ -0,0 +1,3 @@ +CMAKE_PROGRESS_1 = 1 +CMAKE_PROGRESS_2 = 2 + diff --git a/module-1/seminars/seminar21/type_traits/build/Makefile b/module-1/seminars/seminar21/type_traits/build/Makefile new file mode 100644 index 00000000..40ba7173 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/Makefile @@ -0,0 +1,178 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.16 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles/progress.marks + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named runner + +# Build rule for target. +runner: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 runner +.PHONY : runner + +# fast build rule for target. +runner/fast: + $(MAKE) -f CMakeFiles/runner.dir/build.make CMakeFiles/runner.dir/build +.PHONY : runner/fast + +0_spec.o: 0_spec.cpp.o + +.PHONY : 0_spec.o + +# target to build an object file +0_spec.cpp.o: + $(MAKE) -f CMakeFiles/runner.dir/build.make CMakeFiles/runner.dir/0_spec.cpp.o +.PHONY : 0_spec.cpp.o + +0_spec.i: 0_spec.cpp.i + +.PHONY : 0_spec.i + +# target to preprocess a source file +0_spec.cpp.i: + $(MAKE) -f CMakeFiles/runner.dir/build.make CMakeFiles/runner.dir/0_spec.cpp.i +.PHONY : 0_spec.cpp.i + +0_spec.s: 0_spec.cpp.s + +.PHONY : 0_spec.s + +# target to generate assembly for a file +0_spec.cpp.s: + $(MAKE) -f CMakeFiles/runner.dir/build.make CMakeFiles/runner.dir/0_spec.cpp.s +.PHONY : 0_spec.cpp.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... rebuild_cache" + @echo "... edit_cache" + @echo "... runner" + @echo "... 0_spec.o" + @echo "... 0_spec.i" + @echo "... 0_spec.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/module-1/seminars/seminar21/type_traits/build/cmake_install.cmake b/module-1/seminars/seminar21/type_traits/build/cmake_install.cmake new file mode 100644 index 00000000..0e0d2323 --- /dev/null +++ b/module-1/seminars/seminar21/type_traits/build/cmake_install.cmake @@ -0,0 +1,49 @@ +# Install script for directory: /home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/home/morell/projects/HSE-Course-Private/module-1/lectures/lecture19/type_traits/build/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/module-1/seminars/seminar21/type_traits/build/runner b/module-1/seminars/seminar21/type_traits/build/runner new file mode 100644 index 0000000000000000000000000000000000000000..b1979795c6eae7cab60390e16e395ba4f3e8dcdb GIT binary patch literal 17224 zcmeHOeQaCR6~B&?Hqh2dOS7isqvlI$fw)PVrlF8wCvj>|X&agpvO;-vY`5{`*qQwd zDFW6h4ArCAGWN&V=(aM3*u?(m_^U{Kv@0u28VICm1Hnc?>()+ulrT^?+Iqk9-Z`(& zFU|yLe@xrE(et_IcRudD=iPVxZhX(z!o59J9*>gZRbN!Z9jrHzAPaV1#}$yEYFG2{ zxl~=EW`VCZFjF2h38ZFuwW^%fGVTQ>yGE*1pck325-L3;N_I1qdTv0d;&G5&4H+@- zq+#xdP?1~h`Nbe&bUqr`;giIcYcR3#B%w^dHj`pQpV(wyX9VZj_S_n6MHm?cE4F zip!@ha+^1Cdo$gK-5gJ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n^y@9RS8_dR=& z?^nU1sMzi0eP5_w6q!2hZwCG`_GZ$5*}n>1#&*1ov-Z2=9fpP2$iLl%2$pTS>DvOk83QP`cZ>Z_>H-c#&lKO$82?b3hI6M7HqX)h~$A1ewC za!V3p=|9720u_p>*iW*(P(OEA+828n|M%FwlO4)_UFbH($)0SS_74N2Cd5BpHq64* z`DX9D|9c(wezp_Z$L@qU+^feN_OkyHD*7|o?|0bmVgsQ;F=Q(Kgg)u8Kga^11-UT} zdvW`$!(R4%LgoKNqVJ5~ui4&u=kc>9Q>VW0LSJNi>1MUqF&%*1Uc^qY*HNMSFZP3e zQzA6N^Up-j%^%^9p+b8%UUsZ~l;nL&oJC*epHOyzbl6tmpB Date: Fri, 26 Mar 2021 16:01:56 +0300 Subject: [PATCH 20/41] seminars: 22 added --- module-1/seminars/seminar22/.gitignore | 1 + .../seminar22/0_consexpr_function.cpp | 119 ++++++++++++++++++ .../seminar22/0_constant_expressions.cpp | 36 ++++++ .../seminar22/0_constexpr_variable.cpp | 22 ++++ module-1/seminars/seminar22/1_struct.cpp | 12 ++ module-1/seminars/seminar22/2_core_f4.cpp | 26 ++++ module-1/seminars/seminar22/CMakeLists.txt | 18 +++ 7 files changed, 234 insertions(+) create mode 100644 module-1/seminars/seminar22/.gitignore create mode 100644 module-1/seminars/seminar22/0_consexpr_function.cpp create mode 100644 module-1/seminars/seminar22/0_constant_expressions.cpp create mode 100644 module-1/seminars/seminar22/0_constexpr_variable.cpp create mode 100644 module-1/seminars/seminar22/1_struct.cpp create mode 100644 module-1/seminars/seminar22/2_core_f4.cpp create mode 100644 module-1/seminars/seminar22/CMakeLists.txt diff --git a/module-1/seminars/seminar22/.gitignore b/module-1/seminars/seminar22/.gitignore new file mode 100644 index 00000000..c795b054 --- /dev/null +++ b/module-1/seminars/seminar22/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/module-1/seminars/seminar22/0_consexpr_function.cpp b/module-1/seminars/seminar22/0_consexpr_function.cpp new file mode 100644 index 00000000..1f93dfe4 --- /dev/null +++ b/module-1/seminars/seminar22/0_consexpr_function.cpp @@ -0,0 +1,119 @@ +#include +#include + +// 0. parameter type and return type must be a literal type + +// CE: +constexpr std::string Foo() {return "Foo";}; + +// CE: +constexpr void Foo(std::string s) {}; + +// OK: +constexpr const char* Foo() {return "Foo";}; + +// CE: +constexpr void Foo(const char* s) {}; + +// The standard claims 1. it must not be virtual BEFORE: C++20 +// Actual: GCC 9.2.0: C++11 compiles +// Clang 9.0.0: C++11 fails +struct Foo { + // CE: + int32_t constexpr virtual Bar() {return 1;}; +}; + +// 2. The class must not have virtual base class +// Actual: GCC:9.2.0 C++11 compiles +// Clang 9.0.0: C++11 fails +struct Base {}; + +struct Derived : virtual Base { + // CE: + int32_t constexpr Bar() {return 1;}; +}; + +// 3. Single statement function body BEFORE: C++14 + +// OK!: +constexpr const char* IsEven(int32_t value) { + return (value % 2) != 0 ? "odd" : "even"; +} + +// CE: +constexpr const char* IsEven(int32_t value) { + if ((value % 2) != 0) { + return "odd"; + } else { + return "even"; + } +} + +// 3. C++14 gives us to use multiple statements in a function body +// OK! +constexpr const char* IsEven(int32_t value) { + if ((value % 2) != 0) { + return "odd"; + } else { + return "even"; + } +} + +// Constructor: function requirements + 4. +// 4. every BASE class non-static data member and every non-static data member must be initialized + +// Base class non-static data member +struct Base { + int32_t non_static_member; +}; + +struct Derived : Base { + constexpr Derived() = default; +}; + +void Foo() { + // CE: Base class non-static data member must be initialized + Derived d; +}; + + +struct Base { + int32_t non_static_member = 0; +}; + +struct Derived : Base { + constexpr Derived() = default; +}; + +void Foo() { + // OK!: + Derived d; +}; + +// Base class non-static data member + +struct Derived { + int32_t non_static_member = 0; + constexpr Derived() = default; +}; + +void Foo() { + // CE: class non-static data member must be initialized + Derived d; +}; + +struct Derived { + int32_t non_static_member = 0; + constexpr Derived() = default; +}; + +void Foo() { + // OK!: + Derived d; +}; + + +int main() { + + return 0; +} diff --git a/module-1/seminars/seminar22/0_constant_expressions.cpp b/module-1/seminars/seminar22/0_constant_expressions.cpp new file mode 100644 index 00000000..2877914c --- /dev/null +++ b/module-1/seminars/seminar22/0_constant_expressions.cpp @@ -0,0 +1,36 @@ +#include + +// Constant Expressions motivation: +// Pros: +// Similar to template metaprogramming but syntax much simpler and familiar with C++ +// Easy to maintain +// No runtime cost +// errors detection at compile time + +constexpr size_t Size() {return 1;} + +template +struct Array {}; + +int main() { + + const size_t size = 1; + + // constant expressions can be used as non-type template parameters + Array a1; + Array a2; + + // constant expressions can be used as array sizes + + // OK! + int32_t arr1[size]; + + // OK! + int32_t arr2[Size()]; + + // CE + int32_t cn = 0; + int32_t arr3[cn]; + + return 0; +} diff --git a/module-1/seminars/seminar22/0_constexpr_variable.cpp b/module-1/seminars/seminar22/0_constexpr_variable.cpp new file mode 100644 index 00000000..ea1fe35e --- /dev/null +++ b/module-1/seminars/seminar22/0_constexpr_variable.cpp @@ -0,0 +1,22 @@ +#include +#include + +int main() { + + // constexpr variable + + // 0. it must have a literal type + // CE: std::string is not a literal type + constexpr std::string s; + + // 1. it must be immediatly initialized + + // OK:! + constexpr int32_t x = 0; + + // CE: + constexpr int32_t y; + y = 0; + + return 0; +} diff --git a/module-1/seminars/seminar22/1_struct.cpp b/module-1/seminars/seminar22/1_struct.cpp new file mode 100644 index 00000000..259d96db --- /dev/null +++ b/module-1/seminars/seminar22/1_struct.cpp @@ -0,0 +1,12 @@ + +struct my_struct { + // combine static_assert with constexpr (self check) + static constexpr char who[] = "World"; + static_assert(who[0] == 'W', "OK!"); + static constexpr const char* a = &who[1]; + static_assert(*a == 'a', "FAIL: expected 'a'"); +}; + +int main() { + return 0; +} diff --git a/module-1/seminars/seminar22/2_core_f4.cpp b/module-1/seminars/seminar22/2_core_f4.cpp new file mode 100644 index 00000000..75829463 --- /dev/null +++ b/module-1/seminars/seminar22/2_core_f4.cpp @@ -0,0 +1,26 @@ +#include + + +// F.4: If a function might have to be evaluated at compile time, declare it constexpr + +constexpr int32_t Fac(int32_t n) { + int32_t x = 1; + for (int32_t i = 2; i <= n; ++i) { + x *= i; + } + return x; +} + +constexpr int32_t Min(int32_t x, int32_t y) { return x < y ? x : y; } + +void Test(int32_t v) { + int32_t m1 = Min(-1, 2); // probably compile-time evaluation + constexpr int32_t m2 = Min(-1, 2); // compile-time evaluation + int32_t m3 = Min(-1, v); // run-time evaluation + constexpr int32_t m4 = Min(-1, v); // error: cannot evaluate at compile time +} + +int main() { + Test(); + return 0; +} diff --git a/module-1/seminars/seminar22/CMakeLists.txt b/module-1/seminars/seminar22/CMakeLists.txt new file mode 100644 index 00000000..5e44bb1a --- /dev/null +++ b/module-1/seminars/seminar22/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.16) + +include(GoogleTest) + +project("runner") + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +################ clang-tidy ################ +set(CMAKE_CXX_CLANG_TIDY "clang-tidy;--fix-errors;-header-filter=.") + +add_executable(runner 0_consexpr_function.cpp) + +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(runner) \ No newline at end of file From 591d508f727121052d43c4e1cad853aff5f1ff51 Mon Sep 17 00:00:00 2001 From: morell5 Date: Sat, 27 Mar 2021 18:59:56 +0300 Subject: [PATCH 21/41] submodule: clangformat-cmake --- .gitmodules | 3 +++ clangformat-cmake | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 clangformat-cmake diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..95db22c4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "clangformat-cmake"] + path = clangformat-cmake + url = https://github.com/zemasoft/clangformat-cmake diff --git a/clangformat-cmake b/clangformat-cmake new file mode 160000 index 00000000..ced236e1 --- /dev/null +++ b/clangformat-cmake @@ -0,0 +1 @@ +Subproject commit ced236e1919c412f5cf745de9a116cae119e7315 From e6bb4f66dc1bc8db6f3610fea08b401d89d15e0e Mon Sep 17 00:00:00 2001 From: morell5 Date: Sat, 27 Mar 2021 19:00:25 +0300 Subject: [PATCH 22/41] ci.yml: clang-format, clang-tidy --- .clang-format | 11 +++++++++ .clang-tidy | 50 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 9 +++++--- 3 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 .clang-format create mode 100644 .clang-tidy diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..08b59108 --- /dev/null +++ b/.clang-format @@ -0,0 +1,11 @@ +BasedOnStyle: Google +IndentWidth: 4 +AccessModifierOffset: -4 +ColumnLimit: 100 +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +DerivePointerAlignment: true +KeepEmptyLinesAtTheStartOfBlocks: true +SortIncludes: true + diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..e294a69f --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,50 @@ +--- + +Checks: '-*,cppcoreguidelines-avoid-goto,cppcoreguidelines-pro-type-const-cast, google-runtime-int, modernize-use-nullptr, readability-braces-around-statements, readability-container-size-empty, readability-redundant-control-flow, readability-identifier-naming, readability-simplify-boolean-expr, google-build-using-namespace, readability-implicit-bool-conversion, google-explicit-constructor' + +WarningsAsErrors: '*' + +CheckOptions: + - key: readability-identifier-naming.NamespaceCase + value: lower_case + - key: readability-identifier-naming.ClassCase + value: CamelCase + - key: readability-identifier-naming.StructCase + value: CamelCase + - key: readability-identifier-naming.TypedefCase + value: lower_case + - key: readability-identifier-naming.TypeAliasCase + value: lower_case + - key: readability-identifier-naming.FunctionCase + value: CamelCase + - key: readability-identifier-naming.ParameterCase + value: lower_case + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.PrivateMemberCase + value: lower_case + - key: readability-identifier-naming.PrivateMemberSuffix + value: '_' + - key: readability-identifier-naming.GlobalConstantCase + value: CamelCase + - key: readability-identifier-naming.GlobalConstantPrefix + value: k + - key: readability-identifier-naming.StaticConstantCase + value: CamelCase + - key: readability-identifier-naming.StaticConstantPrefix + value: k + - key: readability-identifier-naming.ConstexprVariableCase + value: CamelCase + - key: readability-identifier-naming.ConstexprVariablePrefix + value: k + - key: readability-identifier-naming.TypeTemplateParameterCase + value: CamelCase + - key: readability-identifier-naming.ClassMemberCase + value: lower_case + - key: readability-identifier-naming.ClassMemberSuffix + value: '_' + - key: readability-simplify-boolean-expr.ChainedConditionalReturn + value: '1' + - key: readability-simplify-boolean-expr.ChainedConditionalAssignment + value: '1' + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e506e0b..aaea8ea0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,16 +4,19 @@ on: [pull_request] jobs: ci: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: checkout uses: actions/checkout@v2 - name: tests env: + CLANG_FORMAT_SUBMODULE: /home/runner/work/HSE-Course-Private/HSE-Course-Private/clangformat-cmake TITLE: ${{github.event.pull_request.title}} working-directory: ./module-1/homework/ - run: prname=${TITLE} && + run: sudo apt-get install -y clang-tidy && + git submodule update --init --recursive && + prname=${TITLE} && cmake -B ${prname}/build -S ${prname} && - cmake --build ${prname}/build && + cmake --build ${prname}/build --target runner clangformat && ./${prname}/build/runner \ No newline at end of file From 6979cd8ddae115d0a8b6fe398f404662dd1e79ab Mon Sep 17 00:00:00 2001 From: morell5 Date: Sat, 27 Mar 2021 19:09:27 +0300 Subject: [PATCH 23/41] homework: Allocator --- module-1/homework/Allocator/CMakeLists.txt | 17 +- .../Allocator/src/allocator/CMakeLists.txt | 13 +- .../Allocator/src/allocator/allocator.h | 62 +++--- .../Allocator/src/list/CMakeLists.txt | 13 +- module-1/homework/Allocator/src/list/list.h | 87 ++++---- module-1/homework/Allocator/tests.cpp | 190 +++++++++--------- 6 files changed, 207 insertions(+), 175 deletions(-) diff --git a/module-1/homework/Allocator/CMakeLists.txt b/module-1/homework/Allocator/CMakeLists.txt index 491fae8c..790ffa90 100644 --- a/module-1/homework/Allocator/CMakeLists.txt +++ b/module-1/homework/Allocator/CMakeLists.txt @@ -4,9 +4,10 @@ include(GoogleTest) project("runner") -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) +################ gtest ################ configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . @@ -34,9 +35,21 @@ if (CMAKE_VERSION VERSION_LESS 2.8.11) include_directories("${gtest_SOURCE_DIR}/include") endif() +################ Sanitizers ################ +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold -fsanitize=undefined,address -fno-sanitize-recover=all -O2 -Wall -Werror -Wsign-compare") + +################ clang-tidy ################ +set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-header-filter=.") + +add_executable(runner tests.cpp) + +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(runner) + add_subdirectory(src/allocator) add_subdirectory(src/list) -add_executable(runner tests.cpp) target_link_libraries(runner LINK_PUBLIC list allocator gtest_main) diff --git a/module-1/homework/Allocator/src/allocator/CMakeLists.txt b/module-1/homework/Allocator/src/allocator/CMakeLists.txt index 45936943..8cb8ba47 100644 --- a/module-1/homework/Allocator/src/allocator/CMakeLists.txt +++ b/module-1/homework/Allocator/src/allocator/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required(VERSION 3.16) -project("runner") +project(runner) -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_STANDARD_REQUIRED ON) +add_library(allocator allocator.h) +set_target_properties(allocator PROPERTIES LINKER_LANGUAGE CXX) -add_library(allocator INTERFACE) - -target_include_directories(allocator INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(allocator) \ No newline at end of file diff --git a/module-1/homework/Allocator/src/allocator/allocator.h b/module-1/homework/Allocator/src/allocator/allocator.h index 827256c5..8b07576a 100644 --- a/module-1/homework/Allocator/src/allocator/allocator.h +++ b/module-1/homework/Allocator/src/allocator/allocator.h @@ -1,41 +1,53 @@ #include #include -template +template class CustomAllocator { - public: - - using value_type = T; +public: + template + struct rebind { // NOLINT // Your code goes here + }; + + using value_type = T; + // Your code goes here + + CustomAllocator(); + CustomAllocator(const CustomAllocator& other) noexcept; + ~CustomAllocator(); + + template + explicit CustomAllocator(const CustomAllocator& other) noexcept; - CustomAllocator(); - CustomAllocator(const CustomAllocator& other) noexcept; - ~CustomAllocator(); - - template - CustomAllocator(const CustomAllocator& other) noexcept; - - T* allocate(std::size_t n); - void deallocate(T* p, std::size_t n); - template - void construct(pointer p, Args&&... args); - void destroy(pointer p); - - template - friend bool operator==(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept; - template - friend bool operator!=(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept; - - private: + T* allocate(size_t n) { // NOLINT + // Your code goes here + } + void deallocate(T* p, size_t n) { // NOLINT // Your code goes here + }; + template + void construct(pointer p, Args&&... args) { // NOLINT + // Your code goes here + }; + void destroy(pointer p) { // NOLINT + // Your code goes here + }; + + template + friend bool operator==(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept; + template + friend bool operator!=(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept; + +private: + // Your code goes here }; -template +template bool operator==(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept { // Your code goes here } -template +template bool operator!=(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept { // Your code goes here } \ No newline at end of file diff --git a/module-1/homework/Allocator/src/list/CMakeLists.txt b/module-1/homework/Allocator/src/list/CMakeLists.txt index 0ebe9234..90a496de 100644 --- a/module-1/homework/Allocator/src/list/CMakeLists.txt +++ b/module-1/homework/Allocator/src/list/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required(VERSION 3.16) -project("runner") +project(runner) -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_STANDARD_REQUIRED ON) +add_library(list list.h) +set_target_properties(list PROPERTIES LINKER_LANGUAGE CXX) -add_library(list INTERFACE) - -target_include_directories(list INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(list) \ No newline at end of file diff --git a/module-1/homework/Allocator/src/list/list.h b/module-1/homework/Allocator/src/list/list.h index a0affdef..f325e9d4 100644 --- a/module-1/homework/Allocator/src/list/list.h +++ b/module-1/homework/Allocator/src/list/list.h @@ -6,75 +6,76 @@ namespace task { -template> -class list { +template > +class List { public: - using value_type = T; // Your code goes here // Special member functions - list(); + List(){}; - list(const list& other) { + List(const List& other) { // Your code goes here } - list(const list& other, const Allocator& alloc); - - list(list&& other) : lst(std::move(other.lst)); - list(list&& other, const Allocator& alloc); + List(const List& other, const Allocator& alloc); - ~list(); + List(List&& other); + List(List&& other, const Allocator& alloc); - list& operator=(const list& other); + ~List(); - list& operator=(list&& other) noexcept; + List& operator=(const List& other); + + List& operator=(List&& other) noexcept; // Element access - reference front(); - const_reference front() const; - reference back(); - const_reference back() const; + reference Front(); + const_reference Front() const; + reference Back(); + const_reference Back() const; // Iterators - iterator begin() noexcept; - const_iterator begin() const noexcept; + iterator Begin() noexcept; + const_iterator Begin() const noexcept; - iterator end() noexcept; - const_iterator end() const noexcept; + iterator End() noexcept; + const_iterator End() const noexcept; // Capacity - bool empty() const noexcept; - size_type size() const noexcept; - size_type max_size() const noexcept; + bool Empty() const noexcept; + + size_type Size() const noexcept; + size_type MaxSize() const noexcept; // Modifiers - void clear(); - void swap(list& other) noexcept; - - void push_back(const T& value); - void push_back(T&& value); - template - void emplace_back(Args&&... args); - void pop_back(); - void push_front(const T& value); - void push_front(T&& value); - template - void emplace_front(Args&&... args); - void pop_front(); - - void resize(size_type count); + void Clear(); + void Swap(List& other) noexcept; + + void PushBack(const T& value); + void PushBack(T&& value); + + template + void EmplaceBack(Args&&... args); + void PopBack(); + void PushFront(const T& value); + void PushFront(T&& value); + template + void EmplaceFront(Args&&... args); + void PopFront(); + + void Resize(size_type count); // Operations - void remove(const T& value); - void unique(); - void sort(); + void Remove(const T& value); + void Unique(); + void Sort(); - allocator_type get_allocator() const noexcept; + allocator_type GetAllocator() const noexcept; private: // Your code goes here }; -} \ No newline at end of file +} // namespace task \ No newline at end of file diff --git a/module-1/homework/Allocator/tests.cpp b/module-1/homework/Allocator/tests.cpp index 4d88d43a..ce9e9a18 100644 --- a/module-1/homework/Allocator/tests.cpp +++ b/module-1/homework/Allocator/tests.cpp @@ -1,215 +1,219 @@ #include #include -#include #include +#include +#include "gtest/gtest.h" #include "src/allocator/allocator.h" #include "src/list/list.h" -#include "gtest/gtest.h" - TEST(CopyAssignment, Test) { - task::list> actual; - task::list> expected; - + task::List> actual; + task::List> actual_copy; + std::list> expected; + std::list> expected_copy; + for (std::size_t i = 0; i < 10; i++) { - expected.push_back("hello"); + actual_copy.PushBack("hello"); + expected_copy.push_back("hello"); } - actual = expected; - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + actual = actual_copy; + expected = expected_copy; + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(MoveAssignment, Test1) { - std::list l1; - std::list l2; + task::List l1; + task::List l2; std::list l3; std::list l4; - l1.push_back("hello"); + l1.PushBack("hello"); l2 = std::move(l1); l3.push_back("hello"); l4 = std::move(l3); - - ASSERT_TRUE(std::equal(l1.begin(), l1.end(), l3.begin(), l3.end())); - ASSERT_TRUE(std::equal(l2.begin(), l2.end(), l4.begin(), l4.end())); + + ASSERT_TRUE(std::equal(l1.Begin(), l1.End(), l3.begin(), l3.end())); + ASSERT_TRUE(std::equal(l2.Begin(), l2.End(), l4.begin(), l4.end())); } TEST(Front, Test1) { - task::list> actual; + task::List> actual; std::list> expected; - - actual.push_back("hello"); + + actual.PushBack("hello"); expected.push_back("hello"); - actual.push_back("hello"); + actual.PushBack("hello"); expected.push_back("hello"); - actual.push_back("hello"); + actual.PushBack("hello"); expected.push_back("hello"); - actual.clear(); + actual.Clear(); expected.clear(); - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(Clear, Test1) { - task::list> actual; + task::List> actual; std::list> expected; - + for (std::size_t i = 0; i < 10; i++) { - actual.push_back("hello"); + actual.PushBack("hello"); expected.push_back("hello"); } - actual.clear(); + actual.Clear(); expected.clear(); - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(Swap, Test1) { - task::list> actual; + task::List> actual; std::list> expected; - + for (std::size_t i = 0; i < 10; i++) { - actual.push_back("hello"); + actual.PushBack("hello"); expected.push_back("hello"); } - task::list> actual2; + task::List> actual2; std::list> expected2; - + for (std::size_t i = 0; i < 10; i++) { - actual2.push_back("world"); + actual2.PushBack("world"); expected2.push_back("world"); } - actual.swap(actual2); + actual.Swap(actual2); expected.swap(expected2); - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual2.Begin(), actual2.End(), expected2.begin(), expected2.end())); } TEST(PushBack, Test) { std::vector actual_v(10, "hello"); std::vector expected_v(10, "hello"); - task::list> actual; + task::List> actual; std::list> expected; - + for (std::size_t i = 0; i < 10; i++) { - actual.push_back(std::move(actual_v[i])); + actual.PushBack(std::move(actual_v[i])); expected.push_back(std::move(expected_v[i])); } - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(EmplaceBack, Test1) { - task::list> actual; + task::List> actual; std::list> expected; - + for (std::size_t i = 0; i < 10; i++) { - actual.emplace_back("hello"); + actual.EmplaceBack("hello"); expected.emplace_back("hello"); } - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(PopBack, Test1) { - task::list> actual; + task::List> actual; std::list> expected; - + for (std::size_t i = 0; i < 10; i++) { - actual.emplace_back("hello"); + actual.EmplaceBack("hello"); expected.emplace_back("hello"); } for (std::size_t i = 0; i < 5; i++) { - actual.pop_back(); + actual.PopBack(); expected.pop_back(); } - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(PushFront, Test1) { std::vector actual_v(10, "hello"); std::vector expected_v(10, "hello"); - task::list> actual; + task::List> actual; std::list> expected; - + for (std::size_t i = 0; i < 10; i++) { - actual.push_front(actual_v[i]); + actual.PushFront(actual_v[i]); expected.push_front(expected_v[i]); } - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(PushFront, Test2) { std::vector actual_v(10, "hello"); std::vector expected_v(10, "hello"); - task::list> actual; + task::List> actual; std::list> expected; - + for (std::size_t i = 0; i < 10; i++) { - actual.push_front(std::move(actual_v[i])); + actual.PushFront(std::move(actual_v[i])); expected.push_front(std::move(expected_v[i])); } - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); -} + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); +} TEST(EmplaceFront, Test1) { - task::list> actual; + task::List> actual; std::list> expected; - + for (std::size_t i = 0; i < 10; i++) { - actual.emplace_front("hello"); + actual.EmplaceFront("hello"); expected.emplace_front("hello"); } - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(PopFront, Test1) { - task::list> actual; + task::List> actual; std::list> expected; - + for (std::size_t i = 0; i < 10; i++) { - actual.emplace_back("hello"); + actual.EmplaceBack("hello"); expected.emplace_back("hello"); } for (std::size_t i = 0; i < 5; i++) { - actual.pop_front(); + actual.PopFront(); expected.pop_front(); } - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(Resize, Test1) { - task::list> actual; - actual.resize(2); - ASSERT_EQ(actual.size(), 2); + task::List> actual; + actual.Resize(2); + ASSERT_EQ(actual.Size(), 2); } TEST(Remove, Test1) { - task::list> actual; - actual.push_back("hello"); - actual.push_back("world"); - actual.push_back("hello"); - actual.remove("hello"); + task::List> actual; + actual.PushBack("hello"); + actual.PushBack("world"); + actual.PushBack("hello"); + actual.Remove("hello"); std::list> expected; expected.push_back("world"); - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(Unique, Test1) { - task::list> actual; - actual.push_back("hello"); - actual.push_back("hello"); - actual.push_back("world"); - actual.push_back("world"); - actual.unique(); + task::List> actual; + actual.PushBack("hello"); + actual.PushBack("hello"); + actual.PushBack("world"); + actual.PushBack("world"); + actual.Unique(); std::list> expected; expected.push_back("hello"); expected.push_back("world"); - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(Sort, Test1) { @@ -217,42 +221,42 @@ TEST(Sort, Test1) { std::mt19937 random_engine(random_device()); std::uniform_int_distribution distribution(1, 100); - task::list actual; + task::List actual; std::list expected; for (size_t i = 0; i < 100; ++i) { int value = distribution(random_engine); - actual.push_back(value); + actual.PushBack(value); expected.push_back(value); } - actual.sort(); + actual.Sort(); expected.sort(); - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } TEST(Mixed, Test1) { - task::list> actual; + task::List> actual; std::list> expected; - + for (std::size_t i = 0; i < 5; i++) { - actual.push_back("hello"); + actual.PushBack("hello"); expected.push_back("hello"); } for (std::size_t i = 0; i < 3; i++) { - actual.pop_front(); + actual.PopFront(); expected.pop_front(); } for (std::size_t i = 0; i < 5; i++) { - actual.push_front("world"); + actual.PushFront("world"); expected.push_front("world"); } for (std::size_t i = 0; i < 3; i++) { - actual.pop_back(); + actual.PopBack(); expected.pop_back(); } - ASSERT_TRUE(std::equal(actual.begin(), actual.end(), expected.begin(), expected.end())); + ASSERT_TRUE(std::equal(actual.Begin(), actual.End(), expected.begin(), expected.end())); } int main(int argc, char** argv) { From c4a539a95f544054a39730acc09898ac2cb967e2 Mon Sep 17 00:00:00 2001 From: morell5 Date: Sat, 27 Mar 2021 22:15:29 +0300 Subject: [PATCH 24/41] homework: Optional --- module-1/homework/Optional/CMakeLists.txt | 28 +++++---- module-1/homework/Optional/optional.h | 73 ++++++++++++----------- module-1/homework/Optional/task.md | 14 ++--- module-1/homework/Optional/tests.cpp | 34 ++++++----- 4 files changed, 82 insertions(+), 67 deletions(-) diff --git a/module-1/homework/Optional/CMakeLists.txt b/module-1/homework/Optional/CMakeLists.txt index cea3b7a6..c1ae97fd 100644 --- a/module-1/homework/Optional/CMakeLists.txt +++ b/module-1/homework/Optional/CMakeLists.txt @@ -7,6 +7,7 @@ project("runner") set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) +################ gtest ################ configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . @@ -24,24 +25,29 @@ if(result) message(FATAL_ERROR "Build step for googletest failed: ${result}") endif() -# Prevent overriding the parent project's compiler/linker -# settings on Windows set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -# Add googletest directly to our build. This defines -# the gtest and gtest_main targets. add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src - ${CMAKE_CURRENT_BINARY_DIR}/googletest-build - EXCLUDE_FROM_ALL) + ${CMAKE_CURRENT_BINARY_DIR}/googletest-build + EXCLUDE_FROM_ALL) -# The gtest/gtest_main targets carry header search path -# dependencies automatically when using CMake 2.8.11 or -# later. Otherwise we have to add them here ourselves. if (CMAKE_VERSION VERSION_LESS 2.8.11) include_directories("${gtest_SOURCE_DIR}/include") endif() -# Now simply link against gtest or gtest_main as needed. Eg +################ Sanitizers ################ +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold -fsanitize=undefined,address -fno-sanitize-recover=all -O2 -Wall -Werror -Wsign-compare") + +################ clang-tidy ################ +set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-header-filter=.") + add_executable(runner tests.cpp optional.h) -target_link_libraries(runner gtest_main) + +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(runner) + +target_link_libraries(runner LINK_PUBLIC gtest_main) + add_test(NAME runner_test COMMAND runner) \ No newline at end of file diff --git a/module-1/homework/Optional/optional.h b/module-1/homework/Optional/optional.h index 38745814..1c2bbf91 100644 --- a/module-1/homework/Optional/optional.h +++ b/module-1/homework/Optional/optional.h @@ -5,55 +5,60 @@ namespace task { -struct nullopt_t { - // Your code goes here; +struct NullOpt { + // Your code goes here; }; -constexpr nullopt_t // Your code goes here; +constexpr NullOpt kNullOpt = // Your code goes here; -struct in_place_t { - // Your code goes here; +struct InPlace { + // Your code goes here; }; -constexpr in_place_t // Your code goes here; +constexpr InPlace kInPlace = //Your code goes here; -template -class optional { - public: - - using value_type = // Your code goes here; +template +class Optional : public // Your code goes here; { +public: + using value_type = // Your code goes here; - constexpr optional() noexcept; - template < class U = value_type > - constexpr optional( U&& value ); - constexpr optional(nullopt_t) noexcept; - template - constexpr explicit optional(in_place_t, _Args&&... __args); - - template - constexpr T value_or(U&& default_value) const&; + constexpr Optional() noexcept; - template - constexpr T value_or(U&& default_value) &&; + template + constexpr explicit Optional(U&& value); - constexpr bool has_value() const noexcept; + constexpr explicit Optional(NullOpt) noexcept; - constexpr explicit operator bool() const noexcept; + template + constexpr explicit Optional(InPlace, Args&&... args); - constexpr std::add_pointer_t operator->() const; + Optional& operator=(NullOpt) noexcept; - constexpr std::add_pointer_t operator->(); + template + Optional& operator=(U&& value); - constexpr const value_type& operator*() const&; + void Reset() noexcept; - constexpr value_type& operator*() &; + template + constexpr T ValueOr(U&& default_value) const&; - constexpr const value_type&& operator*() const&&; + template + constexpr T ValueOr(U&& default_value) &&; - constexpr value_type&& operator*() &&; + constexpr bool HasValue() const noexcept; - private: - // Your code goes here; -}; + constexpr explicit operator bool() const noexcept; + + constexpr std::add_pointer_t operator->() const; + + constexpr std::add_pointer_t operator->(); + + constexpr const value_type& operator*() const&; -}; \ No newline at end of file + constexpr value_type& operator*() &; + + constexpr const value_type&& operator*() const&&; + + constexpr value_type&& operator*() &&; +}; +} // namespace task \ No newline at end of file diff --git a/module-1/homework/Optional/task.md b/module-1/homework/Optional/task.md index 843f8c2d..16ffcb78 100644 --- a/module-1/homework/Optional/task.md +++ b/module-1/homework/Optional/task.md @@ -7,21 +7,21 @@ Конструкторы: ````c++ -constexpr optional() noexcept; +constexpr Optional() noexcept; ```` ```c++ template< class U = value_type > -constexpr optional( U&& value ); +constexpr Optional( U&& value ); ``` ```c++ -constexpr optional(nullopt_t) noexcept; +constexpr Optional(nullopt_t) noexcept; ``` ```c++ template -constexpr explicit optional(in_place_t, _Args&&... __args); +constexpr explicit Optional(in_place_t, _Args&&... __args); ``` Реализовать операторы: @@ -30,10 +30,10 @@ constexpr explicit optional(in_place_t, _Args&&... __args); * `bool()` - преобразование к `bool` Методы: -* `has_value` - проверка наличия значения -* `value_or` - возвращает хранимое значение при его наличии или передаваемый аргумент
+* `HasValue` - проверка наличия значения +* `ValueOr` - возвращает хранимое значение при его наличии или передаваемый аргумент
при отсутствии хранимого значения -* `reset` - вызов деструктора у хранимого значении при наличии деструктора у типа этого значения +* `Reset` - вызов деструктора у хранимого значении при наличии деструктора у типа этого значения Можно использовать: * `std::is_trivially_destructible` diff --git a/module-1/homework/Optional/tests.cpp b/module-1/homework/Optional/tests.cpp index a58b5773..749f0981 100644 --- a/module-1/homework/Optional/tests.cpp +++ b/module-1/homework/Optional/tests.cpp @@ -1,42 +1,46 @@ -#include +#include #include -#include - #include "gtest/gtest.h" +#include "optional.h" TEST(ValueOR, Test1) { - task::optional opt("Hello world"); - ASSERT_EQ(opt.value_or("empty"), "Hello world"); + task::Optional opt("Hello world"); + ASSERT_EQ(opt.ValueOr("empty"), "Hello world"); } TEST(ValueOR, Test2) { - task::optional opt; - ASSERT_EQ(opt.value_or("empty"), "empty"); + task::Optional opt; + ASSERT_EQ(opt.ValueOr("empty"), "empty"); } TEST(HasValue, Test1) { - task::optional opt("Hello world"); - ASSERT_TRUE(opt.has_value()); + task::Optional opt("Hello world"); + ASSERT_TRUE(opt.HasValue()); } TEST(Reset, Test1) { - task::optional opt("Hello world"); - opt.reset(); - ASSERT_FALSE(opt.has_value()); + task::Optional opt("Hello world"); + opt.Reset(); + ASSERT_FALSE(opt.HasValue()); } TEST(ConversionToBool, Test1) { - task::optional opt("Hello world"); + task::Optional opt("Hello world"); ASSERT_TRUE(opt); } TEST(ArrowOperator, Test1) { - task::optional opt("Hello world"); + task::Optional opt("Hello world"); ASSERT_EQ(std::string(opt->c_str()), "Hello world"); } TEST(IndirectionOperator, Test1) { - task::optional opt(1); + task::Optional opt(1); ASSERT_EQ(*opt, 1); +} + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); } \ No newline at end of file From b5f8f9212741b875ce6cda2f9cacc93c7056ddc6 Mon Sep 17 00:00:00 2001 From: morell5 Date: Sun, 28 Mar 2021 09:14:11 +0300 Subject: [PATCH 25/41] homework: SharedPtr --- .../homework/SharedPointer/CMakeLists.txt | 17 +- .../SharedPointer/src/control/CMakeLists.txt | 13 +- .../SharedPointer/src/control/control.h | 38 ++-- .../src/shared_ptr/CMakeLists.txt | 13 +- .../SharedPointer/src/shared_ptr/shared_ptr.h | 166 +++++++++--------- module-1/homework/SharedPointer/task.md | 62 +++---- module-1/homework/SharedPointer/tests.cpp | 155 ++++++++-------- 7 files changed, 240 insertions(+), 224 deletions(-) diff --git a/module-1/homework/SharedPointer/CMakeLists.txt b/module-1/homework/SharedPointer/CMakeLists.txt index 624cb834..b5513e61 100644 --- a/module-1/homework/SharedPointer/CMakeLists.txt +++ b/module-1/homework/SharedPointer/CMakeLists.txt @@ -4,9 +4,10 @@ include(GoogleTest) project("runner") -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) +################ gtest ################ configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . @@ -34,9 +35,19 @@ if (CMAKE_VERSION VERSION_LESS 2.8.11) include_directories("${gtest_SOURCE_DIR}/include") endif() -add_subdirectory(src/shared_ptr) +################ clang-tidy ################ +set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-header-filter=.") + add_executable(runner tests.cpp) -target_link_libraries(runner LINK_PUBLIC shared_ptr gtest_main) +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(runner) + +add_subdirectory(src/control) +add_subdirectory(src/shared_ptr) + +target_link_libraries(runner LINK_PUBLIC control shared_ptr gtest_main) add_test(NAME runner_test COMMAND runner) \ No newline at end of file diff --git a/module-1/homework/SharedPointer/src/control/CMakeLists.txt b/module-1/homework/SharedPointer/src/control/CMakeLists.txt index c7550725..c5047ad5 100644 --- a/module-1/homework/SharedPointer/src/control/CMakeLists.txt +++ b/module-1/homework/SharedPointer/src/control/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required(VERSION 3.16) -project("runner") +project(runner) -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_STANDARD_REQUIRED ON) +add_library(control control.h) +set_target_properties(control PROPERTIES LINKER_LANGUAGE CXX) -add_library(control INTERFACE) - -target_include_directories(control INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(control) \ No newline at end of file diff --git a/module-1/homework/SharedPointer/src/control/control.h b/module-1/homework/SharedPointer/src/control/control.h index 55c08056..b2fc359b 100644 --- a/module-1/homework/SharedPointer/src/control/control.h +++ b/module-1/homework/SharedPointer/src/control/control.h @@ -1,26 +1,28 @@ #pragma once -class shared_count { - protected: - // Your code goes here... +#include - public: - // Your code goes here... -}; +class SharedCount { +public: + // Your code goes here... -class shared_weak_count : public shared_count { - private: - // Your code goes here... - - public: - // Your code goes here... +protected: + // Your code goes here... }; -template -class control_block : public shared_weak_count { - public: - // Your code goes here... +class SharedWeakCount : public SharedCount { +public: + // Your code goes here... - private: - // Your code goes here... +protected: + // Your code goes here... }; + +template +class ControlBlock : public SharedWeakCount { +public: + // Your code goes here... + +private: + // Your code goes here... +}; \ No newline at end of file diff --git a/module-1/homework/SharedPointer/src/shared_ptr/CMakeLists.txt b/module-1/homework/SharedPointer/src/shared_ptr/CMakeLists.txt index 0922bd45..0b306ad3 100644 --- a/module-1/homework/SharedPointer/src/shared_ptr/CMakeLists.txt +++ b/module-1/homework/SharedPointer/src/shared_ptr/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required(VERSION 3.16) -project("runner") +project(runner) -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_STANDARD_REQUIRED ON) +add_library(shared_ptr shared_ptr.h) +set_target_properties(shared_ptr PROPERTIES LINKER_LANGUAGE CXX) -add_library(shared_ptr INTERFACE) - -target_include_directories(shared_ptr INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(shared_ptr) \ No newline at end of file diff --git a/module-1/homework/SharedPointer/src/shared_ptr/shared_ptr.h b/module-1/homework/SharedPointer/src/shared_ptr/shared_ptr.h index 416d9890..2a60bbcf 100644 --- a/module-1/homework/SharedPointer/src/shared_ptr/shared_ptr.h +++ b/module-1/homework/SharedPointer/src/shared_ptr/shared_ptr.h @@ -2,109 +2,107 @@ #include "../control/control.h" -// shared_ptr -template -class weak_ptr; - -template -class shared_ptr { - public: - using element_type = T; - - constexpr shared_ptr() noexcept = default; - ~shared_ptr(); - - template - shared_ptr(Y* p); - - template - shared_ptr(Y* p, Deleter deleter) noexcept; - - shared_ptr(const shared_ptr& other) noexcept; - shared_ptr(shared_ptr&& other) noexcept; - - shared_ptr& operator=( const shared_ptr& r ) noexcept; - - template - shared_ptr& operator=( const shared_ptr& r ) noexcept; - - shared_ptr& operator=( shared_ptr&& r ) noexcept; - - template - shared_ptr& operator=( shared_ptr&& r ) noexcept; - - // Modifiers - void reset() noexcept; - - template - void reset(Y* p) noexcept; - - template - void reset(Y*p, Deleter deleter) noexcept; - - void swap(shared_ptr& other) noexcept; - - // Observers - T* get() const noexcept; - long use_count() const noexcept; - T& operator*() const noexcept; - T* operator->() const noexcept; - element_type& operator[](std::ptrdiff_t idx) const; - explicit operator bool() const noexcept; - - private: - // Your code goes here... -}; +// SharedPtr +template +class WeakPtr; + +template +class SharedPtr { +public: + using element_type = // Your code goes here... -// make_shared + constexpr SharedPtr() noexcept = default; + ~SharedPtr(); -// Your code goes here... + template + explicit SharedPtr(Y* p); + + template + SharedPtr(Y* p, Deleter deleter) noexcept; + + SharedPtr(const SharedPtr& other) noexcept; + SharedPtr(SharedPtr&& other) noexcept; + + SharedPtr& operator=(const SharedPtr& r) noexcept; + + template + SharedPtr& operator=(const SharedPtr& r) noexcept; + + SharedPtr& operator=(SharedPtr&& r) noexcept; + + template + SharedPtr& operator=(SharedPtr&& r) noexcept; + + // Modifiers + void Reset() noexcept; + + template + void Reset(Y* p) noexcept; -// make_shared + template + void Reset(Y* p, Deleter deleter) noexcept; -// shared_ptr + void Swap(SharedPtr& other) noexcept; + // Observers + T* Get() const noexcept; + int64_t UseCount() const noexcept; + T& operator*() const noexcept; + T* operator->() const noexcept; + element_type& operator[](std::ptrdiff_t idx) const; + explicit operator bool() const noexcept; + + template + friend class WeakPtr; + +private: + // Your code goes here... +}; + + +// MakeShared +// Your code goes here... +// MakeShared + +// SharedPtr // Your code goes here... +// SharedPtr -// shared_ptr +// WeakPtr +template +class WeakPtr { -template -class weak_ptr { - - using element_type = T; - public: + using element_type = // Your code goes here... // Special-member functions - constexpr weak_ptr() noexcept = default; - template - weak_ptr(const shared_ptr& other); - weak_ptr(const weak_ptr& other) noexcept; - weak_ptr(weak_ptr&& other) noexcept; - template - weak_ptr& operator=(const shared_ptr& other); - weak_ptr& operator=(const weak_ptr& other) noexcept; - weak_ptr& operator=(weak_ptr&& other) noexcept; - - ~weak_ptr() = default; + constexpr WeakPtr() noexcept = default; + template + explicit WeakPtr(const SharedPtr& other); + WeakPtr(const WeakPtr& other) noexcept; + WeakPtr(WeakPtr&& other) noexcept; + template + WeakPtr& operator=(const SharedPtr& other); + WeakPtr& operator=(const WeakPtr& other) noexcept; + WeakPtr& operator=(WeakPtr&& other) noexcept; + + ~WeakPtr(); // Modifiers - void reset() noexcept; - void swap(weak_ptr& other) noexcept; + void Reset() noexcept; + void Swap(WeakPtr& other) noexcept; // Observers - bool expired() noexcept; - shared_ptr lock() const noexcept; + bool Expired() noexcept; + SharedPtr Lock() const noexcept; - template friend class shared_ptr; + template + friend class SharedPtr; public: // Your code goes here... }; - -// weak_ptr - +// WeakPtr // Your code goes here... - -// weak_ptr \ No newline at end of file +// WeakPtr \ No newline at end of file diff --git a/module-1/homework/SharedPointer/task.md b/module-1/homework/SharedPointer/task.md index 571d4023..9aeaaaeb 100644 --- a/module-1/homework/SharedPointer/task.md +++ b/module-1/homework/SharedPointer/task.md @@ -2,7 +2,7 @@ ## Задание -Реализовать control_block в `control.h` +Реализовать `ControlBlock` в `control.h` * без аллокатора * счетчик ссылок @@ -10,57 +10,57 @@ std::atomic ``` -Написать класс [shared_ptr](https://en.cppreference.com/w/cpp/memory/shared_ptr) +Написать класс [SharedPtr](https://en.cppreference.com/w/cpp/memory/shared_ptr) Реализовать: * **Special member functions** ```c++ - constexpr shared_ptr() noexcept = default; + constexpr SharedPtr() noexcept = default; template - shared_ptr(Y* p); + SharedPtr(Y* p); template - shared_ptr(Y* p, Deleter deleter) noexcept; + SharedPtr(Y* p, Deleter deleter) noexcept; - shared_ptr(const shared_ptr& other) noexcept; + SharedPtr(const SharedPtr& other) noexcept; - shared_ptr(shared_ptr&& other) noexcept; + SharedPtr(SharedPtr&& other) noexcept; - shared_ptr& operator=( const shared_ptr& r ) noexcept; + SharedPtr& operator=( const SharedPtr& r ) noexcept; template - shared_ptr& operator=( const shared_ptr& r ) noexcept; + SharedPtr& operator=( const SharedPtr& r ) noexcept; - shared_ptr& operator=( shared_ptr&& r ) noexcept; + SharedPtr& operator=( SharedPtr&& r ) noexcept; template - shared_ptr& operator=( shared_ptr&& r ) noexcept; + SharedPtr& operator=( SharedPtr&& r ) noexcept; - ~shared_ptr(); + ~SharedPtr(); ``` * **Modifiers** ```c++ - void reset() noexcept; + void Reset() noexcept; template - void reset(Y* p) noexcept; + void Reset(Y* p) noexcept; template - void reset(Y*p, Deleter deleter) noexcept; + void Reset(Y*p, Deleter deleter) noexcept; - void swap(shared_ptr& other) noexcept; + void Swap(SharedPtr& other) noexcept; ``` * **Observers** ```c++ - T* get() const noexcept; + T* Get() const noexcept; - long use_count() const noexcept; + long UseCount() const noexcept; T& operator*() const noexcept; @@ -72,41 +72,41 @@ ``` -Написать класс [weak_ptr](https://en.cppreference.com/w/cpp/memory/weak_ptr) +Написать класс [WeakPtr](https://en.cppreference.com/w/cpp/memory/weak_ptr) Реализовать: * **Special member functions** ```c++ - constexpr weak_ptr() noexcept = default; + constexpr WeakPtr() noexcept = default; template - weak_ptr(const shared_ptr& other); + WeakPtr(const SharedPtr& other); - weak_ptr(const weak_ptr& other) noexcept; + WeakPtr(const WeakPtr& other) noexcept; - weak_ptr(weak_ptr&& other) noexcept; + WeakPtr(WeakPtr&& other) noexcept; template - weak_ptr& operator=(const shared_ptr& other); + WeakPtr& operator=(const SharedPtr& other); - weak_ptr& operator=(const weak_ptr& other) noexcept; + WeakPtr& operator=(const WeakPtr& other) noexcept; - weak_ptr& operator=(weak_ptr&& other) noexcept; + WeakPtr& operator=(WeakPtr&& other) noexcept; - ~weak_ptr(); + ~WeakPtr(); ``` * **Modifiers** ```c++ - void reset() noexcept; - void swap(weak_ptr& other) noexcept; + void Reset() noexcept; + void Swap(WeakPtr& other) noexcept; ``` * **Observers** ```c++ - bool expired() noexcept; - shared_ptr lock() const noexcept; + bool Expired() noexcept; + SharedPtr Lock() const noexcept; ``` \ No newline at end of file diff --git a/module-1/homework/SharedPointer/tests.cpp b/module-1/homework/SharedPointer/tests.cpp index f38a6f6a..00a31e2a 100644 --- a/module-1/homework/SharedPointer/tests.cpp +++ b/module-1/homework/SharedPointer/tests.cpp @@ -1,156 +1,159 @@ #include #include -#include "src/shared_ptr/shared_ptr.h" - #include "gtest/gtest.h" +#include "src/shared_ptr/shared_ptr.h" -// weak_ptr +// WeakPtr TEST(WeakExpired, Test1) { - weak_ptr w; + WeakPtr w; { - auto sp = make_shared(42); + auto sp = MakeShared(42); w = sp; - ASSERT_FALSE(w.expired()); + ASSERT_FALSE(w.Expired()); } } TEST(WeakExpired, Test2) { - weak_ptr w; + WeakPtr w; { - auto sp = make_shared(42); + auto sp = MakeShared(42); w = sp; } - ASSERT_TRUE(w.expired()); + ASSERT_TRUE(w.Expired()); } TEST(WeakReset, Test3) { - weak_ptr w; - auto sp = make_shared(42); + WeakPtr w; + auto sp = MakeShared(42); w = sp; - w.reset(); - ASSERT_TRUE(w.expired()); + w.Reset(); + ASSERT_TRUE(w.Expired()); } TEST(WeakLock, Test1) { - weak_ptr w; - auto sp = make_shared(42); + WeakPtr w; + auto sp = MakeShared(42); w = sp; - ASSERT_TRUE(*w.lock() == 42); + ASSERT_TRUE(*w.Lock() == 42); } TEST(WeakLock, Test2) { - weak_ptr w; + WeakPtr w; { - auto sp = make_shared(42); + auto sp = MakeShared(42); w = sp; } - ASSERT_FALSE(w.lock()); + ASSERT_FALSE(w.Lock()); } -// shared_ptr +// SharedPtr TEST(SharedMoveConstructor, Test1) { - class contrainer {}; - shared_ptr s1 = make_shared(); - contrainer* raw_s1 = s1.get(); - shared_ptr s2 = std::move(s1); - ASSERT_TRUE(s1.use_count() == 0 && s1.get() == nullptr && s2.get() == raw_s1 && s2.use_count() == 1); + class Contrainer {}; + SharedPtr s1 = MakeShared(); + Contrainer* raw_s1 = s1.Get(); + SharedPtr s2 = std::move(s1); + ASSERT_TRUE(s1.UseCount() == 0 && s1.Get() == nullptr && s2.Get() == raw_s1 && + s2.UseCount() == 1); } TEST(SharedMoveAssignment, Test1) { - class contrainer {}; - shared_ptr s1 = make_shared(); - contrainer* raw_s1 = s1.get(); - shared_ptr s2; + class Contrainer {}; + SharedPtr s1 = MakeShared(); + Contrainer* raw_s1 = s1.Get(); + SharedPtr s2; s2 = std::move(s1); - ASSERT_TRUE(s1.use_count() == 0 && s1.get() == nullptr && s2.get() == raw_s1 && s2.use_count() == 1); + ASSERT_TRUE(s1.UseCount() == 0 && s1.Get() == nullptr && s2.Get() == raw_s1 && + s2.UseCount() == 1); } TEST(SharedAssignment, Test1) { - class contrainer {}; - shared_ptr s1 = make_shared(); - shared_ptr s2; - shared_ptr s3; + class Contrainer {}; + SharedPtr s1 = MakeShared(); + SharedPtr s2; + SharedPtr s3; s2 = s1; s3 = s2; - - ASSERT_TRUE(s1.use_count() == 3 && s2.use_count() == 3 && s3.use_count() == 3 && s1.get() == s2.get() && s2.get() == s3.get()); + + ASSERT_TRUE(s1.UseCount() == 3 && s2.UseCount() == 3 && s3.UseCount() == 3 && + s1.Get() == s2.Get() && s2.Get() == s3.Get()); } TEST(SharedReset, Test1) { - class contrainer {}; - shared_ptr s1 = make_shared(); - s1.reset(); + class Contrainer {}; + SharedPtr s1 = MakeShared(); + s1.Reset(); ASSERT_FALSE(s1); } TEST(SharedReset, Test2) { - class contrainer {}; - shared_ptr s1 = make_shared(); - contrainer* p = new contrainer; - s1.reset(p); - - ASSERT_TRUE(s1.get() == p && s1.use_count() == 1); + class Contrainer {}; + SharedPtr s1 = MakeShared(); + Contrainer* p = new Contrainer; + s1.Reset(p); + + ASSERT_TRUE(s1.Get() == p && s1.UseCount() == 1); } TEST(SharedReset, Test3) { - class contrainer {}; + class Contrainer {}; - shared_ptr s1 = make_shared(); - contrainer* p = new contrainer; - s1.reset(p, std::default_delete()); - - ASSERT_TRUE(s1.get() == p && s1.use_count() == 1); + SharedPtr s1 = MakeShared(); + Contrainer* p = new Contrainer; + s1.Reset(p, std::default_delete()); + + ASSERT_TRUE(s1.Get() == p && s1.UseCount() == 1); } TEST(SharedUseCount, Test1) { - class contrainer {}; + class Contrainer {}; - shared_ptr s1 = make_shared(); - shared_ptr s2 = s1; - { - shared_ptr s3 = s2; - } - - ASSERT_TRUE(s1.use_count() == 2 && s2.use_count() == 2 && s1.get() == s2.get()); + SharedPtr s1 = MakeShared(); + SharedPtr s2 = s1; + { SharedPtr s3 = s2; } + + ASSERT_TRUE(s1.UseCount() == 2 && s2.UseCount() == 2 && s1.Get() == s2.Get()); } TEST(SharedSwap, Test1) { - shared_ptr s1 = make_shared(1); - shared_ptr s2 = s1; - shared_ptr s3 = make_shared(2); - auto raw_s1 = s1.get(); - auto raw_s3 = s3.get(); - s1.swap(s3); - - ASSERT_TRUE(s1.use_count() == 1 && s2.use_count() == 2 && s3.use_count() == 2 && s2.get() == s3.get() && s2.get() == raw_s1 && s1.get() == raw_s3); + SharedPtr s1 = MakeShared(1); + SharedPtr s2 = s1; + SharedPtr s3 = MakeShared(2); + auto raw_s1 = s1.Get(); + auto raw_s3 = s3.Get(); + s1.Swap(s3); + + ASSERT_TRUE(s1.UseCount() == 1 && s2.UseCount() == 2 && s3.UseCount() == 2 && + s2.Get() == s3.Get() && s2.Get() == raw_s1 && s1.Get() == raw_s3); } TEST(SharedIndirectionOperator, Test1) { - shared_ptr s1 = make_shared(1); + SharedPtr s1 = MakeShared(1); ASSERT_TRUE(*s1 == 1); } TEST(SharedArrowOperator, Test1) { - struct contrainer { - constexpr int foo() const noexcept { return 1; } + struct Contrainer { + constexpr int Foo() const noexcept { + return 1; + } }; - shared_ptr s1 = make_shared(); - ASSERT_TRUE(s1->foo() == 1); + SharedPtr s1 = MakeShared(); + ASSERT_TRUE(s1->Foo() == 1); } TEST(SharedBoolOperator, Test1) { - class contrainer {}; + class Contrainer {}; - shared_ptr s1 = make_shared(); + SharedPtr s1 = MakeShared(); ASSERT_TRUE(s1); } TEST(SharedBoolOperator, Test2) { - class contrainer {}; + class Contrainer {}; - shared_ptr s1; + SharedPtr s1; ASSERT_FALSE(s1); } From d89e4dce9d705366802d4dd1d947ea6ec1ee6ec0 Mon Sep 17 00:00:00 2001 From: morell5 Date: Sun, 28 Mar 2021 10:30:46 +0300 Subject: [PATCH 26/41] homework: Variant --- module-1/homework/Variant/CMakeLists.txt | 30 +++++++------ module-1/homework/Variant/task.md | 4 +- module-1/homework/Variant/tests.cpp | 24 ++++++----- module-1/homework/Variant/variant.h | 55 ++++++++++++------------ 4 files changed, 61 insertions(+), 52 deletions(-) diff --git a/module-1/homework/Variant/CMakeLists.txt b/module-1/homework/Variant/CMakeLists.txt index b04afad3..516469b8 100644 --- a/module-1/homework/Variant/CMakeLists.txt +++ b/module-1/homework/Variant/CMakeLists.txt @@ -4,9 +4,10 @@ include(GoogleTest) project("runner") -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) +################ gtest ################ configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . @@ -24,24 +25,29 @@ if(result) message(FATAL_ERROR "Build step for googletest failed: ${result}") endif() -# Prevent overriding the parent project's compiler/linker -# settings on Windows set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -# Add googletest directly to our build. This defines -# the gtest and gtest_main targets. add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src - ${CMAKE_CURRENT_BINARY_DIR}/googletest-build - EXCLUDE_FROM_ALL) + ${CMAKE_CURRENT_BINARY_DIR}/googletest-build + EXCLUDE_FROM_ALL) -# The gtest/gtest_main targets carry header search path -# dependencies automatically when using CMake 2.8.11 or -# later. Otherwise we have to add them here ourselves. if (CMAKE_VERSION VERSION_LESS 2.8.11) include_directories("${gtest_SOURCE_DIR}/include") endif() -# Now simply link against gtest or gtest_main as needed. Eg +################ Sanitizers ################ +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold -fsanitize=undefined,address -fno-sanitize-recover=all -O2 -Wall -Werror -Wsign-compare") + +################ clang-tidy ################ +set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-header-filter=.") + add_executable(runner tests.cpp variant.h) -target_link_libraries(runner gtest_main) + +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(runner) + +target_link_libraries(runner LINK_PUBLIC gtest_main) + add_test(NAME runner_test COMMAND runner) \ No newline at end of file diff --git a/module-1/homework/Variant/task.md b/module-1/homework/Variant/task.md index 331ccb6f..66180b54 100644 --- a/module-1/homework/Variant/task.md +++ b/module-1/homework/Variant/task.md @@ -5,6 +5,6 @@ [`Variant`](https://en.cppreference.com/w/cpp/utility/variant) - обощение типа **union** Реализовать функции: -* [`get`](https://en.cppreference.com/w/cpp/utility/variant/get) - получение значения в variant по индексу -* [`get`](https://en.cppreference.com/w/cpp/utility/variant/get) - получение значения в variant по типу +* [`Get`](https://en.cppreference.com/w/cpp/utility/variant/get) - получение значения в `Variant` по индексу +* [`Get`](https://en.cppreference.com/w/cpp/utility/variant/get) - получение значения в `Variant` по типу * [`operator=`](https://en.cppreference.com/w/cpp/utility/variant/operator%3D) - оператор присваивания значения \ No newline at end of file diff --git a/module-1/homework/Variant/tests.cpp b/module-1/homework/Variant/tests.cpp index f0e247db..a51fb1d9 100644 --- a/module-1/homework/Variant/tests.cpp +++ b/module-1/homework/Variant/tests.cpp @@ -1,30 +1,34 @@ #include #include -#include "variant.h" - #include "gtest/gtest.h" +#include "variant.h" TEST(Get, Test1) { - task::variant v; + task::Variant v; v = "Hello world"; - ASSERT_EQ(get(v),"Hello world"); + ASSERT_EQ(Get(v), "Hello world"); } TEST(Get, Test2) { - task::variant v; + task::Variant v; v = 12.0; - ASSERT_NEAR(get(v), 12.0, 1e-5); + ASSERT_NEAR(Get(v), 12.0, 1e-5); } TEST(Get, Test3) { - task::variant v; + task::Variant v; v = "Hello world"; - ASSERT_EQ(get<2>(v), "Hello world"); + ASSERT_EQ(Get<2>(v), "Hello world"); } TEST(Get, Test4) { - task::variant v; + task::Variant v; v = 12.0; - ASSERT_NEAR(get<1>(v), 12.0, 1e-5); + ASSERT_NEAR(Get<1>(v), 12.0, 1e-5); +} + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); } \ No newline at end of file diff --git a/module-1/homework/Variant/variant.h b/module-1/homework/Variant/variant.h index 428e1966..647742e7 100644 --- a/module-1/homework/Variant/variant.h +++ b/module-1/homework/Variant/variant.h @@ -1,49 +1,48 @@ #include +#include #pragma once namespace task { -template -class variant; +template +class Variant; -template -struct variant_alternative; +template +struct VariantAlternative; -template -using variant_alternative_t = typename variant_alternative::type; +template +using variant_alternative_t = typename VariantAlternative::type; -template -struct variant_alternative> { +template +struct VariantAlternative> { using type = // Your code goes here }; -template -class variant { - - public: - +template +class Variant { +public: // Special member functions - constexpr variant() noexcept; - - template - variant& operator=( T&& t ) noexcept; - - private: + constexpr Variant() noexcept; + + template + Variant& operator=(T&& t) noexcept; + +private: // Your code goes here }; // Non-member functions -template -constexpr variant_alternative_t>& get(variant& v); +template +constexpr const variant_alternative_t>& Get(Variant& v); -template -constexpr variant_alternative_t>&& get(variant&& v); +template +constexpr variant_alternative_t>&& Get(Variant&& v); -template -constexpr T& get(variant& v); +template +constexpr const T& Get(Variant& v); -template -constexpr T&& get( variant&& v ); +template +constexpr T&& Get(Variant&& v); -}; \ No newline at end of file +}; // namespace task \ No newline at end of file From 7540ea86c57961a3e5741ea2227cd2fb859cfddd Mon Sep 17 00:00:00 2001 From: morell5 Date: Sun, 28 Mar 2021 11:25:27 +0300 Subject: [PATCH 27/41] homework: TypeTraits --- module-1/homework/TypeTraits/CMakeLists.txt | 22 +++- module-1/homework/TypeTraits/task.md | 6 +- module-1/homework/TypeTraits/tests.cpp | 115 ++++++++++-------- .../TypeTraits/type_traits/CMakeLists.txt | 10 +- .../type_traits/is_copy_constructible.h | 46 ++++--- .../is_nothrow_move_constructible.h | 30 ++--- .../TypeTraits/type_traits/move_if_noexcept.h | 27 ++-- .../homework/TypeTraits/type_traits/utility.h | 42 +++---- 8 files changed, 162 insertions(+), 136 deletions(-) diff --git a/module-1/homework/TypeTraits/CMakeLists.txt b/module-1/homework/TypeTraits/CMakeLists.txt index 7f228dd5..7320c77f 100644 --- a/module-1/homework/TypeTraits/CMakeLists.txt +++ b/module-1/homework/TypeTraits/CMakeLists.txt @@ -1,12 +1,13 @@ cmake_minimum_required(VERSION 3.16) -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - include(GoogleTest) project("runner") +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +################ gtest ################ configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . @@ -34,8 +35,21 @@ if (CMAKE_VERSION VERSION_LESS 2.8.11) include_directories("${gtest_SOURCE_DIR}/include") endif() -add_subdirectory(type_traits) +################ Sanitizers ################ +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold -fsanitize=undefined,address -fno-sanitize-recover=all -O2 -Wall -Werror -Wsign-compare") + +################ clang-tidy ################ +set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-header-filter=.") + add_executable(runner tests.cpp) + +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(runner) + +add_subdirectory(type_traits) + target_link_libraries(runner LINK_PUBLIC type_traits gtest_main) add_test(NAME runner_test COMMAND runner) \ No newline at end of file diff --git a/module-1/homework/TypeTraits/task.md b/module-1/homework/TypeTraits/task.md index 1b228e07..8e65baf1 100644 --- a/module-1/homework/TypeTraits/task.md +++ b/module-1/homework/TypeTraits/task.md @@ -3,9 +3,9 @@ ## Задание Реализовать: -* [std::is_copy_constructible](https://en.cppreference.com/w/cpp/types/is_copy_constructible) -* [std::is_nothrow_move_constructible](https://en.cppreference.com/w/cpp/types/is_move_constructible) -* [std::move_if_noexcept](https://en.cppreference.com/w/cpp/utility/move_if_noexcept) +* [IsCopyConstructible](https://en.cppreference.com/w/cpp/types/is_copy_constructible) +* [IsNoThrowMoveConstructible](https://en.cppreference.com/w/cpp/types/is_move_constructible) +* [MoveIfNoExcept](https://en.cppreference.com/w/cpp/utility/move_if_noexcept) Реализация в соответсвующих header файлах diff --git a/module-1/homework/TypeTraits/tests.cpp b/module-1/homework/TypeTraits/tests.cpp index adfa97f4..d9e810d2 100644 --- a/module-1/homework/TypeTraits/tests.cpp +++ b/module-1/homework/TypeTraits/tests.cpp @@ -3,125 +3,138 @@ #include #include +#include "gtest/gtest.h" #include "type_traits/is_copy_constructible.h" #include "type_traits/is_nothrow_move_constructible.h" #include "type_traits/move_if_noexcept.h" -#include "gtest/gtest.h" - -TEST(is_constructible, Test1) { +TEST(IsConstructible, Test1) { class Foo { - private: - int v1; - double v2; public: - Foo(int n) : v1(n), v2() {} - Foo(int n, double f) noexcept : v1(n), v2(f) {} + explicit Foo(int32_t n) : v1_(n), v2_() { + } + Foo(int32_t n, double f) noexcept : v1_(n), v2_(f) { + } + void Bar() { + v1_ = 0; + v2_ = 0; + } + + private: + int32_t v1_; + double v2_; }; - static_assert(is_constructible::value, "expected true"); + static_assert(IsConstructible::value, "expected true"); } -TEST(is_constructible, Test2) { +TEST(IsConstructible, Test2) { - static_assert(is_constructible::value, "expected true"); + static_assert(IsConstructible::value, "expected true"); } -TEST(is_constructible, Test3) { - +TEST(IsConstructible, Test3) { + struct Base {}; struct Derived : Base {}; - static_assert(!is_constructible::value, "expected false"); + static_assert(!IsConstructible::value, "expected false"); - static_assert(is_constructible::value, "expected true"); + static_assert(IsConstructible::value, "expected true"); } -TEST(is_constructible, Test4) { - +TEST(IsConstructible, Test4) { + struct Foo {}; - static_assert(!is_constructible::value, "expected false"); + static_assert(!IsConstructible::value, "expected false"); - static_assert(is_constructible::value, "expected true"); + static_assert(IsConstructible::value, "expected true"); - static_assert(!is_constructible::value, "expected false"); + static_assert(!IsConstructible::value, "expected false"); } -TEST(is_constructible, Test5) { - +TEST(IsConstructible, Test5) { + struct Foo {}; - static_assert(is_constructible::value, "expected true"); + static_assert(IsConstructible::value, "expected true"); - static_assert(!is_constructible::value, "expected false"); + static_assert(!IsConstructible::value, "expected false"); - static_assert(is_constructible::value, "expected true"); + static_assert(IsConstructible::value, "expected true"); } -TEST(is_constructible, Test6) { - +TEST(IsConstructible, Test6) { + struct Foo {}; - static_assert(is_constructible::value, "expected true"); + static_assert(IsConstructible::value, "expected true"); - static_assert(is_constructible::value, "expected true"); + static_assert(IsConstructible::value, "expected true"); - static_assert(is_constructible::value, "expected true"); + static_assert(IsConstructible::value, "expected true"); } -TEST(is_nothrow_move_constructible, Test1) { - +TEST(IsNoThrowMoveConstructible, Test1) { + struct Foo { std::string str; }; - static_assert(is_nothrow_move_constructible::value, "expected true"); + static_assert(IsNoThrowMoveConstructible::value, "expected true"); } -TEST(is_nothrow_move_constructible, Test2) { - +TEST(IsNoThrowMoveConstructible, Test2) { + struct Foo { - int n; Foo(Foo&&) = default; + + int32_t n; }; - static_assert(is_nothrow_move_constructible::value, "expected true"); + static_assert(IsNoThrowMoveConstructible::value, "expected true"); } -TEST(is_nothrow_move_constructible, Test3) { - +TEST(IsNoThrowMoveConstructible, Test3) { + struct Foo { - Foo(const Foo&) {} + Foo(const Foo&) { + } }; - static_assert(!is_nothrow_move_constructible::value, "expected true"); + static_assert(!IsNoThrowMoveConstructible::value, "expected true"); } -TEST(move_if_noexcept, Test1) { - +TEST(MoveIfNoExcept, Test1) { + struct ThrowFoo { bool copy = false; ThrowFoo() = default; - ThrowFoo(ThrowFoo&&) {}; - ThrowFoo(const ThrowFoo&) { copy = true; }; + ThrowFoo(ThrowFoo&&){}; + ThrowFoo(const ThrowFoo&) { + copy = true; + }; }; ThrowFoo foo; - ThrowFoo foo2 = move_if_noexcept(foo); + ThrowFoo foo2 = MoveIfNoExcept(foo); ASSERT_TRUE(foo2.copy); } -TEST(move_if_noexcept, Test2) { - +TEST(MoveIfNoExcept, Test2) { + struct NonThrowFoo { - bool copy = false; NonThrowFoo() = default; NonThrowFoo(NonThrowFoo&&) noexcept {}; - NonThrowFoo(const NonThrowFoo&) noexcept { copy = true; }; + NonThrowFoo(const NonThrowFoo&) noexcept { + copy = true; + }; + + bool copy = false; }; NonThrowFoo foo; - NonThrowFoo foo2 = move_if_noexcept(foo); + NonThrowFoo foo2 = MoveIfNoExcept(foo); ASSERT_FALSE(foo2.copy); } \ No newline at end of file diff --git a/module-1/homework/TypeTraits/type_traits/CMakeLists.txt b/module-1/homework/TypeTraits/type_traits/CMakeLists.txt index 5899089e..55b81fe6 100644 --- a/module-1/homework/TypeTraits/type_traits/CMakeLists.txt +++ b/module-1/homework/TypeTraits/type_traits/CMakeLists.txt @@ -1,7 +1,11 @@ cmake_minimum_required(VERSION 3.16) -project("runner") +project(runner) -add_library(type_traits INTERFACE) +add_library(type_traits is_copy_constructible.h is_nothrow_move_constructible.h move_if_noexcept.h utility.h) +set_target_properties(type_traits PROPERTIES LINKER_LANGUAGE CXX) -target_include_directories(type_traits INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file +################ clang-format ################ +list(APPEND CMAKE_MODULE_PATH $ENV{CLANG_FORMAT_SUBMODULE}/cmake) +include(ClangFormat) +target_clangformat_setup(type_traits) \ No newline at end of file diff --git a/module-1/homework/TypeTraits/type_traits/is_copy_constructible.h b/module-1/homework/TypeTraits/type_traits/is_copy_constructible.h index 794f3771..b02d9f02 100644 --- a/module-1/homework/TypeTraits/type_traits/is_copy_constructible.h +++ b/module-1/homework/TypeTraits/type_traits/is_copy_constructible.h @@ -1,42 +1,38 @@ -# pragma once +#pragma once #include #include #include "utility.h" -template -struct is_constructible_impl; +template +struct LibCppIsConstructible; -template -struct is_invalid_base_to_derived_cast { - ... +template +struct IsInvalidBaseToDerivedCast { + // Your code goes here }; -template -struct is_invalid_lvalue_to_rvalue_cast : std::false_type { - ... +template +struct IsInvalidLvalueToRvalueCast : std::false_type { + // Your code goes here }; -template -struct is_invalid_lvalue_to_rvalue_cast { - ... +template +struct IsInvalidLvalueToRvalueCast { + // Your code goes here }; -struct is_constructible_helper { - ... +struct IsConstructibleHelper { + // Your code goes here }; -template -struct is_constructible_impl { - ... -}; - -// is_constructible_impl - partial specializations -... +// LibCppIsConstructible - partial specializations +// Your code goes here +// LibCppIsConstructible - partial specializations -template -struct is_constructible {...}; +template +struct IsConstructible : // Your code goes here {...} -template -struct is_copy_constructible {...}; \ No newline at end of file +template +struct IsCopyConstructible : // Your code goes here {...} \ No newline at end of file diff --git a/module-1/homework/TypeTraits/type_traits/is_nothrow_move_constructible.h b/module-1/homework/TypeTraits/type_traits/is_nothrow_move_constructible.h index fb9cf1c1..bd749521 100644 --- a/module-1/homework/TypeTraits/type_traits/is_nothrow_move_constructible.h +++ b/module-1/homework/TypeTraits/type_traits/is_nothrow_move_constructible.h @@ -1,27 +1,23 @@ -#pragma once +#pragma once #include #include "is_copy_constructible.h" #include "utility.h" -// -template struct is_nothrow_constructible_impl; +// +template +struct LibCppIsNoThrowConstructible; -// is_nothrow_constructible_impl - partial specializations -... +// LibCppIsNoThrowConstructible - partial specializations +// Your code goes here +// LibCppIsNoThrowConstructible - partial specializations -template -struct is_nothrow_constructible { - ... -}; +template +struct IsNoThrowConstructible : // Your code goes here {...} -template -struct is_nothrow_constructible { - ... -}; +template +struct IsNoThrowConstructible : // Your code goes here {...} -template -struct is_nothrow_move_constructible { - ... -}; \ No newline at end of file +template +struct IsNoThrowMoveConstructible : // Your code goes here {...} \ No newline at end of file diff --git a/module-1/homework/TypeTraits/type_traits/move_if_noexcept.h b/module-1/homework/TypeTraits/type_traits/move_if_noexcept.h index b5fa23d9..4ce67cec 100644 --- a/module-1/homework/TypeTraits/type_traits/move_if_noexcept.h +++ b/module-1/homework/TypeTraits/type_traits/move_if_noexcept.h @@ -1,4 +1,4 @@ -# pragma once +#pragma once #include #include @@ -7,16 +7,23 @@ #include "is_nothrow_move_constructible.h" #include "utility.h" -// conditional -template -struct conditional { - ... +template +struct Conditional { + // Your code goes here }; -// conditional - partial specialization -... +// Conditional - partial specialization +// Your code goes here +// Conditional - partial specialization -template -using conditional_v = ... +template +struct Conditional { + using type = T; +}; + +template +using conditional_v = // Your code goes here -// move_if_noexcept \ No newline at end of file +// MoveIfNoExcept +// Your code goes here +// MoveIfNoExcept \ No newline at end of file diff --git a/module-1/homework/TypeTraits/type_traits/utility.h b/module-1/homework/TypeTraits/type_traits/utility.h index e48decbb..1f0dc419 100644 --- a/module-1/homework/TypeTraits/type_traits/utility.h +++ b/module-1/homework/TypeTraits/type_traits/utility.h @@ -1,36 +1,32 @@ -# pragma once +#pragma once #include #include -template -struct uncvref { - ... +template +struct Uncvref { + // Your code goes here }; -template -using uncvref_t = ...; +template +using uncvref_t = // Your code goes here -template -struct add_const { - ... +template +struct AddConst { + using type = // Your code goes here }; -template -using add_const_t = ...; +template +using add_const_t = // Your code goes here -template -struct add_lvalue_reference { - ... -}; +template +struct AddLvalueReference : // Your code goes here -template -struct add_rvalue_reference { - ... -}; +template +struct AddRvalueReference : // Your code goes here -template -using add_lvalue_reference_t = ... +template +using add_lvalue_reference_t = // Your code goes here -template -using add_rvalue_reference_t = ... \ No newline at end of file +template +using add_rvalue_reference_t = // Your code goes here \ No newline at end of file From 2374682e8f752f29141138d1f9a0edba14dc1bfa Mon Sep 17 00:00:00 2001 From: morell5 Date: Fri, 9 Apr 2021 16:01:44 +0300 Subject: [PATCH 28/41] seminars: 23 added --- module-1/seminars/seminar23/.gitignore | 1 + module-1/seminars/seminar23/0_min_element.cpp | 32 ++++++ ...10_min_element_requirements_extraction.cpp | 32 ++++++ .../11_min_element_concepts_extraction.cpp | 27 +++++ .../12_min_element_concept_implementation.cpp | 56 ++++++++++ ...3_min_element_concept_alternative_impl.cpp | 44 ++++++++ .../14_overconstraining_overgeneralizing.cpp | 18 +++ .../seminar23/15_what_we_can_constrain.cpp | 103 ++++++++++++++++++ .../seminars/seminar23/16_specializations.cpp | 45 ++++++++ module-1/seminars/seminar23/1_min_element.cpp | 19 ++++ .../seminars/seminar23/2_min_element_ptr.cpp | 20 ++++ .../seminars/seminar23/4_min_element_auto.cpp | 26 +++++ .../5_min_element_template_parameter.cpp | 29 +++++ module-1/seminars/seminar23/6_vector_ref.cpp | 28 +++++ .../7_syntactic_semantic_requirements.cpp | 21 ++++ .../seminar23/8_language_construction.cpp | 12 ++ .../seminar23/9_operations_for _concept.cpp | 13 +++ module-1/seminars/seminar23/CMakeLists.txt | 8 ++ module-1/seminars/seminar23/intro.cpp | 19 ++++ 19 files changed, 553 insertions(+) create mode 100644 module-1/seminars/seminar23/.gitignore create mode 100644 module-1/seminars/seminar23/0_min_element.cpp create mode 100644 module-1/seminars/seminar23/10_min_element_requirements_extraction.cpp create mode 100644 module-1/seminars/seminar23/11_min_element_concepts_extraction.cpp create mode 100644 module-1/seminars/seminar23/12_min_element_concept_implementation.cpp create mode 100644 module-1/seminars/seminar23/13_min_element_concept_alternative_impl.cpp create mode 100644 module-1/seminars/seminar23/14_overconstraining_overgeneralizing.cpp create mode 100644 module-1/seminars/seminar23/15_what_we_can_constrain.cpp create mode 100644 module-1/seminars/seminar23/16_specializations.cpp create mode 100644 module-1/seminars/seminar23/1_min_element.cpp create mode 100644 module-1/seminars/seminar23/2_min_element_ptr.cpp create mode 100644 module-1/seminars/seminar23/4_min_element_auto.cpp create mode 100644 module-1/seminars/seminar23/5_min_element_template_parameter.cpp create mode 100644 module-1/seminars/seminar23/6_vector_ref.cpp create mode 100644 module-1/seminars/seminar23/7_syntactic_semantic_requirements.cpp create mode 100644 module-1/seminars/seminar23/8_language_construction.cpp create mode 100644 module-1/seminars/seminar23/9_operations_for _concept.cpp create mode 100644 module-1/seminars/seminar23/CMakeLists.txt create mode 100644 module-1/seminars/seminar23/intro.cpp diff --git a/module-1/seminars/seminar23/.gitignore b/module-1/seminars/seminar23/.gitignore new file mode 100644 index 00000000..c795b054 --- /dev/null +++ b/module-1/seminars/seminar23/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/module-1/seminars/seminar23/0_min_element.cpp b/module-1/seminars/seminar23/0_min_element.cpp new file mode 100644 index 00000000..83a3410e --- /dev/null +++ b/module-1/seminars/seminar23/0_min_element.cpp @@ -0,0 +1,32 @@ +// Overloading allows to extend the domain of the function +// Problem: overloading does not give you facilities to change function semantic + +int* MinElement(int* first, int* last) { + if (first == last) { + return first; + } + int* min = first; + while (++first != last) { + if (*first < *min) { + min = first; + } + } + return min; +} + +double* MinElement(double* first, double* last) { + if (first == last) { + return first; + } + double* min = first; + while (++first != last) { + if (*first < *min) { + min = first; + } + } + return min; +} + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/10_min_element_requirements_extraction.cpp b/module-1/seminars/seminar23/10_min_element_requirements_extraction.cpp new file mode 100644 index 00000000..de973b0e --- /dev/null +++ b/module-1/seminars/seminar23/10_min_element_requirements_extraction.cpp @@ -0,0 +1,32 @@ + +#include +#include + +// Let's write down our requirements for Iter: +// 1. return first (Move constructible) +// 2. Iter min = first (Copy constructible) +// 3. min = first (CopyAssignable) +// 4. first == last (Equality) + + +// 5. ++first (Incrementable) +// 6. *first < *min (Dereferencable) + +template +Iter MinElement(Iter first, Iter last) { + if (first == last) { + return first; + } + Iter min = first; + while (++first != last) { + if (*first < *min) { + min = first; + } + } + return min; +} + + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/11_min_element_concepts_extraction.cpp b/module-1/seminars/seminar23/11_min_element_concepts_extraction.cpp new file mode 100644 index 00000000..79090331 --- /dev/null +++ b/module-1/seminars/seminar23/11_min_element_concepts_extraction.cpp @@ -0,0 +1,27 @@ + +#include +#include + +// Let's write down our concepts +// Concepts for Iter: +// -Regular +// -ForwardIterator + +template +Iter* MinElement(Iter* first, Iter* last) { + if (first == last) { + return first; + } + Iter* min = first; + while (++first != last) { + if (*first < *min) { + min = first; + } + } + return min; +} + + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/12_min_element_concept_implementation.cpp b/module-1/seminars/seminar23/12_min_element_concept_implementation.cpp new file mode 100644 index 00000000..68a2ff35 --- /dev/null +++ b/module-1/seminars/seminar23/12_min_element_concept_implementation.cpp @@ -0,0 +1,56 @@ +#include +#include +#include + +// Concepts as constraints +// Anything template argument must satisfy the syntactic and semantic requirement of ForwardIterator +// -Regular +// -Incrementable +// -Dereferencable + + +// Application benefit: we can use a constrained declration (here we talk about the moment of a template instantiation) +// if is constraints are satisfied +// Example: MinElement(1, 2) <- instantiation of the MinElement with pair of ints -> +// -> Instantiation fails because T=int does not satisfy one of the ForwardIterator requirement: +// an object of T must be dereferenceable + +template +concept forward_iterator = + std::equality_comparable && requires(I i) { + typename std::incrementable_traits::difference_type; + typename std::indirectly_readable_traits::value_type; + typename std::common_reference_t&&, + typename std::indirectly_readable_traits::value_type&>; + *i++; + typename std::common_reference_t::value_type&>; + requires std::signed_integral::difference_type>; + }; + +template +requires forward_iterator && std::totally_ordered +Iter MinElement(Iter first, Iter last) { + if (first == last) { + return first; + } + Iter min = first; + while (++first != last) { + if (*first < *min) { + min = first; + } + } + return min; +} + +int main() { + int32_t p[] = {10, 1, 2}; + std::vector v{10, -1, 2}; + // OK: + std::cout << *MinElement(p, p+2) << std::endl; + // OK: + std::cout << *MinElement(v.begin(), v.end()) << std::endl; + // CE: the required expression '*(i ++)' is invalid (i is an object of int) + //std::cout << MinElement(1, 2) << std::endl; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/13_min_element_concept_alternative_impl.cpp b/module-1/seminars/seminar23/13_min_element_concept_alternative_impl.cpp new file mode 100644 index 00000000..7e9116bf --- /dev/null +++ b/module-1/seminars/seminar23/13_min_element_concept_alternative_impl.cpp @@ -0,0 +1,44 @@ +#include +#include +#include + +template +concept forward_iterator = + std::equality_comparable && requires(I i) { + typename std::incrementable_traits::difference_type; + typename std::indirectly_readable_traits::value_type; + typename std::common_reference_t&&, + typename std::indirectly_readable_traits::value_type&>; + *i++; + typename std::common_reference_t::value_type&>; + requires std::signed_integral::difference_type>; + }; + +// It is more convenient to move forward_iterator to the template parameter list +template +requires std::totally_ordered +Iter MinElement(Iter first, Iter last) { + if (first == last) { + return first; + } + Iter min = first; + while (++first != last) { + if (*first < *min) { + min = first; + } + } + return min; +} + +int main() { + int32_t p[] = {10, 1, 2}; + std::vector v{10, -1, 2}; + // OK: + std::cout << *MinElement(p, p+2) << std::endl; + // OK: + std::cout << *MinElement(v.begin(), v.end()) << std::endl; + // CE: the required expression '*(i ++)' is invalid (i is an object of int) + //std::cout << MinElement(1, 2) << std::endl; + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/14_overconstraining_overgeneralizing.cpp b/module-1/seminars/seminar23/14_overconstraining_overgeneralizing.cpp new file mode 100644 index 00000000..9d65c22e --- /dev/null +++ b/module-1/seminars/seminar23/14_overconstraining_overgeneralizing.cpp @@ -0,0 +1,18 @@ +#include +#include +#include + +int main() { + // We should not expose implementation details + // We should find generic constraints and expose them + + + // Overconstraining is not a bad thing: + // 1. start with abstractions that have strong requirements + // 2. allows greater freedom in implementation details + + + // We should not overgeneralizing templates + // 1. weaker semantics; make it harder to reason about the behavior + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/15_what_we_can_constrain.cpp b/module-1/seminars/seminar23/15_what_we_can_constrain.cpp new file mode 100644 index 00000000..e9ada9b1 --- /dev/null +++ b/module-1/seminars/seminar23/15_what_we_can_constrain.cpp @@ -0,0 +1,103 @@ +#include +#include +#include +#include +#include + +// Constraining classes +template +concept ObjectType = std::is_object::value; +template > +class Vector { + +}; + +void VectorExmaple() { + // OK! + Vector v1; + + // CE: template constraint failure for 'template requires ObjectType class Vector' + // Vector v2; + + // CE: template constraint failure for 'template requires ObjectType class Vecto + // Vector* p; +} + +// Constrainting variable templates +template +concept FloatingPoint = std::is_floating_point_v; +template T pi = 3.1451; + +void VariableExample() { + std::cout << pi << std::endl; + std::cout << pi << std::endl; +} + +// Constraining alias templates +template +using VectorAlias = std::vector; + +void AliasExample() { + VectorAlias v; + + // CE: error: template constraint failure for 'template requires ObjectType + // VectorAlias v; +} + +template +concept ConvertibleTo = + std::is_convertible_v && + requires(std::add_rvalue_reference_t (&f)()) { + static_cast(f()); + }; + +// Constraining template members +template +struct Pair { + template X, ConvertibleTo Y> + Pair(const X& x, const Y& y) : + first(x), + second(y) + {} + + T first; + U second; +}; + +void TemplateMembersExample() { + // OK! + Pair p1('a', 'b'); + // CE: + Pair p2(nullptr, 0); +} + + +// Non-template members +// Non-template members +template +concept Copyable = + std::copy_constructible && + std::movable && + std::assignable_from && + std::assignable_from && + std::assignable_from; + +template +struct Pair { + Pair() = default; + + Pair(const Pair& p) requires Copyable && Copyable + : first(p.first), second(p.second) {}; + T first; + U second; +}; + +void NonTemplateMembersExample() { + Pair, int> p1; + // CE: required for the satisfaction of 'copy_constructible' [with T = std::unique_ptr, int> p2{p1}; +} + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/16_specializations.cpp b/module-1/seminars/seminar23/16_specializations.cpp new file mode 100644 index 00000000..63ac30c6 --- /dev/null +++ b/module-1/seminars/seminar23/16_specializations.cpp @@ -0,0 +1,45 @@ +#include +#include +#include +#include + +// We need to implement RandomAccessContainer concept ... + +// type-based specialization - we overload operations for specific types +// that have more efficient implementation strategies +template +void Sort(Cont& vec) { + std::sort(vec.begin(), vec.end()); +} + +template > +void Sort(std::list& lst) { + std::vector vec(lst.begin(), lst.end()); + std::sort(vec.begin(), vec.end()); + std::copy(vec.begin(), vec.end(), lst.begin()); +} + +// concept-based specialization - overload operations for concepts with more stronger requirements +// Example: BidirectionalIterator refines ForwardIterator + +// We need to implement InputIterator concept... + +template +int Distance(Iter first, Iter last) { + int n = 0; + while (first != last) { + ++n; + } + return n; +} + +// We need to implement InputIterator concept... + +template +int Distance(Iter first, Iter last) { + return last - first; +} + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/1_min_element.cpp b/module-1/seminars/seminar23/1_min_element.cpp new file mode 100644 index 00000000..f67162b0 --- /dev/null +++ b/module-1/seminars/seminar23/1_min_element.cpp @@ -0,0 +1,19 @@ +double* MinElement(double* first, double* last) { + if (first == last) { + return first; + } + double* min = first; + while (++first != last) { + // Problem: comparing double not actually get defined behaviour + // Reason: floating point numbers have not a number + // Solution: add restrictions + if (*first < *min) { + min = first; + } + } + return min; +} + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/2_min_element_ptr.cpp b/module-1/seminars/seminar23/2_min_element_ptr.cpp new file mode 100644 index 00000000..2e82a4c0 --- /dev/null +++ b/module-1/seminars/seminar23/2_min_element_ptr.cpp @@ -0,0 +1,20 @@ +int** MinElement(int** first, int** last) { + if (first == last) { + return first; + } + int** min = first; + while (++first != last) { + // We have some difficulties in interpretation of the expression (*first < *min) + if (*first < *min) { + min = first; + } + } + return min; +} + +// Conclusion: we take a single algorithm and extended it a bunch of times -> now we have different domains +// we have figure out how all of it fits same syntactic pattern -> we can make it generic + +int main() { + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/4_min_element_auto.cpp b/module-1/seminars/seminar23/4_min_element_auto.cpp new file mode 100644 index 00000000..2550e51b --- /dev/null +++ b/module-1/seminars/seminar23/4_min_element_auto.cpp @@ -0,0 +1,26 @@ +// You want your code more generic? +#include +#include + +// Auto to the rescue +// This algorithm is overly general! +auto MinElement(auto first, auto last) { + if (first == last) { + return first; + } + auto min = first; + while (++first != last) { + if (*first < *min) { + min = first; + } + } + return min; +} + +int main() { + int a[] = {5, 4, -1, 1, 2}; + int* p = MinElement(a, a + 5); + assert(p == &a[2]); + std::cout << *(p); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/5_min_element_template_parameter.cpp b/module-1/seminars/seminar23/5_min_element_template_parameter.cpp new file mode 100644 index 00000000..566b4f61 --- /dev/null +++ b/module-1/seminars/seminar23/5_min_element_template_parameter.cpp @@ -0,0 +1,29 @@ +#include +#include + +// What about to introduce the template parameter? +// And this algorithm is still overly generic + +// Problem: we cannot say what can be under the Iter + +template +Iter MinElement(Iter first, Iter last) { + if (first == last) { + return first; + } + Iter min = first; + while (++first != last) { + if (*first < *min) { + min = first; + } + } + return min; +} + +int main() { + int a[] = {5, 4, -1, 1, 2}; + int* p = MinElement(a, a + 5); + assert(p == &a[2]); + std::cout << *(p); + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/6_vector_ref.cpp b/module-1/seminars/seminar23/6_vector_ref.cpp new file mode 100644 index 00000000..24d0cc4f --- /dev/null +++ b/module-1/seminars/seminar23/6_vector_ref.cpp @@ -0,0 +1,28 @@ + +#include +#include + +int main() { + std::vector vec; + + // CE: + // Reason: ptr to a reference; but ... this is a symptom + // with gcc 10.1.0 you will see + // /opt/wandbox/gcc-10.1.0/include/c++/10.1.0/bits/alloc_traits.h:416:13: error: forming pointer to reference type 'int&' + // 416 | using pointer = _Tp*; + // + // Yes, the output to the terminal is long, but if you search, you will find the line with error message =) + // + // Fundamental reason: "int32_t& IS NOT AN OBJECT" + + // What do we want? + // We want: to see the following error message "int& IS NOT AN OBJECT" + + // How will we solve the problem? + // Concepts to the rescue! + // 1. Declare concept + // 2. Put the concept to the requirements for the type when you write your container + + // Note: Concepts can't customize error messages yet, but they still will help us + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/7_syntactic_semantic_requirements.cpp b/module-1/seminars/seminar23/7_syntactic_semantic_requirements.cpp new file mode 100644 index 00000000..1e110b17 --- /dev/null +++ b/module-1/seminars/seminar23/7_syntactic_semantic_requirements.cpp @@ -0,0 +1,21 @@ + +#include +#include + +int main() { + // What is a concept? + // A named predicate expressing requirements on template arguments + // Syntactic requirements - what operations, associated types are needed + // Semantic requirements - behaviours are required of operations + // Complexity requirements - perfomance requirements of operations + + // Ex. ForwardIterator: + // For some value i - this is semantic requirement + // Syntactic requirement: "++i" must be correct expression + // Semantic requirement: + // 1. when you make ++ "i" moves to the next element + // 2. you can dereference "i" to access an element in the range unless + // it's the last element in the range + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/8_language_construction.cpp b/module-1/seminars/seminar23/8_language_construction.cpp new file mode 100644 index 00000000..93ef3f79 --- /dev/null +++ b/module-1/seminars/seminar23/8_language_construction.cpp @@ -0,0 +1,12 @@ + +#include +#include + +int main() { + // What meaningful construction do we want to add to the language so that it can be used? + // our consciousness tells us: + // ForwardIterator + // if T models ForwardIterator requirements -> return yes + // if T does not model ForwardIterator requirements -> return no + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/9_operations_for _concept.cpp b/module-1/seminars/seminar23/9_operations_for _concept.cpp new file mode 100644 index 00000000..766b2a0c --- /dev/null +++ b/module-1/seminars/seminar23/9_operations_for _concept.cpp @@ -0,0 +1,13 @@ + +#include +#include + +int main() { + // A constraint is a logical expression, that says if we can use a type with a template + // (conjunction or disjunction) + + // Also we want to compose our concepts -> thus we need add && + MutableIterator = ForwardIterator && OutputIterator + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar23/CMakeLists.txt b/module-1/seminars/seminar23/CMakeLists.txt new file mode 100644 index 00000000..2b488911 --- /dev/null +++ b/module-1/seminars/seminar23/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +project("runner") + +add_executable(runner 0_spec) \ No newline at end of file diff --git a/module-1/seminars/seminar23/intro.cpp b/module-1/seminars/seminar23/intro.cpp new file mode 100644 index 00000000..99fbd75a --- /dev/null +++ b/module-1/seminars/seminar23/intro.cpp @@ -0,0 +1,19 @@ +// The C+20 concept library is not supported by all compilers (01.04.2021) +// LLVM: +// std::totally_ordered was added 02.04.2021 (https://github.com/llvm/llvm-project/commit/7959d59028dd126416cdf10dbbd22162922e1336) +// thus clang 13.0.0 HEAD(fcdf7f6224610a51dc2ff47f2f1e3377329b64a7) +// does not support std::totally_ordered https://github.com/llvm/llvm-project/commit/fcdf7f6224610a51dc2ff47f2f1e3377329b64a7 +// +// GCC: +// std::totally_ordered was add may in 2020: +// https://github.com/gcc-mirror/gcc/commit/c9313582d82e0768a3a68250dc97d82a9ad3c116#diff-d31b758993c80e8ffbae4f72d59f9b40674080760ff2d7092a9bb2107d5c9786 +// +// +// C++20 contracts (expects, ensures, assert) is not supported by any compiler (01.04.2021) +// Standard: https://doc.bccnsoft.com/docs/cppreference2018/en/cpp/language/attributes/contract.html +// There is a custom implementation for clang and proposal to clang: +// Proposal: https://llvm.org/devmtg/2019-04/slides/Poster-Lopez-Gomez-Adding_support_for_C++_contracts_to_Clang.pdf +// Implementation: https://github.com/arcosuc3m/clang-contracts/ +int main() { + return 0; +} \ No newline at end of file From 33108c02c5987adcc4ebed3a8d40e86993af6175 Mon Sep 17 00:00:00 2001 From: morell5 Date: Sun, 11 Apr 2021 17:57:15 +0300 Subject: [PATCH 29/41] ci.yml: fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aaea8ea0..62b3de31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - name: tests env: - CLANG_FORMAT_SUBMODULE: /home/runner/work/HSE-Course-Private/HSE-Course-Private/clangformat-cmake + CLANG_FORMAT_SUBMODULE: /home/runner/work/HSE-Course/HSE-Course/clangformat-cmake TITLE: ${{github.event.pull_request.title}} working-directory: ./module-1/homework/ run: sudo apt-get install -y clang-tidy && From 6d94f6de698fd4ee68c1fb1eee1781ebaa2cb7e8 Mon Sep 17 00:00:00 2001 From: morell5 Date: Mon, 12 Apr 2021 19:44:18 +0300 Subject: [PATCH 30/41] seminars: 3-8 added --- module-1/seminars/seminar3/README.md | 5 + module-1/seminars/seminar4/README.md | 31 ++++ module-1/seminars/seminar5/README.md | 28 ++++ module-1/seminars/seminar6-8/README.md | 6 + module-1/seminars/seminar6-8/mediator.cpp | 177 +++++++++++++++++++++ module-1/seminars/seminar6-8/observer.cpp | 42 +++++ module-1/seminars/seminar6-8/prototype.cpp | 137 ++++++++++++++++ 7 files changed, 426 insertions(+) create mode 100644 module-1/seminars/seminar3/README.md create mode 100644 module-1/seminars/seminar4/README.md create mode 100644 module-1/seminars/seminar5/README.md create mode 100644 module-1/seminars/seminar6-8/README.md create mode 100644 module-1/seminars/seminar6-8/mediator.cpp create mode 100644 module-1/seminars/seminar6-8/observer.cpp create mode 100644 module-1/seminars/seminar6-8/prototype.cpp diff --git a/module-1/seminars/seminar3/README.md b/module-1/seminars/seminar3/README.md new file mode 100644 index 00000000..7b6b27c1 --- /dev/null +++ b/module-1/seminars/seminar3/README.md @@ -0,0 +1,5 @@ +# Seminar + +Разобран паттерн [Flyweight](https://refactoring.guru/design-patterns/flyweight). + +Реализовали [пример](https://refactoring.guru/design-patterns/flyweight/cpp/example) \ No newline at end of file diff --git a/module-1/seminars/seminar4/README.md b/module-1/seminars/seminar4/README.md new file mode 100644 index 00000000..113d9a49 --- /dev/null +++ b/module-1/seminars/seminar4/README.md @@ -0,0 +1,31 @@ +# Seminar + +Разобран паттерн [Builder](https://refactoring.guru/design-patterns/builder) + +Код не сохранился + +Формулировка задачи: + + +Требуется на карте отслеживать: +* расположение имеющихся поездов +* поезда из 8 вагонов +* отслеживание по координатам головного вагона +* система координат локальная: считаем землю плоской +* начало отсчета от красной площади + +Начинаем создавать инфраструктуру, описывающую задачу: классы и логику их взаимодействия + +Каждый Builder переопределяет методы для: +* построения сидений +* построения окон +* построение крыши +* построение колеса + +Иерархия вагонов: +* головной +* обычный + +Замечание: +* поезд хранит список вагонов и координаты головного +* builder собирает вагон по частям далее вагон добавляется в поезд diff --git a/module-1/seminars/seminar5/README.md b/module-1/seminars/seminar5/README.md new file mode 100644 index 00000000..5732725a --- /dev/null +++ b/module-1/seminars/seminar5/README.md @@ -0,0 +1,28 @@ +# Seminar + +Разобран паттерн [Composite](https://refactoring.guru/design-patterns/builder) + +Код не сохранился + +Формулировка задачи: + +Иерархия: Managing Director <- Senior VP <- VP <- Banking Associate <- Banking Analyst + +Классы облажают методами: +* Banking Analyst: +* MakePresentation +* GetCompanyIndicator + +Banking Associate: +* GatherCompaniesIndicators +* PutCompanyIndicator + +VP: +* PreparePitchBook + +Senior VP: +* PrepareMeeting + +ManagingDir: +* DrinkCoffee +* Deadline: пробрасывает сообщение подчиненным -> вызывает DrinkCoffee \ No newline at end of file diff --git a/module-1/seminars/seminar6-8/README.md b/module-1/seminars/seminar6-8/README.md new file mode 100644 index 00000000..6730ed9e --- /dev/null +++ b/module-1/seminars/seminar6-8/README.md @@ -0,0 +1,6 @@ +# Seminar + +Разобран паттерны: +* [Mediator](https://refactoring.guru/design-patterns/builder) +* [Composite](https://refactoring.guru/design-patterns/composite) +* [Prototype](https://refactoring.guru/design-patterns/prototype) \ No newline at end of file diff --git a/module-1/seminars/seminar6-8/mediator.cpp b/module-1/seminars/seminar6-8/mediator.cpp new file mode 100644 index 00000000..0d5d7d3c --- /dev/null +++ b/module-1/seminars/seminar6-8/mediator.cpp @@ -0,0 +1,177 @@ +#include +#include +#include +#include +#include +#include + + +class Worker; + +enum Commands { + LOAD, + SORT, + PRINT +}; + +class Mediator { +public: + virtual void Notify(Worker* worker, Commands cmd) const = 0; +}; + +class Worker { +public: + Worker() : mediator(nullptr) {}; + + void SetMediator(Mediator* mediator); + +protected: + Mediator* mediator; +}; + +void Worker::SetMediator(Mediator* mediator) { + this->mediator = mediator; +} + +class SortingWorker : public Worker { +public: + virtual void Sort(std::vector& v) = 0; +}; + +class QuickSortWorker : public SortingWorker { +public: + void Sort(std::vector& v) override { + + qsort(v, 0, v.size()); + + mediator->Notify(this, SORT); + } +private: + void qsort(std::vector& v, std::size_t left, std::size_t right) { + if ( left < right ) { + std::size_t pos = Partition(v, left, right); + qsort(v, left, pos); + qsort(v, pos + 1, right); + } + } + int Partition(std::vector& v, std::size_t left, std::size_t right) { + std::size_t pivot = v[static_cast(left + right) / 2]; + std::size_t i = left; + std::size_t j = right; + + while (i <= j ) { + while (v[i] < pivot) { + i++; + } + while (v[j] > pivot) { + j--; + } + + if (i >= j) { + break; + } + std::swap(v[i++], v[j--]); + } + } +}; + +class Decorator : public SortingWorker { + protected: + SortingWorker* component; + + public: + Decorator(SortingWorker* component) : component(component) {} + void Sort(std::vector& v) { + component->Sort(v); + } +}; + +class TimerDecorator : public Decorator { + public: + TimerDecorator(QuickSortWorker* component) : Decorator(component) {} + void Sort(std::vector& v) { + auto start = std::chrono::high_resolution_clock::now(); + Decorator::Sort(v); + auto finish = std::chrono::high_resolution_clock::now(); + std::chrono::duration elapsed = finish - start; + std::cout << elapsed.count() << std::endl; + } +}; + +class DataLoaderWorker : public Worker { +public: + DataLoaderWorker(std::filesystem::path& path) : path_(std::move(path)) {} + + void Load() { + std::cout << "Load:completed" << std::endl; + std::fstream fs; + fs.open(this->path_); + int num; + fs >> num; + while (!fs.eof() && fs >> num) { + v.push_back(num); + } + mediator->Notify(this, LOAD); + } + + std::vector& Get() { + return v; + } + +private: + std::filesystem::path path_; + std::vector v; +}; + +class PrinterWorker : public Worker { +public: + void Print(const std::vector& v) { + std::cout << "Print:completed" << std::endl; + for (auto x: v) { + std::cout << x << std::endl; + } + } +}; + +class SortMediator : public Mediator { +public: + SortMediator(DataLoaderWorker* dataloader, SortingWorker* sorter, PrinterWorker* printer) : + dataloader(dataloader), + sorter(sorter), + printer(printer) { + dataloader->SetMediator(this); + sorter->SetMediator(this); + printer->SetMediator(this); + }; + + void Notify(Commands cmd) const override { + switch (cmd) { + case Commands::LOAD: { + sorter->Sort(dataloader->Get()); + break; + } + case Commands::SORT: { + printer->Print(dataloader->Get()); + break; + } + } + } +private: + DataLoaderWorker* dataloader; + SortingWorker* sorter; + PrinterWorker* printer; +}; + +// int main() { + +// std::filesystem::path path = "./input.txt"; +// DataLoaderWorker* dataloader = new DataLoaderWorker(path); +// SortingWorker* qsort_worker = new QuickSortWorker; +// PrinterWorker* print_worker = new PrinterWorker; +// Decorator* qsort_docrator = new Decorator(qsort_worker); + +// SortMediator* qsort_mediator = new SortMediator(dataloader, qsort_docrator, print_worker); +// dataloader->Load(); + +// return 0; +// } \ No newline at end of file diff --git a/module-1/seminars/seminar6-8/observer.cpp b/module-1/seminars/seminar6-8/observer.cpp new file mode 100644 index 00000000..f5321f37 --- /dev/null +++ b/module-1/seminars/seminar6-8/observer.cpp @@ -0,0 +1,42 @@ +#include +#include +#include +#include + +struct Person { + std::string name; + + Person(std::string& name_) : name(std::move(name_)) {} +}; + +struct Order { + std::string name; + + Order(std::string& name_) : name(std::move(name_)) {} +}; + +struct KFCOrder : public Order {}; + +struct McDonaldsOrder : public Order {}; + +class Restourant { + public: + Restourant() = delete; + + private: + std::unordered_map orders; +}; + +class KFC : public Restourant { + +}; + +class McDonalds : public Restourant { + +}; + + +int main() { + + return 0; +} \ No newline at end of file diff --git a/module-1/seminars/seminar6-8/prototype.cpp b/module-1/seminars/seminar6-8/prototype.cpp new file mode 100644 index 00000000..809030ae --- /dev/null +++ b/module-1/seminars/seminar6-8/prototype.cpp @@ -0,0 +1,137 @@ + +// прототип объектов, которые не требуется часто создавать, но надо получать +#include +#include +#include + +enum SquareFigureName { + STAR +}; + +const char* enum_name2string_name[] = { + "STAR", + "a" +}; + +class SquareFigure; +std::ostream& operator<<(std::ostream& out, const SquareFigure& prot); + +class SquareFigure { +public: + + SquareFigure(const char _symbol, int _width, unsigned short int _height) : + symbol(_symbol), + width( _width), + height(_height) {}; + + virtual ~SquareFigure() = default; + + virtual SquareFigure* Clone() const = 0; + + int GetWidth() const { return width; } + unsigned short int GetHeight() const { return height; } + const char GetSymbol() const { return symbol; } + void Print() { + std::cout << (*this); + } + +protected: + const char symbol; + const unsigned short int height; + int width; +}; + +std::ostream& operator<<(std::ostream& out, const SquareFigure& prot) { + for (unsigned short int i = 0; i < prot.GetHeight(); i++) { + out << std::string(prot.GetWidth(), prot.GetSymbol()); + out.put('\n'); + } + return out; +} + +class StarSquareFigure : public SquareFigure { +public: + + StarSquareFigure(int _width, unsigned short int _height) : SquareFigure('*', _width, _height) {} + + SquareFigure* Clone() const override { + return new StarSquareFigure(*this); + } +}; + +class SquareFigureFactory { +private: + std::unordered_map> name2figure; + +public: + SquareFigureFactory() { + name2figure[SquareFigureName::STAR] = nullptr; + } + + void SetPrototype(SquareFigureName name, SquareFigure* figure) { + std::cout << "SquareFigure Name:" << enum_name2string_name[name] << " width:" << figure->GetWidth() << " setted!" << std::endl; + name2figure[name] = figure; + } + + SquareFigure* CreateSquareFigure(SquareFigureName name) { + std::cout << "SquareFigure Name:" << enum_name2string_name[name] << " created!" << std::endl; + return name2figure[name]->Clone(); + } + + ~SquareFigureFactory() { + if ( name2figure[SquareFigureName::STAR] ) { + delete name2figure[SquareFigureName::STAR]; + } + } +}; + +class SquareFigureProxy : public StarSquareFigure { +public: + ~SquareFigureProxy() { + if (fig) { + delete fig; + } + } + + void Print() { + if (hasSquareFigure()) { + fig->Print(); + return; + } + std::cout << "No figure setted!" << std::endl; + setDefault(); + } + + void SetFigure(StarSquareFigure* _fig) { + std::cout << "Proxy: upd!" << std::endl; + fig = _fig; + } + +private: + bool hasSquareFigure() { + return fig != nullptr; + } + + void setDefault() { + std::cout << "Default setted!" << std::endl; + fig = new StarSquareFigure(3, 3); + } + + StarSquareFigure* fig = nullptr; +}; + +int main() { + SquareFigureFactory factory; + SquareFigure* fig1 = new StarSquareFigure(2, 3); + + factory.SetPrototype(SquareFigureName::STAR, fig1); + + std::cout << *fig1 << std::endl; + SquareFigure* fig1_clone = factory.CreateSquareFigure(SquareFigureName::STAR); + + std::cout << "Clone Printed:" << std::endl; + std::cout << *fig1_clone; + + SquareFigureProxy p(); + return 0; +} \ No newline at end of file From 30f57e01414217d838545c7329a6a18c8d146d8b Mon Sep 17 00:00:00 2001 From: morell5 Date: Thu, 6 May 2021 13:15:31 +0300 Subject: [PATCH 31/41] clang-format submodule: in-place editing removed --- .gitmodules | 3 --- clangformat-cmake | 1 - 2 files changed, 4 deletions(-) delete mode 160000 clangformat-cmake diff --git a/.gitmodules b/.gitmodules index 95db22c4..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "clangformat-cmake"] - path = clangformat-cmake - url = https://github.com/zemasoft/clangformat-cmake diff --git a/clangformat-cmake b/clangformat-cmake deleted file mode 160000 index ced236e1..00000000 --- a/clangformat-cmake +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ced236e1919c412f5cf745de9a116cae119e7315 From 1cb7fe385980616d222a62abd066a78db56623f6 Mon Sep 17 00:00:00 2001 From: morell5 Date: Thu, 6 May 2021 13:16:29 +0300 Subject: [PATCH 32/41] clang-format submodule: dry-run, Werror --- .gitmodules | 3 +++ clangformat-cmake | 1 + 2 files changed, 4 insertions(+) create mode 160000 clangformat-cmake diff --git a/.gitmodules b/.gitmodules index e69de29b..53add81d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "clangformat-cmake"] + path = clangformat-cmake + url = https://github.com/morell5/clangformat-cmake.git diff --git a/clangformat-cmake b/clangformat-cmake new file mode 160000 index 00000000..af9301a2 --- /dev/null +++ b/clangformat-cmake @@ -0,0 +1 @@ +Subproject commit af9301a267935869fd8d2d4325ae912c934c41f3 From 66412dc591a10accbb10e5ee39a01a1e09b2bff8 Mon Sep 17 00:00:00 2001 From: morell5 Date: Sat, 15 May 2021 19:22:15 +0300 Subject: [PATCH 33/41] ci.yml: clang-tidy/format 10 --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62b3de31..0d41f9f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,18 @@ jobs: - name: tests env: - CLANG_FORMAT_SUBMODULE: /home/runner/work/HSE-Course/HSE-Course/clangformat-cmake + CLANG_FORMAT_SUBMODULE: /home/runner/work/HSE-Course-Private/HSE-Course-Private/clangformat-cmake TITLE: ${{github.event.pull_request.title}} working-directory: ./module-1/homework/ - run: sudo apt-get install -y clang-tidy && + run: + sudo apt-get install clang-tidy-10 && + sudo apt-get install clang-format-10 && + sudo rm -rf /usr/bin/clang-tidy && + sudo rm -rf /usr/bin/clang-format && + sudo ln -s /usr/bin/clang-tidy-10 /usr/bin/clang-tidy && + sudo ln -s /usr/bin/clang-format-10 /usr/bin/clang-format && + clang-tidy --version && + clang-format --version && git submodule update --init --recursive && prname=${TITLE} && cmake -B ${prname}/build -S ${prname} && From acb4c4dc9d5aad62c11d6d8d866e0a79278ff561 Mon Sep 17 00:00:00 2001 From: morell5 Date: Sat, 15 May 2021 19:23:09 +0300 Subject: [PATCH 34/41] clang-tidy: Werror removed --- .clang-tidy | 2 -- .github/workflows/ci.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index e294a69f..f062712c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -2,8 +2,6 @@ Checks: '-*,cppcoreguidelines-avoid-goto,cppcoreguidelines-pro-type-const-cast, google-runtime-int, modernize-use-nullptr, readability-braces-around-statements, readability-container-size-empty, readability-redundant-control-flow, readability-identifier-naming, readability-simplify-boolean-expr, google-build-using-namespace, readability-implicit-bool-conversion, google-explicit-constructor' -WarningsAsErrors: '*' - CheckOptions: - key: readability-identifier-naming.NamespaceCase value: lower_case diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d41f9f6..db1e49c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - name: tests env: - CLANG_FORMAT_SUBMODULE: /home/runner/work/HSE-Course-Private/HSE-Course-Private/clangformat-cmake + CLANG_FORMAT_SUBMODULE: /home/runner/work/HSE-Course/HSE-Course/clangformat-cmake TITLE: ${{github.event.pull_request.title}} working-directory: ./module-1/homework/ run: From ed47cec3f85aec9691da390cc5d82814939dc8ca Mon Sep 17 00:00:00 2001 From: CardinalPrefect Date: Fri, 11 Jun 2021 13:44:01 +0300 Subject: [PATCH 35/41] Allocator solution --- .gitmodules | 3 + module-1/homework/Allocator/clangformat-cmake | 1 + .../Allocator/src/allocator/allocator.h | 86 ++- module-1/homework/Allocator/src/list/list.h | 501 +++++++++++++++++- 4 files changed, 577 insertions(+), 14 deletions(-) create mode 160000 module-1/homework/Allocator/clangformat-cmake diff --git a/.gitmodules b/.gitmodules index 53add81d..2942881b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "clangformat-cmake"] path = clangformat-cmake url = https://github.com/morell5/clangformat-cmake.git +[submodule "module-1/homework/Allocator/clangformat-cmake"] + path = module-1/homework/Allocator/clangformat-cmake + url = https://github.com/zemasoft/clangformat-cmake diff --git a/module-1/homework/Allocator/clangformat-cmake b/module-1/homework/Allocator/clangformat-cmake new file mode 160000 index 00000000..ced236e1 --- /dev/null +++ b/module-1/homework/Allocator/clangformat-cmake @@ -0,0 +1 @@ +Subproject commit ced236e1919c412f5cf745de9a116cae119e7315 diff --git a/module-1/homework/Allocator/src/allocator/allocator.h b/module-1/homework/Allocator/src/allocator/allocator.h index 8b07576a..024ac1c0 100644 --- a/module-1/homework/Allocator/src/allocator/allocator.h +++ b/module-1/homework/Allocator/src/allocator/allocator.h @@ -7,10 +7,22 @@ class CustomAllocator { template struct rebind { // NOLINT // Your code goes here + typedef CustomAllocator other; }; - - using value_type = T; // Your code goes here + using value_type = T; + using pointer = T*; + using const_pointer = const T*; + using reference = T&; + using const_reference = const T&; + using size_type = std::size_t; + using difference_type = std::ptrdiff_t; + + // Influence on container operations + using propagate_on_container_move_assignment = std::false_type; + using propagate_on_container_copy_assignment = std::false_type; + using propagate_on_container_swap = std::true_type; + using is_always_equal = std::false_type; CustomAllocator(); CustomAllocator(const CustomAllocator& other) noexcept; @@ -20,19 +32,45 @@ class CustomAllocator { explicit CustomAllocator(const CustomAllocator& other) noexcept; T* allocate(size_t n) { // NOLINT - // Your code goes here + // Your code goes here + if (*arena_offset_ + n > ARENA_BASIC_SIZE) { + throw std::runtime_error("Allocator's arena is full"); + } + + *arena_offset_ += n; + + return static_cast(arena_) + (*arena_offset_ - n); } - void deallocate(T* p, size_t n) { // NOLINT + + void deallocate(T* p, size_t n) { + // NOLINT // Your code goes here + }; + template void construct(pointer p, Args&&... args) { // NOLINT // Your code goes here + ::new (p) value_type(std::forward(args)...); }; + void destroy(pointer p) { // NOLINT // Your code goes here + p->~T(); }; + void* get_arena() const { + return arena_; + } + + size_t* get_arena_offset() const { + return arena_offset_; + } + + size_t* get_allocators_count() const { + return allocators_count_; + } + template friend bool operator==(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept; template @@ -40,14 +78,54 @@ class CustomAllocator { private: // Your code goes here + static const size_t ARENA_BASIC_SIZE = 65536; + void* arena_ = nullptr; + size_t* arena_offset_ = nullptr; + size_t* allocators_count_ = nullptr; }; +template +CustomAllocator::CustomAllocator() { + arena_ = ::operator new(ARENA_BASIC_SIZE * sizeof(T)); + arena_offset_ = new size_type(0); + allocators_count_ = new size_type(1); +} + +template +CustomAllocator::CustomAllocator(const CustomAllocator& other) noexcept + : arena_(other.arena_), + arena_offset_(other.arena_offset_), + allocators_count_(other.allocators_count_) { + ++(*allocators_count_); +} + +template +CustomAllocator::~CustomAllocator() { + --(*allocators_count_); + if (*allocators_count_ == 0) { + ::operator delete(arena_); + delete arena_offset_; + delete allocators_count_; + } +} + +template +template +CustomAllocator::CustomAllocator(const CustomAllocator& other) noexcept + : arena_(other.get_arena()), + arena_offset_(other.get_arena_offset()), + allocators_count_(other.get_allocators_count()) { + ++(*allocators_count_); +} + template bool operator==(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept { // Your code goes here + return lhs.arena_ == rhs.arena_; } template bool operator!=(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept { // Your code goes here + return lhs.arena_ != rhs.arena_; } \ No newline at end of file diff --git a/module-1/homework/Allocator/src/list/list.h b/module-1/homework/Allocator/src/list/list.h index f325e9d4..26925e5b 100644 --- a/module-1/homework/Allocator/src/list/list.h +++ b/module-1/homework/Allocator/src/list/list.h @@ -1,27 +1,66 @@ #pragma once -#include #include #include +#include namespace task { +template +class Node { +public: + Node(Node* prev, Node* next, T value) : value(value), prev(prev), next(next) { + } + + void push_back(Node* node) { + next = node; + if (node) + node->prev = this; + } + + void push_front(Node* node) { + prev = node; + if (node) + node->next = this; + } + + ~Node() { + } + + T value; + Node* prev = nullptr; + Node* next = nullptr; + + // friend class List::Iterator; +}; + template > class List { +private: + class Iterator; public: using value_type = T; // Your code goes here + using allocator_type = Allocator; + using size_type = std::size_t; + using difference_type = std::ptrdiff_t; + using reference = value_type&; + using const_reference = const value_type&; + using pointer = typename std::allocator_traits::pointer; + using const_pointer = typename std::allocator_traits::const_pointer; + using iterator = Iterator; + using const_iterator = const Iterator; // Special member functions - List(){}; - - List(const List& other) { - // Your code goes here + List() { + Node* x = alloc_.allocate(1); + alloc_.construct(x, nullptr, nullptr, T()); + head_ = tail_ = x; } + List(const List& other); List(const List& other, const Allocator& alloc); - - List(List&& other); + List(List&& other) noexcept; List(List&& other, const Allocator& alloc); ~List(); @@ -47,6 +86,7 @@ class List { bool Empty() const noexcept; size_type Size() const noexcept; + size_type MaxSize() const noexcept; // Modifiers @@ -55,7 +95,7 @@ class List { void PushBack(const T& value); void PushBack(T&& value); - + template void EmplaceBack(Args&&... args); void PopBack(); @@ -75,7 +115,448 @@ class List { allocator_type GetAllocator() const noexcept; private: - // Your code goes here + typedef typename std::allocator_traits::template rebind_alloc> node_alocator; + + node_alocator alloc_; + Node* head_; + Node* tail_; + std::size_t list_size_ = 0; + +private: + class Iterator { + public: + using value_type = List::value_type; + using pointer = List::pointer; + using reference = List::reference; + using difference_type = ptrdiff_t; + using iterator_category = std::bidirectional_iterator_tag; + + + explicit Iterator(Node* node) : node_(node) { + } + + Iterator& operator++() { + node_ = node_->next; + return *this; + } + + Iterator operator++(int) { + Iterator iter(*this); + ++(*this); + return iter; + } + + Iterator& operator--() { + node_ = node_->prev; + return *this; + } + + Iterator operator--(int) { + Iterator iter(*this); + --(*this); + return iter; + } + + bool operator==(const iterator& other) { + return node_ == other.node_; + } + + bool operator!=(const iterator& other) { + return node_ != other.node_; + } + + pointer operator->() const { + return &node_->value; + } + + reference operator*() const { + return node_->value; + } + + private: + Node* node_; + }; }; -} // namespace task \ No newline at end of file +template +List::List(const List& other) : alloc_(other.alloc_) { + for (Node* x = other.head_; x != nullptr; x = x->next) + PushBack(x->value); + --list_size_; +} + +template +List::List(const List& other, const Allocator& alloc) { + alloc_ = alloc; + for (Node* x = other.head_; x != nullptr; x = x->next) + PushBack(x->value); + --list_size_; +} + +template +List::List(List&& other) noexcept { + *this = std::move(other); +} + +template +List::List(List&& other, const Allocator& alloc) { + alloc_ = alloc; + for (Node* x = other.head_; x != nullptr; x = x->next) + PushBack(std::move(x->value)); + + other.Clear(); +} + +template +List::~List() { + Clear(); + alloc_.destroy(tail_); + alloc_.deallocate(tail_, 1); +} + +template +List& List::operator=(const List& other) { + if (this == &other) + return *this; + + Clear(); + + if (std::allocator_traits::propagate_on_container_copy_assignment::value) + alloc_ = other.alloc_; + + + for (Node* x = other.head_; x != other.tail_; x = x->next) + PushBack(x->value); + + return *this; +} + +template +List& List::operator=(List&& other) noexcept { + if (this == &other) + return *this; + + Clear(); + + if (std::allocator_traits::propagate_on_container_move_assignment::value) { + + other.alloc_.destroy(tail_); + other.alloc_.deallocate(tail_, 1); + alloc_ = other.alloc_; + + head_ = other.head_; + other.head_ = nullptr; + + tail_ = other.tail_; + other.tail_ = nullptr; + + list_size_ = other.list_size_; + + Node* x = alloc_.allocate(1); + alloc_.construct(x, nullptr, nullptr, T()); + other.head_ = other.tail_ = x; + other.list_size_ = 0; + + + } else { + for (Node* x = other.head_; x != other.tail_; x = x->next) + PushBack(std::move(x->value)); + + other.Clear(); + other.alloc_.destroy(other.tail_); + other.alloc_.deallocate(other.tail_, 1); + } + + return *this; +} + +template +typename List::reference List::Front() { + return head_->value; +} + +template +typename List::const_reference List::Front() const { + return head_->value; +} + +template +typename List::reference List::Back() { + return tail_->prev->value; +} + +template +typename List::const_reference List::Back() const { + return tail_->prev->value; +} + +template +typename List::iterator List::Begin() noexcept { + return iterator(head_); +} + +template +typename List::const_iterator List::Begin() const noexcept { + return const_iterator(head_); +} + +template +typename List::iterator List::End() noexcept { + return iterator(tail_); +} + +template +typename List::const_iterator List::End() const noexcept { + return const_iterator(tail_); +} + +template +bool List::Empty() const noexcept { + return list_size_ == 0; +} + +template +size_t List::Size() const noexcept { + return list_size_; +} + +template +void List::Clear() { + while (list_size_ != 0) + PopBack(); +} + +template +void List::Swap(List& other) noexcept { + if (std::allocator_traits::propagate_on_container_swap::value) { + std::swap(alloc_, other.alloc_); + std::swap(head_, other.head_); + std::swap(tail_, other.tail_); + std::swap(list_size_, other.list_size_); + } else { + List t = std::move(other); + other = std::move(*this); + *this = std::move(t); + } +} + +template +void List::PushBack(const T& value) { + Node* x = alloc_.allocate(1); + if (Empty()) { + alloc_.construct(x, nullptr, nullptr, value); + head_ = x; + head_->next = tail_; + tail_->prev = head_; + } else { + alloc_.construct(x, nullptr, tail_, value); + tail_->prev->push_back(x); + tail_->prev = x; + } + ++list_size_; +} + +template +void List::PushBack(T&& value) { + Node* x = alloc_.allocate(1); + if (Empty()) { + alloc_.construct(x, nullptr, nullptr, std::move(value)); + head_ = x; + head_->next = tail_; + tail_->prev = head_; + } else { + alloc_.construct(x, nullptr, tail_, std::move(value)); + tail_->prev->push_back(x); + tail_->prev = x; + } + ++list_size_; +} + +template +template +void List::EmplaceBack(Args&&... args) { + Node* x = alloc_.allocate(1); + alloc_.construct(x, tail_->prev, tail_, std::forward(args)...); + + + if (head_ == tail_) { + head_ = x; + } else { + x->prev->next = x; + } + tail_->prev = x; + + ++list_size_; +} + +template +void List::PopBack() { + if (list_size_ == 1) { + alloc_.destroy(head_); + alloc_.deallocate(head_, 1); + head_ = tail_; + --list_size_; + } else if (list_size_ > 1) { + Node* x = tail_->prev; + tail_->prev = tail_->prev->prev; + tail_->prev->next = tail_; + + alloc_.destroy(x); + alloc_.deallocate(x, 1); + --list_size_; + } +} + +template +void List::PushFront(const T& value) { + Node* x = alloc_.allocate(1); + if (Empty()) { + alloc_.construct(x, nullptr, tail_, value); + head_ = x; + tail_->prev = head_; + } else { + alloc_.construct(x, nullptr, head_, value); + head_->push_front(x); + head_ = head_->prev; + } + ++list_size_; +} + +template +void List::PushFront(T&& value) { + Node* x = alloc_.allocate(1); + if (Empty()) { + alloc_.construct(x, nullptr, tail_, std::move(value)); + head_ = x; + tail_->prev = head_; + } else { + alloc_.construct(x, nullptr, head_, std::move(value)); + head_->push_front(x); + head_ = head_->prev; + } + ++list_size_; +} + +template +template +void List::EmplaceFront(Args&&... args) { + Node* x = alloc_.allocate(1); + alloc_.construct(x, nullptr, head_, std::forward(args)...); + + if (head_ != tail_) { + head_->prev = x; + } + head_ = x; +} + +template +void List::PopFront() { + if (list_size_ == 1) { + alloc_.destroy(head_); + alloc_.deallocate(head_, 1); + head_ = tail_; + --list_size_; + } else if (list_size_ > 1) { + Node* x = head_; + head_ = head_->next; + head_->prev = nullptr; + + alloc_.destroy(x); + alloc_.deallocate(x, 1); + --list_size_; + } +} + +template +void List::Resize(size_type count) { + if (count < 0) + return; + while (count > list_size_) + PushBack(T()); + + while (count < list_size_) + PopBack(); +} + +template +void List::Remove(const T& value) { + if (list_size_ == 0) + return; + + Node* x = head_; + Node* delx = nullptr; + + while (x != tail_) { + if (x->value == value) { + if (x->prev) { + x->next->prev = x->prev; + x->prev->next = x->next; + } else { + x->next->prev = nullptr; + } + delx = x; + + if (x == head_) { + head_ = x->next; + } + } + x = x->next; + if (delx) { + alloc_.destroy(delx); + alloc_.deallocate(delx, 1); + --list_size_; + delx = nullptr; + } + } + + +} + +template +void List::Unique() { + if (list_size_ < 2) + return; + T pred = head_->value; + Node* x = head_->next; + Node* delx = nullptr; + + while (x != tail_) { + if (x->value == pred) { + delx = x; + x->prev->push_back(x->next); + x = x->next; + + alloc_.destroy(delx); + alloc_.deallocate(delx, 1); + --list_size_; + } else { + pred = x->value; + x = x->next; + } + } +} + +template +void List::Sort() { + std::vector values; + + Node* x = head_; + while (x != tail_) { + values.push_back(x->value); + x = x->next; + } + + std::sort(values.begin(), values.end()); + + Clear(); + + for (T& d : values) + PushBack(d); +} + +template +typename List::allocator_type List::GetAllocator() const noexcept { + return Allocator(alloc_); +} + +} // namespace task From 82e3775b30d31c7dfe37a7092eb9896c8ac0c866 Mon Sep 17 00:00:00 2001 From: CardinalPrefect Date: Fri, 11 Jun 2021 16:53:39 +0300 Subject: [PATCH 36/41] fix clang-format errors --- module-1/homework/Allocator/src/list/list.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/module-1/homework/Allocator/src/list/list.h b/module-1/homework/Allocator/src/list/list.h index 26925e5b..7b69f5ee 100644 --- a/module-1/homework/Allocator/src/list/list.h +++ b/module-1/homework/Allocator/src/list/list.h @@ -5,7 +5,6 @@ #include namespace task { - template class Node { public: @@ -131,7 +130,6 @@ class List { using difference_type = ptrdiff_t; using iterator_category = std::bidirectional_iterator_tag; - explicit Iterator(Node* node) : node_(node) { } @@ -224,7 +222,6 @@ List& List::operator=(const List& other) { if (std::allocator_traits::propagate_on_container_copy_assignment::value) alloc_ = other.alloc_; - for (Node* x = other.head_; x != other.tail_; x = x->next) PushBack(x->value); @@ -257,7 +254,6 @@ List& List::operator=(List&& other) no other.head_ = other.tail_ = x; other.list_size_ = 0; - } else { for (Node* x = other.head_; x != other.tail_; x = x->next) PushBack(std::move(x->value)); @@ -378,14 +374,12 @@ void List::EmplaceBack(Args&&... args) { Node* x = alloc_.allocate(1); alloc_.construct(x, tail_->prev, tail_, std::forward(args)...); - if (head_ == tail_) { head_ = x; } else { x->prev->next = x; } tail_->prev = x; - ++list_size_; } @@ -508,8 +502,6 @@ void List::Remove(const T& value) { delx = nullptr; } } - - } template From 42e7f5e02df9483c538ce68a894136336c9c0868 Mon Sep 17 00:00:00 2001 From: CardinalPrefect Date: Fri, 11 Jun 2021 16:58:06 +0300 Subject: [PATCH 37/41] fix clang-format errors 2.0 --- module-1/homework/Allocator/src/list/list.h | 1 - 1 file changed, 1 deletion(-) diff --git a/module-1/homework/Allocator/src/list/list.h b/module-1/homework/Allocator/src/list/list.h index 7b69f5ee..84a9ce5a 100644 --- a/module-1/homework/Allocator/src/list/list.h +++ b/module-1/homework/Allocator/src/list/list.h @@ -253,7 +253,6 @@ List& List::operator=(List&& other) no alloc_.construct(x, nullptr, nullptr, T()); other.head_ = other.tail_ = x; other.list_size_ = 0; - } else { for (Node* x = other.head_; x != other.tail_; x = x->next) PushBack(std::move(x->value)); From 3cdc3810e44121b3010709cf64925f736daa6e70 Mon Sep 17 00:00:00 2001 From: CardinalPrefect Date: Fri, 11 Jun 2021 17:13:14 +0300 Subject: [PATCH 38/41] fix clang-format errors 2.1 --- module-1/homework/Allocator/src/allocator/allocator.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/module-1/homework/Allocator/src/allocator/allocator.h b/module-1/homework/Allocator/src/allocator/allocator.h index 024ac1c0..fa8970b9 100644 --- a/module-1/homework/Allocator/src/allocator/allocator.h +++ b/module-1/homework/Allocator/src/allocator/allocator.h @@ -42,11 +42,8 @@ class CustomAllocator { return static_cast(arena_) + (*arena_offset_ - n); } - void deallocate(T* p, size_t n) { - // NOLINT - // Your code goes here - - }; + void deallocate(T*, size_t) { //NOLINT + } template void construct(pointer p, Args&&... args) { // NOLINT From 6386660d8685bd0bbdc43d5a6ecb4d18e5ca3551 Mon Sep 17 00:00:00 2001 From: CardinalPrefect Date: Fri, 11 Jun 2021 17:17:10 +0300 Subject: [PATCH 39/41] fix clang-format errors 2.2 --- module-1/homework/Allocator/src/allocator/allocator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module-1/homework/Allocator/src/allocator/allocator.h b/module-1/homework/Allocator/src/allocator/allocator.h index fa8970b9..df23597d 100644 --- a/module-1/homework/Allocator/src/allocator/allocator.h +++ b/module-1/homework/Allocator/src/allocator/allocator.h @@ -42,7 +42,7 @@ class CustomAllocator { return static_cast(arena_) + (*arena_offset_ - n); } - void deallocate(T*, size_t) { //NOLINT + void deallocate(T*, size_t) { // NOLINT } template From 1205c6c6fa46738f60ad15248c91c7f1e81d76fc Mon Sep 17 00:00:00 2001 From: CardinalPrefect Date: Sat, 12 Jun 2021 10:59:30 +0300 Subject: [PATCH 40/41] fix commetns --- .../homework/Allocator/src/allocator/allocator.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/module-1/homework/Allocator/src/allocator/allocator.h b/module-1/homework/Allocator/src/allocator/allocator.h index df23597d..2c48ddc9 100644 --- a/module-1/homework/Allocator/src/allocator/allocator.h +++ b/module-1/homework/Allocator/src/allocator/allocator.h @@ -6,17 +6,15 @@ class CustomAllocator { public: template struct rebind { // NOLINT - // Your code goes here - typedef CustomAllocator other; + using other = CustomAllocator; }; - // Your code goes here using value_type = T; using pointer = T*; using const_pointer = const T*; using reference = T&; using const_reference = const T&; - using size_type = std::size_t; - using difference_type = std::ptrdiff_t; + using size_type = size_t; + using difference_type = ptrdiff_t; // Influence on container operations using propagate_on_container_move_assignment = std::false_type; @@ -32,7 +30,6 @@ class CustomAllocator { explicit CustomAllocator(const CustomAllocator& other) noexcept; T* allocate(size_t n) { // NOLINT - // Your code goes here if (*arena_offset_ + n > ARENA_BASIC_SIZE) { throw std::runtime_error("Allocator's arena is full"); } @@ -47,12 +44,10 @@ class CustomAllocator { template void construct(pointer p, Args&&... args) { // NOLINT - // Your code goes here ::new (p) value_type(std::forward(args)...); }; void destroy(pointer p) { // NOLINT - // Your code goes here p->~T(); }; @@ -74,7 +69,6 @@ class CustomAllocator { friend bool operator!=(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept; private: - // Your code goes here static const size_t ARENA_BASIC_SIZE = 65536; void* arena_ = nullptr; size_t* arena_offset_ = nullptr; @@ -117,12 +111,10 @@ CustomAllocator::CustomAllocator(const CustomAllocator& other) noexcept template bool operator==(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept { - // Your code goes here return lhs.arena_ == rhs.arena_; } template bool operator!=(const CustomAllocator& lhs, const CustomAllocator& rhs) noexcept { - // Your code goes here return lhs.arena_ != rhs.arena_; } \ No newline at end of file From 297b8b8d77177d7bd3834bc40541c7117f67ba61 Mon Sep 17 00:00:00 2001 From: CardinalPrefect Date: Sat, 12 Jun 2021 12:26:16 +0300 Subject: [PATCH 41/41] add {} instead () --- .../homework/Allocator/src/allocator/allocator.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module-1/homework/Allocator/src/allocator/allocator.h b/module-1/homework/Allocator/src/allocator/allocator.h index 2c48ddc9..6ff53187 100644 --- a/module-1/homework/Allocator/src/allocator/allocator.h +++ b/module-1/homework/Allocator/src/allocator/allocator.h @@ -84,9 +84,9 @@ CustomAllocator::CustomAllocator() { template CustomAllocator::CustomAllocator(const CustomAllocator& other) noexcept - : arena_(other.arena_), - arena_offset_(other.arena_offset_), - allocators_count_(other.allocators_count_) { + : arena_{other.arena_}, + arena_offset_{other.arena_offset_}, + allocators_count_{other.allocators_count_} { ++(*allocators_count_); } @@ -103,9 +103,9 @@ CustomAllocator::~CustomAllocator() { template template CustomAllocator::CustomAllocator(const CustomAllocator& other) noexcept - : arena_(other.get_arena()), - arena_offset_(other.get_arena_offset()), - allocators_count_(other.get_allocators_count()) { + : arena_{other.get_arena()}, + arena_offset_{other.get_arena_offset()}, + allocators_count_{other.get_allocators_count()} { ++(*allocators_count_); }