Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
14 votes
2 answers
793 views

I have a struct that I allow implicit conversion from string or StringBuilder. public ref struct StringParam { private string s; private StringBuilder sb; public static implicit operator ...
4 votes
2 answers
244 views

This piece of code is a synthetic example extracted from a real world app. This code doesn't make much sense, its only purpose is illustration and everything that is not relevant has been stripped. #...
0 votes
2 answers
121 views

The formula =SPLIT("110円/1000002円.2";"\") doesn't result equal to =MAP(SPLIT("110円/1000002円.2";"\"); LAMBDA(v; v)) At the former, implicity conversion is ...
Best practices
0 votes
7 replies
115 views

I am experiencing problems with this section of my formula =LET( args; MAP(SPLIT("11/11"&CHAR(10)&CHAR(10)&"1" ; CHAR(10)&CHAR(10)); LAMBDA(v; TO_TEXT(v)))...
0 votes
0 answers
41 views

I'm trying to set up VS Code to learn C++. I downloaded the latest version of the compiler (g++) and tried running the following simple code, which (if I understand this correctly) should print a &...
3 votes
2 answers
281 views

So, I am learning C language and was trying to make a function that returns the length of a string. In the if statement I mistakenly used "" instead of ''. So, instead of comparing to char '\...
19 votes
2 answers
832 views

Background Our original problem was that including boost::logic::tribool caused an expression of the form referenceToClass != nullptr to compile happily. We ultimately tracked this down to the ...
6 votes
1 answer
250 views

I'm getting a compiler error about a type conversion that should be legal, to my eyes. Let's say I have a home-grown string class, convertible from and to char*: class custom_string { public: ...
6 votes
3 answers
268 views

Here's an example: class Example { public: Example(int m, int n, double pad) {} Example(double size, double pad) {} }; int main() { Example example { 1.0, 1.0 }; auto ptr = std::...
3 votes
2 answers
358 views

Consider this implicit operator: public class Person { public Person(string name) => Name = name; public string Name { get; } public static implicit operator string(Person person) => ...
lonix's user avatar
  • 22.6k
3 votes
2 answers
153 views

I have a program which lets C++ support arbitrary precision numbers (very large numbers). Takes datatype as string or string literals. Basically "762...." Compiler: g++ (Debian 10.2.1-6) 10....
5 votes
1 answer
87 views

I have a program that maps device registers to unions of bitfields and integers. This is part of a larger code base, so although this is very C-style code, we are compiling it as C++20. Here is a ...
rmc's user avatar
  • 1,240
1 vote
1 answer
125 views

I have this minimal working example: class A { public: A(int i) {} A(bool b) {} }; class B { public: operator int() { return 1; }; operator bool() { return false; }; operator A() { return A(...
phinz's user avatar
  • 1,739
12 votes
2 answers
411 views

This is a follow up of this question: Why can I call a callable that is const-referenced and where the actual callable is a mutable lambda? I can mimic the implicit conversion of a const mutable ...
-5 votes
3 answers
124 views

I'm still new at functions and I tend to print the function which I don't know how to print the declared function. It prints "1" and not "John". #include <iostream> void ...

15 30 50 per page
1
2 3 4 5
...
167

AltStyle によって変換されたページ (->オリジナル) /