Questions tagged [inline]

Use this tag for questions specifically about the effects of the inline keyword, together with the appropriate language tag.

Inline, or inline expansion, is a programming language optimization that inserts the complete body of the function in every place that the function is called. Depending on the programming language, this may be implemented by the compiler, manually or by a keyword.

Historically, in the C and C++ programming languages, an inline function is a function upon which the compiler has been requested to perform inline expansion. In other words, the programmer has requested that the compiler insert the complete body of the function in every place that the function is called, rather than generating code to call the function in the one place it is defined. However, modern compilers usually use their own heuristics and ignore the request. Thus, the inline keyword is now mostly used for its effects on the One Definition Rule.

Inline expansion is used to eliminate the time overhead when a function is called. It is typically used for functions that execute frequently. It also has a space benefit for very small functions, and is an enabling transformation for other optimizations.

3753 questions
1
vote
2 answers

Is the text inside the

element considered an inline element?

I'm trying to make sense of the CSS float property, and I understand the basic motivation of text flowing around a floated image. My question is this: since inline elements flow around floated elements, even if if those inline elements are children…
worker1138
  • 2,071
  • 5
  • 29
  • 36
1
vote
2 answers

inline view query

I wanted to delete some records which i added recently, from this table mytemp, please tell me what is wrong with this query, data in selected column had been populated using cursor DELETE FROM (SELECT ROWNUM RM, S from mytemp) where rm >…
ratsy
  • 575
  • 4
  • 7
  • 13
1
vote
3 answers

glibc - force function call (no inline expansion)

I have a question regarding glibc function calls. Is there a flag to tell gcc not to inline a certain glibc function, e.g. memcpy? I've tried -fno-builtin-memcpy and other flags, but they didn't work. The goal is that the actual glibc memcpy…
1
vote
4 answers

c: inline enum with a function implementation

I have come across some c code where the there is an enum type followed by a function implementation, such as this: enum OGHRet funcX ( OGH *info, void *data, int size ) { /* c code that does stuff here */ } I am confused over how this enum…
1
vote
2 answers

What is better to use inline functions or MACROS in C++ for variable length function pointers

I have an application which has a lot of functions which go through all the elements of a menu toolbar. The code looks like something like this: subMenuDefaultMenuShortcuts( ui->fileMenu…
Anton
  • 1,181
  • 2
  • 17
  • 27
1
vote
2 answers

how to replace a string inside perl regex

Is there a way to replace characters from inside the regex? like so: find x | xargs perl -pi -e 's/(as dasd asd)/replace(" ","",$1)/' From OP's comment code find x | xargs perl -pi -e 's/work_search=1\/ttype=2\/tag=(.*?)">(.*?)<\/a>/work\/\L$1\E\"…
Pavel
  • 964
  • 1
  • 6
  • 18
1
vote
2 answers

SQL Server: executing dynamic/inline sql table name within EXEC and passing geometry as geometry parameter

I'm trying to execute an inline SQL statement within a stored procedure. I'm working with SQL Server 2008. The problem is that I can't execute the first inline statement (with WHERE clause). It crashes because the string within EXEC(...) is…
Patrick Hillert
  • 2,309
  • 4
  • 22
  • 37
1
vote
3 answers

Inline dynamic CSS possible via PHP?

I'm looking to dynamically generate some inline CSS and was wondering if it was possible via PHP. Basically, I'm passing multiple variables via query string and am doing some arithmetic with the values to create values for CSS. Here's what my page…
Media804
  • 41
  • 6
1
vote
1 answer

Can I compile OpenCL code into ordinary, OpenCL-free binaries?

I am evaluating OpenCL for my purposes. It occurred to me that you can't assume it working out-of-the-box on either Windows or Mac because: Windows needs an OpenCL driver (which, of course, can be installed) MacOS supports OpenCL only on MacOS >=…
clemens
  • 422
  • 2
  • 12
1
vote
1 answer

Making some HTML elements behave as 'block' ones when mixed with inline elements inside an inline parent

I'm trying to get an div with its display property set to inline (or inline-block if I want a margin) to behave correctly in IE (it does in most others). My situation is this - imagine a workspace in which an item container contains inline items…
1
vote
3 answers

Splitting long method maintaining class interface

In my library there's a class like this: class Foo { public: void doSomething(); }; Now, implementation of doSomething() has been grow a lot and I want to split it in two methods: class Foo { public: void doSomething(); private: void…
Alessandro Pezzato
  • 8,603
  • 5
  • 45
  • 63
1
vote
1 answer

"inline Methods Hidden" option in XCode4.

See document information: inline Methods Hidden GCC_INLINES_ARE_PRIVATE_EXTERN = YES When enabled, out-of-line copies of inline methods are declared 'private extern'.[GCC_INLINES_ARE_PRIVATE_EXTERN, -fvisibility-inlines-hidden Does anyone know how…
jianhua
  • 1,011
  • 1
  • 12
  • 28
1
vote
1 answer

Django admin- inlines and collapse fields

I am using inlines to allow the editing of the Drivers and Riders objects from Family in the admin, as shown below. I would like the Driver and Rider objects to be collapsed, but it appears that that only works for fields in the class, not fields…
mb52089
  • 872
  • 2
  • 10
  • 24
1
vote
1 answer

Should the keyword "inline" be used in EVERY declarations?

How does compiler decide whether the function should be considered for inline or not? Unlike linkage, there is no such thing as "inline" conflicts (declarations of same name may have inline or not). For example, multiple declarations of functions…
SHH
  • 3,226
  • 1
  • 28
  • 41
1
vote
4 answers

Two Paragraphs/Divs inline

Hi there I am not sure how to go about a particular problem so here it is. Without using a Table I would like to display a paragraph with multiply lines of text then have an image on the right. So far I have tried this:

Delta_Cmdr
  • 180
  • 1
  • 5
  • 16