Quantcast
Channel: Clang: no warning with -Wdangling-gsl and curly braces initialization, bug in clang? - Stack Overflow
Viewing all articles
Browse latest Browse all 30

Answer by Adrian Mole for Clang: no warning with -Wdangling-gsl and curly braces initialization, bug in clang?

$
0
0

This is a bug in clang's diagnosis. The use of curly braces in your last two cases does not 'fix' the dangling pointer issue.

By way of 'confirmation', the Code Analysis tool (static analyser) in Visual Studio/MSVC gives the following warnings for all fivesvX variables:

warning C26449: gsl::span or std::string_view created from a temporary will be invalid when the temporary is invalidated (gsl.view).warning C26815: The pointer is dangling because it points at a temporary instance which was destroyed.

Viewing all articles
Browse latest Browse all 30

Trending Articles


Vimeo 10.7.1 by Vimeo.com, Inc.


UPDATE SC IDOL: TWO BECOME ONE


KASAMBAHAY BILL IN THE HOUSE


Girasoles para colorear


Presence Quotes – Positive Quotes


EASY COME, EASY GO


Love with Heart Breaking Quotes


Re:Mutton Pies (lleechef)


Ka longiing longsem kaba skhem bad kaba khlain ka pynlong kein ia ka...


Vimeo 10.7.0 by Vimeo.com, Inc.


FORECLOSURE OF REAL ESTATE MORTGAGE


FORTUITOUS EVENT


Pokemon para colorear


Sapos para colorear


Smile Quotes


Letting Go Quotes


Love Song lyrics that marks your Heart


RE: Mutton Pies (frankie241)


Hato lada ym dei namar ka jingpyrshah jong U JJM Nichols Roy (Bah Joy) ngin...


Long Distance Relationship Tagalog Love Quotes