Opened 4 years ago

Closed 4 years ago

#303 closed ожидается проверка (задача сдана)

Tankov Vladislav HW6

Reported by: tankov.vladislav Owned by: rutsky,grabovoy.philipp
Priority: проверка Milestone: ha6-deadline
Component: HA#6 bind Version:
Keywords: Cc:

Description


Change History (8)

comment:1 Changed 4 years ago by tankov.vladislav

Component: HA#1 matricesHA#6 bind

comment:2 Changed 4 years ago by cpptester

Type: ожидается проверкаожидаются исправления

Tested revision 766 by tankov.vladislav.

Smoke tests

test

stage

result

info

log

run_bind_smoke_test.cpp

WARNING

run_bind_smoke_test-gcc62.log

SUCCESS
SUCCESS

run_bind_smoke_test-valgrind.log

WARNING

run_bind_smoke_test-gcc62-asan.log

SUCCESS
WARNING

run_bind_smoke_test-clang-san.log

SUCCESS

Common header used in some tests: common.h

comment:5 Changed 4 years ago by cpptester

Tested revision 769 by tankov.vladislav.

Main tests

test

stage

result

info

log

ncomp_bind_missing_arg.cpp

FAILURE

ncomp_bind_missing_arg2.cpp

FAILURE

Common header used in some tests: common.h

comment:6 Changed 4 years ago by cpptester

Tested revision 770 by tankov.vladislav.

All tests passed. Good job!

comment:7 Changed 4 years ago by tankov.vladislav

Type: ожидаются исправленияожидается проверка

comment:8 Changed 4 years ago by Vladimir Rutsky

Resolution: задача сдана
Status: newclosed

Замечания:

  1. Для проверки соответствия количества аргументов функции, количеству забинженных аргументов, вместо SFINAE лучше использовать static_assert с человеко-читаемым сообщением об ошибке:
template <class Ret, class... Args, class... Bounded>
Bind<Ret(Args...), std::tuple<Bounded...> >
bind(Ret (*func)(Args...), Bounded&&... args)
{
    static_assert(
        sizeof...(Bounded) == sizeof...(Args),
        "Number of function arguments doesn't match number of bound arguments.");
    return Bind<Ret(Args...), std::tuple<Bounded...> >(func, std::forward<Bounded>(args)...);
}

Решение зачтено.

Note: See TracTickets for help on using tickets.