« first day (1840 days earlier)      last day (1018 days later) » 

11:37 AM
@PeterT Got it.
 
12:28 PM
Lets say we have the following code:

```cpp
std::vector<int> f()
{
std::vector<int> y;
...
return y;
}

std::vector<int> x = ...
x = f();
```

It seems the compiler has two approaches here:

(a) NRVO: Destruct x, then construct f() in place of x.
(b) Move: Construct f() in temp space, move f() into x, destruct f().


If the compiler uses (a). Then when the former elements of `x` would be destructed?
 
 
3 hours later…
3:03 PM
Can someone explain gvalues and xvalues in layman's term
 
 
6 hours later…
9:09 PM
@Agent_A I don't know
 
9:20 PM
can some one explain what this code does?
while (count < max)
{
bool isprime{true};

for (size_t i{}; i < count && isprime; ++i)
{
isprime = trial % *(primes + i) > 0;
}
what does the isprime = trial % *(prime+i)>0; do ?
 

« first day (1840 days earlier)      last day (1018 days later) »