Ambiguous call when using LINQ extension method on DbSet

The described problem is caused by using the System.Linq.Async package along with the DbSet<TEntity> class. Since DbSet<TEntity> implements both IQueryable<TEntity> and IAsyncEnumerable<TEntity>, importing the namespaces System.Linq and Microsoft.EntityFrameworkCore leads to the definition of the conflicting extension methods. Unfortunately, avoiding importing one of them is usually not practicable. This behavior is present beginning with EF.Core 3.0, … Read more

Why does the number of elements in a initializer list cause an ambiguous call error?

What is happening here is that in the two element initializer list both of the string literals can be implicitly converted to const char* since their type is const char[N]. Now std::vector has a constructor that takes two iterators which the pointers qualify for. Because of that the initializer_list constructor of the std::vector<std::string> is conflicting … Read more

GCC can’t differentiate between operator++() and operator++(int)

Name lookup must occur first. In this case for the name operator++. [basic.lookup] (emphasis mine) 1 The name lookup rules apply uniformly to all names (including typedef-names ([dcl.typedef]), namespace-names ([basic.namespace]), and class-names ([class.name])) wherever the grammar allows such names in the context discussed by a particular rule. Name lookup associates the use of a name … Read more