Movatterモバイル変換


[0]ホーム

URL:


Sorry, we no longer support your browser
Please upgrade toMicrosoft Edge,Google Chrome, orFirefox. Learn more about ourbrowser support.
Skip to main content
Stack Overflow
  1. About
  2. For Teams
Loading…
How are we doing? Please help us improve Stack Overflow.Take our short survey
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives
654 questions
Filter by
Sorted by
Tagged with
10votes
2answers
584views

It is easy to iterate std::map and update values:#include <iostream>#include <map>int main() { std::map<int, int> m; m[1] = 2; m[2] = 4; for (auto &[k, v] : m)...
Best practices
0votes
11replies
223views

first I must says that I hate templates.... it makes unreadable complex code.... not speaking about 5000000 lines long error messages, with 10000 possibilities and that takes ages to understand for ...
5votes
1answer
131views

[stdatomics.h.syn] specifies the following:template<class T> using std-atomic = std::atomic<T>; // exposition only#define _Atomic(T) std-atomic<T>libc++ and libstdc++ ...
Jan Schultke's user avatar
Advice
0votes
5replies
98views

I wonder if using the [[assume]] attribute can have negative effects on my code, even if the expressions inside are always true.In my code, I defined the following macro:#ifdef DEBUG #include &...
PlsHelp's user avatar
2votes
0answers
54views

In WSL (Ubuntu 24.04), when using Conan to create a package that links pybind11/3.0.1, the resulting executable in the test_package fails to run.Even if the executable doesn't directly call any ...
0votes
1answer
133views

I'm trying to generate compile-time info about my POD types. Getting the offset of each member has been challenging due to limitations like no pointer conversions in constexpr, but I think I've found ...
11votes
1answer
316views

Here is a possibly incorrect program for communicating between a function and a signal handler that might interrupt it. Assume that HandleSignal has been arranged to run as a signal handler. The ...
2votes
2answers
197views

Im wondering if there is a better, more typesafe, way to return "a selection" than I do at the moment.If we only ever have one selected element at a time, we can just return a reference, ...
6votes
2answers
261views

I'm building a container which uses, as its internal representation, a couple of standard containers, each with a different type. I need to code my version of emplace(..) and here's where I got stuck....
Andrea Bocco's user avatar
2votes
0answers
166views

I was trying to learn about how to use timespec_get in c++ (for fun)I tried to compile the following code using g++ 14.1.0//main.cpp#include <ctime>int main(){ std::timespec CurrentTime;...
1vote
0answers
84views

I'm trying to get clang-cl (the compiler I installed via Visual Studio Installer), MSVC standard library and IntelliSense to work together.Simple 'Hello world' by C++23 std::println does build and ...
1vote
1answer
455views

I am trying to use the C++ 23 stacktrace header in my project but I can't get it to compile. I've reproduced this with a minimal case to demonstrate the error I am getting. Any input would be greatly ...
2votes
1answer
137views

I have a C++ function template:#include <string_view>template<typename T>T get_gadget(std::string_view str);I also added explicit specializations for some user-defined types, e.g., ...
Roger World's user avatar
6votes
1answer
245views

I'm calling a 3rd-party C99 library from modern C++. The API contains a struct that ends with a flexible array member. To allocate the struct on the stack I think I need a byte buffer then cast it to ...
-1votes
1answer
203views

Here is code:aml::type_list<int,int,char,std::string> example;std::tuple_element_t<2,std::tuple<decltype(example)>> a = 'b';But when i try to run code it says, static assertion ...

153050per page
1
2345
44

Hot Network Questions

more hot questions
Newest c++23 questions feed

[8]ページ先頭

©2009-2025 Movatter.jp