Skip to main content
2 votes
3 answers
101 views

I want to pass a C-style array to a function taking a std::span, but overload resolution chooses to convert the array to bool instead. Is this behavior required by the standard, or is it a compiler ...
prl's user avatar
  • 12.5k
2 votes
2 answers
145 views

Is there a way to prevent implicit conversions happening in concepts? For example, this example compiles with GCC and clang when I actually want it to give an error that the char constructor is ...
Hello Worlder's user avatar
1 vote
2 answers
93 views

This code (reduced from the Chromium codebase) is accepted by Clang but rejected by GCC: template<class T> concept Concept = requires {typename T::marker;}; #define INJECT_MARKER using marker = ...
kinokijuf's user avatar
  • 994
0 votes
0 answers
95 views

I'm interested to understand more about performing file IO operations with systems programming languages in a way which does not use both a kernel space buffer and a user space buffer. Specifically I ...
user2138149's user avatar
  • 18.8k
2 votes
2 answers
79 views

Because of some FFI code interacting with C++ I need precise manual control on when the Drop::drop() method of types is called w.r.t. those of fields. To be more precise: When a C++ struct is ...
Nicola Gigante's user avatar
0 votes
1 answer
34 views

I have the following HDSentinel.cpp program designed to run under the GTK+ library environment. I had a simple Hello.cpp program that I tried to adapt so that the "Hello World" button would ...
Stephen Elliott's user avatar
1 vote
2 answers
107 views

I'm currently working on a project that requires a multi-threaded approach. This project is currently platform specific, i.e. Windows. This is how my read code looks like: #pragma once #include <...
neo's user avatar
  • 67
Tooling
0 votes
1 replies
45 views

I have problems with the indentation where I am using keywords like export in combination with namespace. export namespace foo::bar { // indentation is wrong } when the export keyword is one line ...
Code4Fun's user avatar
  • 177
2 votes
1 answer
105 views

I'm using VS Code with CMake Tools extension on Ubuntu. This C++ program produces the following output when run with "CMake: Debug" (which I select using the Command Palette): #include <...
Ivan's user avatar
  • 509
2 votes
1 answer
98 views

Short version: Does an explicit instantiation declaration guarantee that a visible template definition is never used (unless an explicit instantiation definition is also encountered), and therefore ...
Bernard's user avatar
  • 5,820
3 votes
1 answer
95 views

i am having trouble updating c_cpp_properties.json: { "version": 4, "configurations": [ { "name": "windows-clang-x64", "includePath&...
Andrew 's user avatar
4 votes
1 answer
116 views

While answering this question I decided to check myself and did a little experiment. There are three files: // moo.h #ifndef MOO_H #define MOO_H #include <iostream> struct Moo { Moo() { ...
n. m. could be an AI's user avatar
Advice
1 vote
17 replies
195 views

The following code compiles on std >= C++20 but fails to compile on std < C++20. This holds for msvc, gcc and clang. #include <cstdio> int main() { struct byte { unsigned ...
Puzomor Croatia's user avatar
1 vote
2 answers
363 views

As C++26 standard's timeline is getting near, I want to know: What is(are) the reason for no built in support of networking by the C++ standard. That is, what exactly are the problems that lead to ...
Richard's user avatar
  • 47.7k
0 votes
2 answers
91 views

a (main calls c and d) | +-----------+-----------+ | | libc.so (c calls b) libd.so (d calls b) | | | | ...
shynur's user avatar
  • 507

15 30 50 per page
1
2 3 4 5
54336