Skip to main content
2 votes
3 answers
202 views

I'm reading a book. Obviously there are some failures in it. In the code below, how can I access plant::operator<< in run() and plant::debug::operator<< in diagnostic()? The compiler can't ...
Chris Ri's user avatar
0 votes
0 answers
124 views

I'm working on a WPF .NET 8 project and the problem started when I wanted to show my application icon in the notification area menu. In WPF it seems that it can't be used directly, you need to enable ...
Artur Fytsyk's user avatar
0 votes
0 answers
88 views

void f(int) {} void f(const int&) {} int main() { int i = 1; f(i); } I get an ambiguous call here, what am I missing? I'm using GCC 11.2.0 with -std=c++11. I'm reading C++ Primer 5th ...
Neox's user avatar
  • 109
0 votes
0 answers
68 views

I have a problem when compiling this line of code: var span = m_tracer.StartActiveSpan("FileTrace"); What's strange about this is, this exact same line of code compiles just fine in other ...
Yossi G.'s user avatar
  • 1,171
2 votes
0 answers
39 views

I am having problems with gcc-11 C++ compiler when using multiple inheritance and I want to call a specific method of the base class and I write using A::m1 explicitely. Visual C++ 2022 works with ...
Pedro C.'s user avatar
0 votes
2 answers
140 views

I have the following two methods that both create me a couple of Constraint<T> instances. The first creates types of Constraint<Quantity> and the second creates types of Constraint<...
MonkeyFace's user avatar
1 vote
1 answer
311 views

While porting my (large) application from .NET Framework 4.X to .NET 5+, stumbled over the new System.Collections.Generic.CollectionExtensions, which did not exist in the .NET Framework. Before it ...
LionAM's user avatar
  • 1,429
0 votes
1 answer
178 views

I'm trying to overload some functions to work with several data types. This is trivial when I'm passing variables as parameters, thusly: void fnc(int32_t d){ Serial.println((String) "int32 = &...
Robert M.'s user avatar
  • 613
0 votes
0 answers
58 views

I have a class that I use to apply functions to each element in a vector representing an image. template <typename T, typename E> class func1_img_expr_t : public img_expr_t<T> { public: ...
Adrian K-B.'s user avatar
6 votes
0 answers
95 views

As I understand it, the outcome of a function name usage might be one of the following: There are no (best) viable functions — overload resolution fails. The suboutcomes are: There are no candidates....
OverloadResolver's user avatar
1 vote
1 answer
258 views

I've got some C# classes, MyChar, Myint, MyDouble, that wrap char, int and double. Each has an implicit conversion operator from the wrapped type to the user-defined one. I've also got a set of ...
bonio's user avatar
  • 31
21 votes
8 answers
3k views

Consider this Minimal, Reproducible Example : interface Code { static void main(String[] args) { symbol( String.valueOf( true ? 'a' : true ? 'b' ...
Tom Hawtin - tackline's user avatar
2 votes
1 answer
248 views

I was reading about the "mixin" technique in C++ but there is something I don't understand and seems to be a limitation in the language that prevents to do it generically because of ...
alfC's user avatar
  • 16.8k
1 vote
1 answer
2k views

I cannot figure out why I am getting the error "reference to 'distance' is ambiguous". I have passed class object as an argument in friend function. #include <iostream> using namespace ...
shubham parmar's user avatar
2 votes
1 answer
650 views

In my ASP.NET Core 3.1 project I have the following configuration in Program.cs: using System.Net; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions....
janw's user avatar
  • 9,906

15 30 50 per page
1
2 3 4 5
8