Skip to content

I tesserakt exam 4#10

Open
a-badin wants to merge 15 commits intomasterfrom
ITesserakt_exam_4
Open

I tesserakt exam 4#10
a-badin wants to merge 15 commits intomasterfrom
ITesserakt_exam_4

Conversation

@a-badin
Copy link
Collaborator

@a-badin a-badin commented Dec 11, 2021

No description provided.

Copy link
Collaborator Author

@a-badin a-badin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Код не компилируется, не запускается, каких-то файлов просто нет

file(GLOB_RECURSE SOURCE_FILES project/src/*.cpp)
file(GLOB_RECURSE TEST_FILES project/test/*.cpp)

add_library(sha256 SHARED project/src/SHA256.c project/include/SHA256.h)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Есть куча библиотек которые умеют это делать libcrypt, libopenssl

target_link_libraries(backend INTERFACE sha256
PUBLIC Boost::serialization
PUBLIC smallvec
PUBLIC cppcoro)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если все равно пользуетесь стороней библиотекой - взяли бы boost::coro, asio с ними работает

cppcoro::async_scope async;
for (auto &executor : executors) {
async.spawn(
executor->execute(std::forward<Command>(command)) |
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forward не используется для rvalue, для rvalue используется move

};

TEST(executors, executing_command_through_local_command_executor) {
auto executor = LocalCommandExecutor();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LocalCommandExecutor executor;
auto во многих стилях программирования ограничивают итераторами, результатом от make_shared/make_unque и теми случаеми, когда без него невозможно. В противном случае код быстро становится нечитаемым или происходят случаи, когда int или unique_ptr передают по константной ссылке

Copy link
Collaborator Author

@a-badin a-badin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Правьте замечания и сливайте в main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants