AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Languages, Compilers and Interpreters C,C++,C#,.NET,Java,PHP,Perl,SQL and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Jun 11, 2004, 11:04   #1
Administrator
 
greka's Avatar
 
Join Date: Sep 2001
Location: @work
Posts: 5,347
Rep Power: 10
Reputation: 23
Send a message via ICQ to greka
restrictions on INLINE statement

Does anybody know where can be found the list with all available restrictions on INLINE functions for latest C/C++ standards?

thank you.
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
greka is offline   Reply With Quote Quote selected
Old Jun 11, 2004, 12:24   #2
Грустно...
 
Agregat's Avatar
 
Join Date: Aug 2002
Location: Там, где всегда идут дожди
Posts: 21,614
Rep Power: 11
Reputation: 202
Send a message via ICQ to Agregat Send a message via MSN to Agregat
3.2. par 3. : An inline function shall be defined in every translation unit in which it is used.
3.6.1 par 3: A program that declares main to be inline or static is ill-formed.
7.1.2 par 2: A function declaration (8.3.5, 9.3, 11.4) with an inline specifier declares an inline function. The inline specifier indicates to the implementation that inline substitution of the function body at the point of call is to be preferred to the usual function call mechanism. An implementation is not required to perform this
inline substitution at the point of call; however, even if this inline substitution is omitted, the other rules for inline functions defined by 7.1.2 shall still be respected.
7.1.2 par 3: A function defined within a class definition is an inline function. The inline specifier shall not appear on a block scope function declaration. If the inline specifier is used in a friend declaration, that declaration shall be a definition or the function shall have previously been declared inline.
7.1.2. par 4: An inline function shall be defined in every translation unit in which it is used and shall have exactly the
same definition in every case (3.2). [Note: a call to the inline function may be encountered before its defi-
nition appears in the translation unit. ] If a function with external linkage is declared inline in one translation
unit, it shall be declared inline in all translation units in which it appears; no diagnostic is required. An inline function with external linkage shall have the same address in all translation units. A static local variable in an extern inline function always refers to the same object. A string literal in an extern inline function is the same object in different translation units.

Это основное из C++ stnadard working draft. Есть еще несколько вхождений, но они не так важны.
__________________
http://аvitya.livejournal.com
Хотели, как лучше, а получилось даже хуже...
Лозунг шахматиста: На каждый шах - ответим матом!
Agregat is offline   Reply With Quote Quote selected
Old Jun 11, 2004, 12:36   #3
the mochinger
 
Hans Andersen's Avatar
 
Join Date: Feb 2002
Location: Paranoid Android, @10:50
Posts: 1,769
Rep Power: 7
Reputation: 109
Send a message via ICQ to Hans Andersen Send a message via MSN to Hans Andersen Send a message via Yahoo to Hans Andersen
Why don't you gather all of the information form the latest c++ standard?
Btw, the inline and register keywords has proved to be meaningless and probably will be removed from the standard in the future.
Hans Andersen is offline   Reply With Quote Quote selected
Old Jun 11, 2004, 12:42   #4
Грустно...
 
Agregat's Avatar
 
Join Date: Aug 2002
Location: Там, где всегда идут дожди
Posts: 21,614
Rep Power: 11
Reputation: 202
Send a message via ICQ to Agregat Send a message via MSN to Agregat
Quote:
Originally Posted by Hans Andersen
Why don't you gather all of the information form the latest c++ standard?
Btw, the inline and register keywords has proved to be meaningless and probably will be removed from the standard in the future.
Уважаемый, Ганс Андерсен, не могли бы вы мне показать документ, который предлагает убрать эти слова из C++0x стандарта.

Г-н. Казарян: http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/ тут есть draft стандарта. Сам стандарт стоит 18$ можете приобрести
__________________
http://аvitya.livejournal.com
Хотели, как лучше, а получилось даже хуже...
Лозунг шахматиста: На каждый шах - ответим матом!
Agregat is offline   Reply With Quote Quote selected
Old Jun 12, 2004, 11:24   #5
Administrator
 
greka's Avatar
 
Join Date: Sep 2001
Location: @work
Posts: 5,347
Rep Power: 10
Reputation: 23
Send a message via ICQ to greka
спасибо, Агрегат.

2 Hans Andersen: beleive you or not - the location of "latest c++ standard" is not known to me
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
greka is offline   Reply With Quote Quote selected
Old Jun 12, 2004, 19:55   #6
Грустно...
 
Agregat's Avatar
 
Join Date: Aug 2002
Location: Там, где всегда идут дожди
Posts: 21,614
Rep Power: 11
Reputation: 202
Send a message via ICQ to Agregat Send a message via MSN to Agregat
Г-н. Григорян сам стандарт продается, как я сказал за 18$
но Latest draft можно скачать, по линку, что я постнул.
__________________
http://аvitya.livejournal.com
Хотели, как лучше, а получилось даже хуже...
Лозунг шахматиста: На каждый шах - ответим матом!
Agregat is offline   Reply With Quote Quote selected
Old Jun 13, 2004, 11:21   #7
the mochinger
 
Hans Andersen's Avatar
 
Join Date: Feb 2002
Location: Paranoid Android, @10:50
Posts: 1,769
Rep Power: 7
Reputation: 109
Send a message via ICQ to Hans Andersen Send a message via MSN to Hans Andersen Send a message via Yahoo to Hans Andersen
Agregat, o tom chto inline budet ubran iz c++ ja chital v c++ users journal a year ago. Nu dejstvitel'no inline keyword utratila svoju znachimost' uje davno.

Greka, I have year 98's standard, but it is already too old and would be nice to have 2003's one. What I suggest is you ask your boss to buy an electronic version of latest c++ standard. ...and do not forget to send me a copy of it (for the idea)
Hans Andersen is offline   Reply With Quote Quote selected
Old Jun 13, 2004, 19:15   #8
Грустно...
 
Agregat's Avatar
 
Join Date: Aug 2002
Location: Там, где всегда идут дожди
Posts: 21,614
Rep Power: 11
Reputation: 202
Send a message via ICQ to Agregat Send a message via MSN to Agregat
CUJ это конечно хорошо, но на сайте, что я постнул выше - есть нормативные документы и предложения в стандарт. Я читал большинство из них и подобного не встречал
И в догонку, там же, повторюсь, есть черновой вариант нового стандарта, что даже новее чем '03 стандарт .
__________________
http://аvitya.livejournal.com
Хотели, как лучше, а получилось даже хуже...
Лозунг шахматиста: На каждый шах - ответим матом!
Agregat is offline   Reply With Quote Quote selected
Old Jun 14, 2004, 15:30   #9
the mochinger
 
Hans Andersen's Avatar
 
Join Date: Feb 2002
Location: Paranoid Android, @10:50
Posts: 1,769
Rep Power: 7
Reputation: 109
Send a message via ICQ to Hans Andersen Send a message via MSN to Hans Andersen Send a message via Yahoo to Hans Andersen
ja ochen' rad chto dkuug takoj xoroshij sajt,
no vajno li gde pishet Matt Austern?
__________________
The flower that blooms in adversity is the most rare and beautiful of all.
Hans Andersen is offline   Reply With Quote Quote selected
Old Jun 14, 2004, 19:28   #10
Грустно...
 
Agregat's Avatar
 
Join Date: Aug 2002
Location: Там, где всегда идут дожди
Posts: 21,614
Rep Power: 11
Reputation: 202
Send a message via ICQ to Agregat Send a message via MSN to Agregat
Да, в CUJ Остерн может писать все свои соображения, а на официальном сайте workgroup - а стандарта языка С++ все не пишется.
__________________
http://аvitya.livejournal.com
Хотели, как лучше, а получилось даже хуже...
Лозунг шахматиста: На каждый шах - ответим матом!
Agregat is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 00:18.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link