Click here to Skip to main content
15,888,242 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Class as memebrs of other classes : Create a constructor that takes all data Pin
Stefan_Lang8-Apr-19 21:51
Stefan_Lang8-Apr-19 21:51 
AnswerRe: Class as memebrs of other classes : Create a constructor that takes all data Pin
Gerry Schmitz6-Apr-19 10:36
mveGerry Schmitz6-Apr-19 10:36 
AnswerRe: Class as memebrs of other classes : Create a constructor that takes all data Pin
jschell7-Apr-19 8:53
jschell7-Apr-19 8:53 
QuestionNew [[nodiscard]] attribute usage. Pin
Maximilien4-Apr-19 5:57
Maximilien4-Apr-19 5:57 
AnswerRe: New [[nodiscard]] attribute usage. Pin
John R. Shaw4-Apr-19 7:56
John R. Shaw4-Apr-19 7:56 
SuggestionRe: New [[nodiscard]] attribute usage. Pin
Maximilien4-Apr-19 16:17
Maximilien4-Apr-19 16:17 
GeneralRe: New [[nodiscard]] attribute usage. Pin
Randor 4-Apr-19 18:53
professional Randor 4-Apr-19 18:53 
GeneralRe: New [[nodiscard]] attribute usage. Pin
leon de boer5-Apr-19 3:24
leon de boer5-Apr-19 3:24 
There is no difference you are discarding something (you didn't save it) that was marked as non discard.

The whole idea should have been euthanized, it is what you get when you get a committee to talk about non existent problems.
There are half a dozen real problems but they waste time on that junk.

Here is the best template to fix [nodiscard]
template < typename T >
void ignore(T&&) {}

Try it on your code
ignore(f1());

Now don't make me do it .... if I want to discard something I will Smile | :)
In vino veritas


modified 5-Apr-19 9:40am.

GeneralRe: New [[nodiscard]] attribute usage. Pin
John R. Shaw5-Apr-19 11:00
John R. Shaw5-Apr-19 11:00 
GeneralRe: New [[nodiscard]] attribute usage. Pin
Rajesh R Subramanian12-Apr-19 0:34
professionalRajesh R Subramanian12-Apr-19 0:34 
Questiontriplet or what ? Pin
Vaclav_31-Mar-19 5:55
Vaclav_31-Mar-19 5:55 
AnswerRe: triplet or what ? Pin
k505431-Mar-19 6:30
mvek505431-Mar-19 6:30 
GeneralRe: triplet or what ? Pin
Vaclav_31-Mar-19 7:27
Vaclav_31-Mar-19 7:27 
GeneralRe: triplet or what ? Pin
k505431-Mar-19 8:38
mvek505431-Mar-19 8:38 
AnswerRe: triplet or what ? Pin
Randor 31-Mar-19 8:34
professional Randor 31-Mar-19 8:34 
GeneralRe: triplet or what ? Pin
k505431-Mar-19 8:45
mvek505431-Mar-19 8:45 
GeneralRe: triplet or what ? Pin
Randor 31-Mar-19 9:04
professional Randor 31-Mar-19 9:04 
GeneralRe: triplet or what ? Pin
Vaclav_31-Mar-19 16:20
Vaclav_31-Mar-19 16:20 
GeneralRe: triplet or what ? Pin
Randor 31-Mar-19 17:21
professional Randor 31-Mar-19 17:21 
GeneralRe: triplet or what ? Pin
leon de boer1-Apr-19 0:49
leon de boer1-Apr-19 0:49 
QuestionCombination or inheritance Pin
元昊 潘31-Mar-19 5:04
元昊 潘31-Mar-19 5:04 
AnswerRe: Combination or inheritance Pin
leon de boer31-Mar-19 6:12
leon de boer31-Mar-19 6:12 
SuggestionRe: Combination or inheritance Pin
David Crow1-Apr-19 3:31
David Crow1-Apr-19 3:31 
Questioni really need help with this Pin
Member 1420332729-Mar-19 5:13
Member 1420332729-Mar-19 5:13 
GeneralRe: i really need help with this Pin
Richard MacCutchan29-Mar-19 5:58
mveRichard MacCutchan29-Mar-19 5:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.