Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 75307

A reference is a value that enables a program to indirectly access a particular datum, such as a variable or a record, in the computer's memory or in some other storage device.

1 vote

c++ forward implementation

Your version is less type-safe than the normal implementation. std::forward() constrains the argument's value (after dereferencing) to be of the same type as the return type. Your implementation can p …
Toby Speight's user avatar
  • 81.8k
1 vote

Slice function for C

We're missing the necessary #include lines for malloc(), exit(), assert() and snprintf(): #include <assert.h> #include <stdio.h> #include <stdlib.h> The argument names s and i don't convey much infor …
Toby Speight's user avatar
  • 81.8k
2 votes

Universal "call" function

I think that we should accept a forwarding reference (and std::forward<>() it to the function), or a plain T* (with const deduced appropriately as part of T) or const reference to smart pointer. …
Toby Speight's user avatar
  • 81.8k