c++ Questions

5

Solved

@robot_sherrick answered me this question, this is a follow-up question for his answer. cv::SimpleBlobDetector in Opencv 2.4 looks very exciting but I am not sure I can make it work for more detai...
Achlamydeous asked 23/11, 2012 at 19:17

1

Solved

A requires-expression can introduce local parameters using a parameter list. If any of these parameters has void type, will the requires expression just yield false or shall it be hard compilation ...
Northeastwards asked 19/9 at 20:32

1

Solved

#include <memory> #include <atomic> #include <iostream> #include <thread> #include <cassert> int main() { std::atomic<bool> flag = {false}; std::atomic<int&...

2

Solved

I've following issue. I'm tring to use native mechanism build in CMake for cross compilation. I prepared following toolchain.cmake file: set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm...
Ballottement asked 22/8, 2016 at 8:50

5

Solved

Let me use an example to explain the issue. If we have a TextField like this, TextField { text: "0.0" validator: DoubleValidator { bottom: -359.9; top: 359.9; decimals: 1; notation: DoubleVa...
Especial asked 3/2, 2016 at 13:34

1

Suppose I am creating the following function: double f(double const& x) { return x + x; } This is how I like to place the const modifier, not like const double. However, Qt Creator automatic...
Broider asked 28/4, 2015 at 19:16

2

In the following if I use constexpr the compiler apparently the compiler says "expression must have a constant value", this happens on MSVC and GCC: int main() { constexpr auto nnn = { ...
Puberulent asked 19/9 at 7:56

6

Solved

A follow-up question to Memory leaks when calling ITK from Visual Studio DLL I refined the problem to the simplest example. struct A { public: A() { mp_data = new int(0x42); } ~A() { del...
Bausch asked 24/4, 2012 at 14:26

0

I'm trying to visualize on memory GDI+ images using the Image Watch extension. I requested support on this feature long time ago directly on the developercommunity it got a lot of upvotes but MSFT ...
Swill asked 18/9 at 7:12

2

I'm using ZeroMQ in Python and C++ in many configurations and I wonder which is the most elegant way to abort a recv() or poll() from another thread (e.g. in case of controlled program termination ...
Aeolotropic asked 26/6, 2015 at 14:51

6

I am looking to solve a recent problem of mine in a React Native TypeScript application, ran with Expo compiler. Here is my full stack trace: non-std C++ exception ABI48_0_0RCTFatal ABI48_0_0RCTCo...
Livestock asked 31/5, 2023 at 16:10

1

Solved

Consider the following simple code: template<typename ...types> class myclass { using payload_type = mylib::type_traits::type_or_tuple_t<types...>; template<typename... T> std...
Financier asked 16/9 at 10:40

4

c++17 provides if constexpr, in which: the value of condition must be a contextually converted constant expression of type bool. If the value is true, then statement-false is discarded (if prese...

4

I am currently working on program with a lot of source files. Sometimes it is difficult to keep track of what libraries I have already #included. Theoretically, I could make a single header file ca...
Incursive asked 5/12, 2014 at 4:27

3

Solved

When I try to export the following function as a dll: extern "C" __declspec(dllexport) void some_func() { throw std::runtime_error("test throwing exception"); } Visual C++ 2008 gives me the fol...
Hysterical asked 25/1, 2010 at 19:35

1

The following code compiles with g++ 14.2 and clang++ 18.1, but fails with MSVC 17.10. class Base { public: using peak = Base; Base() = default; }; class Derived : public Base { protected: usin...

5

I was using UE5 with VSCode perfectly fine, and Intellisense and #include were both working fine. But when I made another C++ class in the editor, suddenly my Intellisense stopped working and I was...
Blancablanch asked 19/1, 2023 at 11:37

1

I know that, generally, we can forward-declare enums in C++11. So, why does this: enum kind_t { kind1, kind2 }; template <kind_t Kind> struct foo {}; template <> struct foo<kind1&g...
Dobbs asked 24/8, 2022 at 21:22

2

Solved

VS2019 latest c++ compiler. Error is :"a coroutine's promise must declare either 'return_value' or 'return_void'" Example pulled from David Mazièreshttps://www.scs.stanford.edu/~dm/blog/c...
Greenhead asked 28/4, 2021 at 18:59

1

I have installed gcc-10 compiler on my ubuntu 20.04. I needed to test the work of coroutine ts, so I found an example using coroutines and tried to compile it. exemple: #include <coroutine> #...
Alkyd asked 27/11, 2020 at 15:45

4

Can somebody explain why everybody passes std::unique_ptr by value instead of by rvalue reference? From what I've observed, this required an additional move constructor to be invoked. Here's an exa...
c++
Librarianship asked 19/4, 2022 at 20:17

7

I recently installed MinGW from MSYS2, and tested the program below: #include<iostream> using namespace std; int main() { cout << "Hello World"; return 0 ; } But I get a...
Projectionist asked 17/6, 2023 at 8:30

2

Please help me to understand how can I comment out a single line from a clang-tidy configuration file.
Bautista asked 4/3, 2021 at 9:13

2

Solved

I have the unfortunate task in 2024 of adding some code to a codebase that needs to be used in a C++03 setting - where unfortunately the original class myclass can't be changed. I've gotten stuck o...
Hanshaw asked 11/9 at 9:44

9

Solved

I'm using C and sometimes I have to handle paths like C:\Whatever C:\Whatever\ C:\Whatever\Somefile Is there a way to check if a given path is a directory or a given path is a file?
Brisson asked 28/9, 2008 at 22:42

© 2022 - 2024 — McMap. All rights reserved.