General C++ Programming - June 2023

by Ganado
I was surprised by subobject references
 
Just thought this was interesting. I had a typo where I put "const Blah" instead of "const Blah&", and I thought that would make it copy the object's contents b...
[2 replies] Last: I find it helpful to think of a reference as a synonym for another var... (by dhayden)
Came back after 7 years to learn C++ and Software Development Patterns.
 
---- PreDescription ---- Started programming back in 2015-2016 using C++ and then got lost in many other programming languages. Python, Java, C#, JS, HTML just...
[18 replies] Last: What's the point of writing that down in a concept? Consider leaving ... (by seeplus)
The collection of terrible tips for C++ developers
 
It could be tedious to constantly explain "how to do proper coding". So, I wrote a small book called "60 terrible tips for a C++ developer" - https://pvs-studio...
[2 replies] Last: I honestly think nowadays PCHs aren't really worth it. With modern hig... (by helios)
This looks interesting
 
Solving Undefined Behavior in Factories with constinit from C++20 https://www.cppstories.com/2023/ub-factory-constinit/ It would be helpful for opinions from o...
[1 reply] : Well, the entry is not overly promising: static unique_ptr<ICompressi... (by coder777)
by frek
C++ programming group on Telegram
 
Hi all, I like to join a few C++ Telegram groups as social media is nowadays very good too. The one such a Telegram group that I know which is really great ...
[no replies]
Designing a Role-Based Access Control (RBAC)
 
I am looking into on how to design, and develop a RBAC system that limits and enforces access to a product base on roles and permissions. This is something I wa...
[4 replies] Last: An example of implementing a system on Windows using Azure or other pl... (by deleted account xyzzy)
what is the difference between returning auto vrs returning decltype(auto)?
 
when should we choose to return decltype(auto) instead of returning auto? For instance: template<typename CB> class CountCalls { CB callback;...
[5 replies] Last: Sorry helios but I never quite understood it.... I apologize. Thanks P... (by JUANDENT)
by frek
Implement or get special member functions defaulted
 
Hi, In what situations would you implement your class's special member functions? Suppose there's a class like: template <typename T> class myClass { public: ...
[2 replies] Last: If the class holds at least one pointer variable then you'll probably ... (by seeplus)
by Atom1
Add a managed .net dll to a cpp dll project (1,2)
 
I am trying to create a cpp dll which will utilize the functions of a managed .net dll. How do I create a reference to the .net dll in my cpp project? The .net ...
[37 replies] Last: You would want to use "Unicode" (i.e. UTF-16, little endian), because ... (by kigar64551)
by Atom1
C++ to call managed .Net dll
 
Ninjatrader.com provides a dll (NinjaTrader.Client.dll) along with their trading platform which allows third party API's to send orders (among other things) to ...
[2 replies] Last: Neither this WRAPPERLIBRARY_API wchart_t __stdcall MySayHelloWrapper(v... (by Atom1)
by frek
defaulted member function
 
What does =default mean in: struct S { int i; S(int ii) : i(ii) {} S() = default; }; If you say, it means that the compiler generates definition/impleme...
[8 replies] Last: I have all 5 of the eBooks seeplus mentions and they are worth the eff... (by deleted account xyzzy)
Correct order of FOR loops, given order of data in external files
 
The dimensioned variable HOMEPAT is a stock or inventory variable in a system dynamics simulation model. Initial values of this stock are read into the model at...
[4 replies] Last: The OP just PMed me and whined that he didn't like my feedback. Tough... (by deleted account xyzzy)
How to interpret Catch2 output when calculating a BENCHMARK?
 
Hi, I have this code: TEST_CASE("Extract_error", " ") { BENCHMARK("find_include_name") { using namespace std; ParserTest parser{ false }; ...
[1 reply] : [quote=JUANDENT]why is the mean value so different from the estimated ... (by Peter87)
  Archived months: [may2023] [jul2023]

This is an archived page. To post a new message, go to the current page.