6 questions with no answers
3 votes
0 answers
42 views
Initializing an mpz_t variable with a static function in between translation units
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 ...
0 votes
0 answers
60 views
C/C++ inline functions in a static library (.h file vs .c file)
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 ...
0 votes
0 answers
134 views
Is using an inline function a correct way of handling needing to access the same data from different structures given compile settings?
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 ...
1 vote
0 answers
63 views
How to deal with incompatibility in required language standards and/or extensions between different libraries?
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 ...
2 votes
0 answers
87 views
Should modifying an inline member function cause recompiling the whole class?
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 ...
0 votes
0 answers
133 views
In inline functions, scalar types should be passed by value or reference?
I know, the question of passing scalars by value vs. by reference has been asked and answered gazillion times before, and I know - in general - they should be passed by value. But what about inline ...