Skip to main content
0 votes
1 answer
86 views

While I tried to understand inline functions, I found myself in a rabbit hole which is very deep. I get to know that inline is a function specifier, that inline is a mere hint to a compiler, that it's ...
Doohyeon Won's user avatar
3 votes
0 answers
42 views

I am writing a cryptographic program for my bachelor's. I've been uzing an mpz_t variable for exponentiation with the PBC library. Currently, to avoid running mpz_init on every exponentiation, I only ...
nazar's user avatar
  • 31
0 votes
0 answers
60 views

The problem is I do want to define a function thats must be inline but I can't define it in the .c file of library becouse it's only be inline for in own file of library. Where should I declare my ...
user avatar
0 votes
1 answer
57 views

Considering the following function body: fn update_acc(&mut self, acc_rub: &Vector3<f32>, _t: u64) -> () { let acc = Self::rub_to_frd(acc_rub); if acc.norm() <...
tribbloid's user avatar
  • 3,822
0 votes
1 answer
103 views

I'm assigned to review and renew an old private library, which contains tons of do { .. } while(0) macros. After some investigations, I decided to replace them with static inline functions. After some ...
Qiuye-Hua's user avatar
3 votes
0 answers
122 views

inline bool mycmp(int i, int j) { return (i < j); } class mycmp2 { public: bool operator()(int i, int j) { return (i < j); } }; above is my example. I want know why the ...
xf h's user avatar
  • 39
2 votes
2 answers
178 views

I have a strange error concerning the inline keyword, this is just a sample code I wrote: #include <stdio.h> #include <stdint.h> uint8_t inline LIB_MATH_BTT_u8GetMSBSetBitPos(uint32_t ...
abdo Salm's user avatar
  • 1,913
0 votes
1 answer
52 views

I am trying to set up a class for representing 2-3D vectors. It's a template class that takes in a Coord type (integral/flaoting point representation of coordinates) and Dim (number of dimensions) as ...
Chimess's user avatar
  • 25
-1 votes
2 answers
337 views

#define INLINE static inline __attribute__((always_inline)) INLINE void swap(int a, int b){ int tmp = a; a = b; b = tmp; } int main(){ int x = 10; int y = 20; swap(x, y); ...
kaan's user avatar
  • 117
0 votes
0 answers
134 views

So I've got a rendering engine where in certain applications, it makes sense to use a vertex buffer, while in other applications it makes sense to use a triangle buffer. I'll briefly explain the ...
Chris Gnam's user avatar
6 votes
3 answers
812 views

On the cppreference page for the inline specifier, it says, The inline specifier, when used in a function's decl-specifier-seq, declares the function to be an inline function. An inline function has ...
Sourav Kannantha B's user avatar
1 vote
0 answers
63 views

I recently root caused a linking problem in our build after upgrading googletest from 1.8.1 to 1.12.1. Specifically, the problem occurs because we use -fkeep-inline-functions when gcov is enabled and ...
MarkB's user avatar
  • 2,230
0 votes
1 answer
48 views

• The function will be inline; that is, the compiler will try to generate code for the function at each point of call rather than using function-call instructions to use common code. This can be a ...
DJPillu's user avatar
2 votes
0 answers
87 views

Hello I know that if the compiler inlines a function, it replaces its body (statements) in each call to it. I've read this from Stroustrup's programming principles and practice using c++ about ...
Maestro's user avatar
  • 2,572
1 vote
1 answer
210 views

I write a small program to encounter the next day by giving day. I write a program in day_enum.cpp file:- #include <ostream> #include "AllHeader.h" using namespace std; inline days ...
Sangita Paul's user avatar

15 30 50 per page
1
2 3 4 5
13