7 questions from the last 30 days
10
votes
1
answer
549
views
Why does a class inherited from lambda type lack conversion to function pointer in Visual C++?
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 ...
-2
votes
2
answers
142
views
Why does this function receive 2 positional variables when it is only given one? [closed]
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 ...
2
votes
1
answer
135
views
C# expression tree, property convert string to int/long
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 ...
4
votes
2
answers
140
views
Accessing constant variables from a lambda in Visual Studio 2026
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() {
...
0
votes
0
answers
99
views
When using lambda expressions with bulk update APIs for EF Core, is the lambda expression evaluated in-memory, or on the DB-side?
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 ...
-1
votes
0
answers
58
views
Entity Framework unable to translate IComparable cast of DateTime in OrderBy
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 ...
-1
votes
0
answers
41
views
AWS - Connecting Lambda to an Elastic IP to receive data given vendor has IP whitelisting (without NAT gateway) [closed]
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), ...