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
0 answers

What is the correct syntax to filter an XUnit test with specific inline data using the dotnet test command?

I am trying to apply a --filter when calling XUnit tests with dotnet test. The goal is to retry some specific test cases with values in the InlineData attribute. For example: [Theory] [InlineData(1, 2, 3)] [InlineData(2, 2, 4)] public void…
Matthew MacFarland
  • 2,413
  • 3
  • 26
  • 34
1
vote
3 answers

How do I call a named parameter Python function from Perl?

I am using Inline::Python 0.56, trying to call a Python function with named parameters from Perl. I have replaced the original code fragments with an example that can be run, as requested: use strict; use warnings; use 5.16.3; use Inline Python =>…
mpersico
  • 766
  • 7
  • 19
1
vote
0 answers

Inline inside flex

I am currently using the following css to display a list of items with a flexbox section ol li div ul { display:flex; flex-direction:row; flex-wrap: wrap; gap:7px; row-gap:0; list-style-type: none; …
Serker
  • 41
  • 2
1
vote
1 answer

run-time large performance drop from gcc 7.5.0-6ubuntu2 to gcc 8.4.0-3ubuntu2

After starting to use gcc 11 of Ubuntu 22.04 I've noticed I have ~90% degradation in my c application performance - the way I measure it. Narrowing it I saw the degradation happens since gcc 8.4.0-3ubuntu2. Now I'm on Ubuntu 22.04 using gcc-7 and…
hudac
  • 2,584
  • 6
  • 34
  • 57
1
vote
1 answer

List wont appear Inline when CSS Rule is added

Here is my HTML:
  • Facebook Marketing Partner Black Logo

    Facebook Premier Level Agency Partner

1
vote
1 answer

Inline recursive functions

I thought that calling a inline function inside of itself wouldn't be allowed because it would lead to something like infinite source code when the function's invokations get replaced with its body(if that happends). But, when I test is that…
markoj
  • 150
  • 10
1
vote
1 answer

Should I use force inline Functions In C++ with singleton class

I am learning to use inline functions While looking at different projects I don't see the use of __forceinline usually in code So I want to know if there are any reasons you won't use __forceinline in the GetInstance function of a singleton…
1
vote
0 answers

C++ 17: Can I use inline for global variables?

In C I used to declare global variables like this: my_C_header.h: #ifdef my_C_file_C #define extint #else #define extint extern #endif extint int32_t my_variable; I had to include this in my_C_file.c which had a #define my_C_file_C at the top.…
1
vote
1 answer

Django-selectable with dynamic inlines

I'm using django-selectable ( https://bitbucket.org/mlavin/django-selectable ) with an admin tabularInline to get autocomplete functionality on one of the inline fields. It works for inlines added at creation time. The problem I'm having is that the…
Rory
  • 11
  • 2
1
vote
2 answers

Is it ok to return address of rvalue in inline functions?

I know that inline functions get copied into the code each time they are referenced. From my current understanding, I think it would be ok to return the address of an rvalue from an inline function since the function is inside the rest of the code…
user13721385
1
vote
1 answer

What is the difference between @inlined and @@inline in OCaml?

What is the difference between using @inlined and using @@inline after a function declaration?
cswannabe
  • 65
  • 4
1
vote
2 answers

Telegram bot: editMessageReplyMarkup method doesn't work

I've developed a telegram bot using Node.js and node-telegram-bot-api module that sends a message and an inline keyboard to the users, what I'm trying is to achieve that after the user clicks the button, the inline keyboard must disappear. I'm using…
1
vote
0 answers

Prevent "inlining" of an inline function

I want to define my functions in a header file, because I want my code to be header only. The problem is, that I need to include the same header file into multiple files, which causes function redefinition. One way to solve it would be inlining all…
Dave F.
  • 145
  • 6
1
vote
3 answers

Why not use inline CSS if all the HTML+CSS is generated at runtime by javascript and no developer will need to work with css and html?

The only reasons I see on the internet to not to use inline-css is because of the separation of html and css & management, but if this is not a problem in my case I don't care I will use. Another pro I can say is this: imagine you want to load a…
Totty.js
  • 15,563
  • 31
  • 103
  • 175
1
vote
1 answer

Appending
  • item to
  • I have been trying to append "Avocado" to this list but then I get the error message Uncaught TypeError: Cannot read properties of null (reading 'appendChild') Am I Loaded ?!…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/typescript" class="post-tag grid--cell" title="show questions tagged 'typescript'" rel="tag">typescript</a> <a href="../../questions/tagged/list" class="post-tag grid--cell" title="show questions tagged 'list'" rel="tag">list</a> <a href="../../questions/tagged/inline" class="post-tag grid--cell" title="show questions tagged 'inline'" rel="tag">inline</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked May 16 '22 at 11:50">asked May 16 '22 at 11:50</time> <a href="../../users/17828841/roaling" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/17828841.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Roaling" /> </a> <div class="s-user-card--info"> <a href="../../users/17828841/roaling" class="s-user-card--link">Roaling</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">77</li> <li class="s-award-bling s-award-bling__bronze" title="5 bronze badges">5</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/inline_page=99" rel="prev" title="Go to page 99">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/inline_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/inline_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/inline_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/inline_page=99" rel="" title="Go to page 99">99</a> <div class="s-pagination--item is-selected">100</div> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>