Skip to main content
Filter by
Sorted by
Tagged with
6 votes
1 answer
121 views

Copy constructor is called with result of rvalue conditional operator [closed]

According to cppreference, value category of conditional operator in c++ depends on categories of the operands, namely: if both operands are lvalue, then conditional operator is also lvalue, otherwise ...
TDjey's user avatar
  • 85
3 votes
1 answer
70 views

Where does the spurious "-O0" gcc flag come from when compiling my R package that uses Rcpp?

I use Rcpp in my R package. I have a src/Makevars file, where the only modification in the variables is: PKG_CPPFLAGS=-I. -I$(FUZZYCOCO_SRC) -UNDEBUG PKG_LIBS= mylib.a When I compile my package using ...
Karl Forner's user avatar
  • 4,531
-2 votes
0 answers
47 views

Problems using C++ Dll when running C# UI Application

I recently met with a curious problem when using C++ Dll when using C# application "System.BadImageFormatException: 'An attempt was made to load a program with an incorrect format. (0x8007000B)'&...
user1538798's user avatar
  • 1,131
-2 votes
2 answers
110 views

Visual Studio 2022 (v143) std::views gets error "name followed by '::' must be a class or namespace name"

My Visual Studio 2022 (v143) refuses to compile this code below due to an error: name followed by '::' must be a class or namespace name #include <iostream> #include <vector> #include &...
PkDrew's user avatar
  • 2,577
0 votes
0 answers
33 views

Bundler option to use older Ruby headers?

I am running some old ruby code and it misbehaves with the latest versions of some dependencies. I can change the dependency version in the Gemfile and then ask bundle to install the dependencies. The ...
Sparr's user avatar
  • 7,808
-5 votes
2 answers
93 views

C++ compiler for Linux [closed]

I would like to ask about some C++ compilers for arch based linux that you use. I heard about gcc once. Is it that good or can you recommend something better? I haven't tried any compiler on linux yet,...
s1nnxr's user avatar
  • 1
1 vote
1 answer
118 views

Can we use custom formatters for std strings?

I wish to add a custom std::string formatter, so it takes precedence over the default one and I don't have to use formatters for custom types like std::format("{}", Upper(s)). #include <...
3CEZVQ's user avatar
  • 41.1k
1 vote
0 answers
64 views

Do I have to make a separate library if multiple CMake targets need to use a C++ module?

I have a whole bunch of static libraries, and many of them need a c++20 'json-module' I made. So I do: target_sources(lib_OS_interface_and_gui PRIVATE FILE_SET ...
Zebrafish's user avatar
  • 15.8k
-1 votes
0 answers
56 views

Rotating an OpenGL FBO by small increments each frame [closed]

I'm trying to add "trails" to existing elements on screen using an FBO as a pseudo accumulation buffer. I fade these trails out in the fragment shader: sampled.w -= (1.0 / intensity) * ...
Nick Fetcko's user avatar
2 votes
1 answer
47 views

How to make QProgressDialog responsive while avoiding all user input

I have an operation that does a lot of ui updates and can take a long time. I want to make sure to show a progress bar and be able to handle a cancel button while this is running. I don't want any ...
Techniquab's user avatar
3 votes
2 answers
147 views

Is the dynamic initialisation of non local static/global objects inherently thread-safe?

The dynamic initialization of a global object (static storage duration) might be delayed until "something" of this translation unit is (odr) used. This implies that multiple threads may ...
albert's user avatar
  • 541
2 votes
1 answer
63 views

Building Qt6 with g++ 15 and std c++23

I am trying to build Qt 6.8.2 with g++ 15 and std standard c++23. This is my configuration command: $ export GCC_CC=/usr/bin/gcc-15 \ GCC_CXX=/usr/bin/g++-15 \ GCC_CFLAGS="-O2 -fPIC" ...
Jakob Simon-Gaarde's user avatar
9 votes
0 answers
104 views

Out of line definitions for members of constrained partial specializations

MSVC doesn't accept this code, even the latest version on Godbolt: #include <type_traits> template <class R> struct A { A(); }; template <class R> requires std::is_reference_v&...
Brian Bi's user avatar
  • 122k
1 vote
0 answers
127 views

Why can out-of-memory conditions lead to access violations and stack overflows?

The following code uses Process Governor to restrict its memory use to 1 MB. It then allocates several megabytes of memory in a vector of strings, so I expect std::bad_alloc to be thrown (in strings....
bers's user avatar
  • 6,259
-3 votes
1 answer
90 views

String defined in header A is not defined in header B [closed]

I have 2 header/C++ files (4 files total) where I define some constant strings. When I reference a string from headerB in headerA, it complies fine, but it crashes when run because headerB::noteB is &...
user1390106's user avatar

15 30 50 per page
1
2 3 4 5
…
54325