Skip to main content

Questions tagged [c++11]

C++11 is the name of the C++ standard, approved in 2011. It replaces the previous C++03 standard, adding various core language changes and fixes, and an improved and expanded standard library.

0 votes
1 answer
178 views

C++ memory visibility, passing data between threads

I use code like this and it seems to work fine: void addActions(const vector<zero_arity_function>& _actions) { actionsMutex.lock(); for (auto entry : _actions) { ...
stands2reason's user avatar
0 votes
2 answers
110 views

What is the minimum now() functionality required for std::chrono clocks [closed]

I would like to use std::chrono::time_point in some simulation software I am writing. I would like to take advantage of features like the time point arithmetic functions. However, I run into a snag. ...
Cort Ammon's user avatar
  • 11.6k
0 votes
2 answers
196 views

Modular Design affects compilation time

Does modular design decrease compilation time in cpp? My professor said so, but I don't understand how, because the build and compilation time depend on the amount of code, right? Also, wouldn't ...
happy's user avatar
  • 11
0 votes
2 answers
922 views

Is TC++PL 4th Edition by Bjarne Stroustrup outdated?

First of all, I hope this question doesn't fall under "Asking For Books Recommendation" Category. Since TC++PL covers C++11, it is 3 revisions old (C++14, C++17, C++20), the ISO group is ...
theasker's user avatar
1 vote
1 answer
1k views

How does a blocking call work?

Effective Modern C++ recommends using void futures as a way to communicate one-off events from one thread to another. Below is a minimal reproduction of that practice. std::promise<void> promise;...
msmoiz's user avatar
  • 21
0 votes
1 answer
48 views

Dynamically discovering field usages for validation

Thanks for reading my question. I have a class which reads a configuration and based on the configuration, populates a data structure by reading from a database, which is ultimately presented to a ...
Sampath's user avatar
  • 119
0 votes
0 answers
61 views

Modular design of authentication schemes for a http client

I want to make a httpClient wrapper that is able to use a predefined set of authentification methods: basic, digest, token (oauth), ntlm just to name a few that I will have to implement. My approach ...
niraami's user avatar
  • 109
1 vote
3 answers
724 views

What is the best object-oriented design approach for a tree with two node types?

I have a tree-like structure as shown in below picture (as one small example). The tree consists of two different node types, that are: Data Nodes: These nodes that are colored in yellow contain ...
TonySalimi's user avatar
1 vote
2 answers
313 views

Worker pool running tasks of the same kind serially

I would like to run tasks in parallel. At this time, I am using a very simple worker pool using a single concurrent queue shared by all the threads. Every task has a non unique "tag" (an integer in ...
Willie Taylor's user avatar
2 votes
1 answer
276 views

Why did C++11 add find_if() instead of overloading find()?

Why did c++11 add a separate find_if() instead of simply overloading the existing find()? Wouldn't overloading the function be sufficient?
Jankovsky144's user avatar
4 votes
1 answer
122 views

Coupling and shared entity classes

I am currently working on a problem that has a central controller that is handling inputs and outputs between various modules and maintaining a number of entity classes as these change. When working ...
zachsmthsn's user avatar
2 votes
2 answers
295 views

Introduce code standard into old code

Our main product is written in C++ MFC and follows the same code standard as MFC. Now we will start to develop new components, and think about whether we should continue to use the same outdated ...
magol's user avatar
  • 201
2 votes
0 answers
1k views

multithreading - waiting on a condition without using locks (c++11)

i've been wondering about it for a while now but never found any answers. is it possible to use something like a condition variable without a lock? I have a vector of objects, and a thread pool, and ...
Alon Hershkovitz's user avatar
0 votes
1 answer
216 views

What OOP design pattern would work best for an overseeing class connecting related objects enforced at compile-time?

The Problem I would like to create a managing "overseer" class that connects several related object groups together where any particular group is able to be easily swapped for another using ...
Alex's user avatar
  • 9
0 votes
1 answer
242 views

Re-usability in C++ using Interfaces and External Configuration

I am practicing professional C++ by building a differential drive robot that applies a Go-To-Goal Behavior. What is I have written so far is an Agent that consumes the following interfaces: ...
Sam Hammamy's user avatar

15 30 50 per page
1
2 3 4 5
12