Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(v) is actually (*&v) since when?

Could C++ standards gurus please enlighten me:

Since which C++ standard version has this statement failed because (v) seems to be equivalent to (*&v)?

I.e. for example the code:

 #define DEC(V) ( ((V)>0)? ((V)-=1) : 0 )
 ...{...
        register int v=1;
        int r = DEC(v) ;
 ...}...

This now produces warnings under -std=c++17 like:

cannot take address of register variable

left hand side of operand must be lvalue

Many C macros enclose ALL macro parameters in parentheses, of which the above is meant only to be a representative example.

The actual macros that produce warnings are for instance the RTA_* macros in /usr/include/linux/rtnetlink.h.

Short of not using/redefining these macros in C++, is there any workaround?

like image 975
JVD Avatar asked Jun 22 '17 07:06

JVD


People also ask

Is V actually handsome?

As per the website BESTTOPERS, in an unsurprising reveal, BTS member V aka Kim Taehyung has been declared as No. 1 in the Top 10 Most Handsome Men in the World list.

Why does V from BTS go by V?

V's stage name means 'victory. ' He revealed, “My stage name was chosen last. Six, Lex, V. Those three names were suggested, but the members and PD all said that V fit me the best, and so I picked V to stand for victory.”

Who is V's best friend?

Park Bo Gum and V are quite known to be the best of buddies in the industry. Their bromance started off with hosting KBS's Music Bank together and the rest is history. The duo even took a trip to Jeju together and shelled all sorts of bestie goals. These two actually met in the bathroom!

Who is the crush of V?

V reportedly has a crush on Rachel McAdams and Lilly Collins. These two actresses are very well-known in the Hollywood industry for their amazing acting skills.

What is the meaning of the word “v”?

The final mainstream meaning for :v is simply to show approval. Like the humorous/sarcastic meaning, this version also owes a spiritual debt to the awesome face. If you approve of something, then you probably think it’s awesome.

What is the difference between actually and in fact?

The words actually, well and in fact have very similar meanings. However, there are slight differences in use. Both actually and in fact can be used correct mistakes or misunderstandings. ‘Hi, Mary. What a pleasant surprise!’ ‘Actually my name is Alice.’

What does “V is very keen on forcing you to write?

“V is very keen on forcing you to write good code” = pointless, convoluted, and useless. Report comment Reply BrightBlueJimsays: April 7, 2020 at 10:09 am

What does V mean on Twitter?

The story of v. is one that might be easily sourced initially to textese, the often indecipherable code spoken in the early text messaging era when each message was precious and could only hold 140 characters. But v.'s modern usage might be traced to the same retro 140-character efficiency in another platform: Twitter.


1 Answers

If you look at the revision summary of the latest C++1z draft, you'd see this in [diff.cpp14.dcl.dcl]

[dcl.stc]
Change: Removal of register storage-class-specifier.
Rationale: Enable repurposing of deprecated keyword in future revisions of this International Standard.
Effect on original feature: A valid C++ 2014 declaration utilizing the register storage-class-specifier is ill-formed in this International Standard. The specifier can simply be removed to retain the original meaning.

The warning may be due to that.

like image 120
StoryTeller - Unslander Monica Avatar answered Oct 25 '22 11:10

StoryTeller - Unslander Monica