Skip to main content
0 votes
1 answer
34 views

I'm using Windows 11, CMake, VSCodium, clangd 21.1.0 and Visual Studio 2022 Community. I can compile my project just fine but I don't know how to get clangd set up and working, I know that it's ...
David Carpenter's user avatar
3 votes
1 answer
142 views

My program changed its behavior after updating Visual Studio to the latest version (2026). Simplifying it, I got the following minimal example, which contains a ternary operator with a throw in ...
Fedor's user avatar
  • 24.7k
4 votes
1 answer
175 views

I am encountering suspicious behavior with std::atomic_ref::is_lock_free() in Microsoft Visual Studio's C++ compiler (MSVC version 14.38.33130). The method returns true for a very large structure (...
undefined's user avatar
  • 228
0 votes
0 answers
134 views

I wrote two versions of a little program in C++ with MSVC on Windows 11: First one: #include <iostream> #include <Windows.h> int main() { SetConsoleOutputCP(CP_UTF8); std::cout &...
Tim's user avatar
  • 325
0 votes
1 answer
179 views

Here's the code: struct S{}; int main() { S::S{}; return 0; } When using GCC and Clang, it will fail with a clear error output: qualified reference to 'S' is a constructor name rather than a ...
miyan's user avatar
  • 137
Advice
1 vote
7 replies
179 views

In the question Why does Microsoft's implementation of std::string require 40 bytes on the stack? the observation is made, that a std::string requires 8 additional bytes in Debug mode. After ...
Brandlingo's user avatar
  • 3,242
0 votes
1 answer
60 views

In a modeless dialog box in MFC, I want to create an edit box control, derived from CEdit, that will allow me to intercept keystrokes (in particular the CR) and process it differently from the default ...
WillDotson's user avatar
0 votes
1 answer
60 views

I'm trying to subclass an edit box in a dialog in VS C++ 2022. I want to intercept any key presses in a particular edit box to do further processing. Here's my code. The 4th line confuses me because I ...
WillDotson's user avatar
14 votes
1 answer
373 views

Consider the following snippet: int main() { struct Local { virtual void foo() = 0; }; void (Local::* ptr)() = &Local::foo; } When compiling with C++20, GCC 13.3.0 and Clang 18.1.3 ...
OLEGSHA's user avatar
  • 728
0 votes
1 answer
115 views

When I perform integer division by zero on Windows 11 on Arm64, it raises a SEH exception. That is rather surprising, considering Arm by default does not trap zero division. My question is: does the ...
Alex Guteniev's user avatar
12 votes
1 answer
736 views

I'm trying to register a Thread-Local Storage (TLS) callback in a Windows application without using the C runtime (CRT). Compiler: MSVC 14.44.35207 (Visual Studio 2022) Target: x64 OS: Windows 11 I ...
felix's user avatar
  • 131
2 votes
1 answer
184 views

I am trying to call idiv r/m8 using MSVC2022's current Microsoft Visual C++ Compiler 17.4.33403.182 and C++. Using the most straightforward approach: struct cdiv_t { // char std::int8_t quot; ...
JohannesWilde's user avatar
2 votes
2 answers
148 views

Using CMAKE_BUILD_TYPE="Debug" my MSVC 2022 [17.4.33403.182] produced one idiv call for the quotient and an identical idiv call for the remainder. The code was simply [see here for the ...
JohannesWilde's user avatar
0 votes
0 answers
88 views

I'm programming a MFC application that should be internationalized. Currently I'm providing separate language DLLs per architecture (ARM64, x86, x64), but I'm unsure whether this is really necessary. ...
MrTux's user avatar
  • 34.4k
0 votes
0 answers
91 views

I'm programming a MFC application that should be internationalized. Currently I'm providing separate language DLLs per architecture (ARM64, x86, x64), but recently I came accross ::LoadLibraryEx(...
MrTux's user avatar
  • 34.4k

15 30 50 per page
1
2 3 4 5
2121