Skip to main content
-1 votes
0 answers
41 views

I'm working on a project where I make a call using my lambda function which sends a request to client and in return I get a downloadable file (this whole task will be executed only once every 24hrs), ...
Vaibhav Singh's user avatar
4 votes
2 answers
140 views

I have a program that I would like to build in Visual Studio 2026, but struggle with the errors appearing. One simplified piece of code is as follows: void f(const void*) {} int main() { ...
Fedor's user avatar
  • 25.4k
-2 votes
2 answers
142 views

In a recent script I wrote I use the keyboard module for hotkeys but I decided to store all arguments in an array where I would use a loop to call them all. When I attempted to use any hotkey I ...
user31716681's user avatar
2 votes
1 answer
135 views

I have an IQueryable expression: ... Where(x => Convert.ToInt64(x.string_param) > Convert.ToInt64(string_const)) ... How to build this throught expression tree? Kind of: var left = ...? var ...
Алексей Корсак's user avatar
0 votes
0 answers
99 views

I am using the Bulk Update APIs, part of EF Core like the ExecuteUpdateAsync() functions, to perform updates, and I am passing in a lambda for my valueExpression. I am wondering if the evaluation of ...
bssskpbmb-629801's user avatar
10 votes
1 answer
549 views

If a lambda is capture-less, its closure type has conversion operator to function pointer. For example, auto l = []{}; using F = decltype(+l); //pointer to function type constexpr F p = l; And if a ...
Fedor's user avatar
  • 25.4k
-1 votes
0 answers
58 views

In an effort to simplify some of my code, I tried using a switch expression to create a selector for sorting on an EF Core 10 query: Expression<Func<Foo, IComparable>> selector = sortField ...
theodinspire's user avatar
6 votes
1 answer
151 views

I wrote the following program that is accepted by MSVC, but is rejected by both GCC and CLANG. What is the standard compliant behavior? Live Demo struct C { C(int) = delete; C(){}; }; decltype([b ...
Richard's user avatar
  • 49.5k
18 votes
1 answer
1k views

Consider the following program: #include <iostream> int f(int i) { std::cout << i; return i; } int main() { [a=f(1), b=f(2)]{}(); } It prints 12 (with all major c++ ...
Jakob Stark's user avatar
  • 4,180
5 votes
1 answer
153 views

A colleague of mine showed me a program with explicit object parameter in a lambda function. The program is accepted by two compilers, but produces a strange result: struct A { int a = 2; ...
Fedor's user avatar
  • 25.4k
1 vote
1 answer
130 views

These two examples accomplish the same thing: # using eval var=hello eval "some_func() { echo $var; }" some_func # "hello" # using source var=hello source <(echo "...
Caleb Foster's user avatar
3 votes
1 answer
132 views

I'm trying to pass a click handler to a child function that sends a string back to the parent and updates a mutable value based on the string. I'm getting an error on the function: Assignment type ...
SmellydogCoding's user avatar
0 votes
1 answer
74 views

Snowflake supports higher order functions like FILTER or TRANSFORM. A lambda expression that defines the filter condition on each array element. The lambda expression must have only one argument ...
Lukasz Szozda's user avatar
4 votes
3 answers
361 views

Consider the code below: for (T &t : some_vector_) { futures.push_back(thread_pool.submit([&t] { t.do_something(); })); } On some iteration i, t is initialized to a reference to a vector ...
Jack Humphries's user avatar
Advice
0 votes
2 replies
85 views

Following is a part of the execution sequence when a middleware gets configured in ASP.NET Core - // my code app.Use(some middleware); // class UseExtensions / namespace Microsoft.AspNetCore.Builder ...
atiyar's user avatar
  • 8,405

15 30 50 per page
1
2 3 4 5
2023