= Сообщение: 6265 из 10756 ===================================== RU.UNIX.BSD = От : Konstantin Stefanov 2:5020/400 25 Dec 17 10:10:38 Кому : Alex Korchmar 25 Dec 17 10:10:38 Тема : Re: кстати, об истории с inline FGHI : area://RU.UNIX.BSD?msgid=<1187508629@ddt.demos.su>+058a34c3 На : area://RU.UNIX.BSD?msgid=<1187508614@ddt.demos.su>+2ebe04f5 = Кодировка сообщения определена как: IBM866 ================================= ============================================================================== From: Konstantin Stefanov <cstef@mail.ru>
А вообще это наркоманство из стандарта идет, правда, там это более витиевато написано: 6.7.4.7 (C11) Any function with internal linkage can be an inline function. For a function with external linkage, the following restrictions apply: If a function is declared with an inline function specifier, then it shall also be defined in the same translation unit. If all of the file scope declarations for a function in a translation unit include the inline function specifier without extern, then the definition in that translation unit is an inline definition. An inline definition does not provide an external definition for the function, and does not forbid an external definition in another translation unit. An inline definition provides an alternative to an external definition, which a translator may use to implement any call to the function in the same translation unit. It is unspecified whether a call to the function uses the inline definition or the external definition.
> И правильно ли я понимаю, что надо при следующей встрече все это порождение > наркоманского разума выпилить из кода и заменить на одно слово inline без > всяких подчеркиваний? Hет. Если ты это выкинешь, то надо будет в каждом файле, где используется эта функция, повторить определение. А так она будет inline в том файле, где это написано, и видна как обычная функция в других файлах.
-- Константин Стефанов
Hе убывает в магазинах водка, соотносясь с ресурсами опилок. --- ifmail v.2.15dev5.4 * Origin: Demos online service (2:5020/400)