![]() |
Здравствуйте, гость ( Вход | Регистрация )
![]() ![]() |
![]() |
LuckLess |
![]()
Сообщение
#1
|
Студент ![]() Группа: Новичок Сообщений: 31 Регистрация: 10.10.2007 Пользователь №: 8 Спасибо сказали: 0 раз(а) Репутация: ![]() ![]() ![]() |
хых
Компилим мозгом
что вылезет? |
|
|
LuckLess |
![]()
Сообщение
#2
|
Студент ![]() Группа: Новичок Сообщений: 31 Регистрация: 10.10.2007 Пользователь №: 8 Спасибо сказали: 0 раз(а) Репутация: ![]() ![]() ![]() |
блин.. как значек № рисовать...
|
|
|
ViGOur |
![]()
Сообщение
#3
|
![]() Мастер ![]() ![]() ![]() ![]() ![]() ![]() Группа: Модератор Сообщений: 3296 Регистрация: 9.10.2007 Из: Москва Пользователь №: 4 Спасибо сказали: 231 раз(а) Репутация: ![]() ![]() ![]() |
|
|
|
archimed7592 |
![]()
Сообщение
#4
|
![]() Участник ![]() ![]() Группа: Участник Сообщений: 127 Регистрация: 27.12.2007 Из: Moscow Пользователь №: 56 Спасибо сказали: 0 раз(а) Репутация: ![]() ![]() ![]() |
5 вылезет... А что ещё может вылезти?
![]() |
|
|
ViGOur |
![]()
Сообщение
#5
|
![]() Мастер ![]() ![]() ![]() ![]() ![]() ![]() Группа: Модератор Сообщений: 3296 Регистрация: 9.10.2007 Из: Москва Пользователь №: 4 Спасибо сказали: 231 раз(а) Репутация: ![]() ![]() ![]() |
Ну мало ли что там может вылезти еще, например 6, или еще куда прынгет...
![]() |
|
|
Andrew Selivanov |
![]()
Сообщение
#6
|
![]() Участник ![]() ![]() Группа: Участник Сообщений: 249 Регистрация: 9.10.2007 Из: Москва Пользователь №: 3 Спасибо сказали: 15 раз(а) Репутация: ![]() ![]() ![]() |
гарантированный abnormal termination?
трям) не угадал Сообщение отредактировал Andrew Selivanov - 11.4.2008, 16:48 |
|
|
archimed7592 |
![]()
Сообщение
#7
|
![]() Участник ![]() ![]() Группа: Участник Сообщений: 127 Регистрация: 27.12.2007 Из: Moscow Пользователь №: 56 Спасибо сказали: 0 раз(а) Репутация: ![]() ![]() ![]() |
Andrew Selivanov, неа
![]() |
|
|
Andrew Selivanov |
![]()
Сообщение
#8
|
![]() Участник ![]() ![]() Группа: Участник Сообщений: 249 Регистрация: 9.10.2007 Из: Москва Пользователь №: 3 Спасибо сказали: 15 раз(а) Репутация: ![]() ![]() ![]() |
|
|
|
Tonal |
![]()
Сообщение
#9
|
![]() Активный участник ![]() ![]() ![]() Группа: Участник Сообщений: 452 Регистрация: 6.12.2007 Из: Новосибирск Пользователь №: 34 Спасибо сказали: 69 раз(а) Репутация: ![]() ![]() ![]() |
А вот если в первом catch ловить по ссылке - будет таки 6.
![]() |
|
|
archimed7592 |
![]()
Сообщение
#10
|
![]() Участник ![]() ![]() Группа: Участник Сообщений: 127 Регистрация: 27.12.2007 Из: Moscow Пользователь №: 56 Спасибо сказали: 0 раз(а) Репутация: ![]() ![]() ![]() |
Цитата А вот если в первом catch ловить по ссылке - будет таки 6. Действительно ![]() http://www.kuzbass.ru:8086/docs/isocpp/exc...ml#except.throw Цитата -3- A throw-expression initializes a temporary object, the type of which is determined by removing any top-level cv-qualifiers from the static type of the operand of throw and adjusting the type from ``array of T'' or ``function returning T'' to ``pointer to T'' or ``pointer to function returning T'', respectively. [Note: the temporary object created for a throw-expression that is a string literal is never of type char* or wchar_t*; that is, the special conversions for string literals from the types ``array of const char'' and ``array of const wchar_t'' to the types ``pointer to char'' and ``pointer to wchar_t'', respectively (conv.array), are never applied to a throw-expression. ] The temporary is used to initialize the variable named in the matching handler (except.handle). The type of the throw-expression shall not be an incomplete type, or a pointer or reference to an incomplete type, other than void*, const void*, volatile void*, or const volatile void*. Except for these restrictions and the restrictions on type matching mentioned in except.handle, the operand of throw is treated exactly as a function argument in a call (expr.call) or the operand of a return statement. -4- The memory for the temporary copy of the exception being thrown is allocated in an unspecified way, except as noted in basic.stc.dynamic.allocation. The temporary persists as long as there is a handler being executed for that exception. In particular, if a handler exits by executing a throw; statement, that passes control to another handler for the same exception, so the temporary remains. When the last handler being executed for the exception exits by any means other than throw; the temporary object is destroyed and the implementation may deallocate the memory for the temporary object; any such deallocation is done in an unspecified way. The destruction occurs immediately after the destruction of the object declared in the exception-declaration in the handler. http://www.kuzbass.ru:8086/docs/isocpp/exc...l#except.handle Цитата -19- When the handler declares a non-constant object, any changes to that object will not affect the temporary object that was initialized by execution of the throw-expression. When the handler declares a reference to a non-constant object, any changes to the referenced object are changes to the temporary object initialized when the throw-expression was executed and will have effect should that object be rethrown.
|
|
|
![]() ![]() ![]() |
![]() |
Текстовая версия | Сейчас: 11.3.2025, 13:57 |