Comments (4)
Hello @Ukilele,
thanks for bringing this up.
I don't understand what role std::source_location
plays here. You're using the internals required to implement source_location
; the STD type works fine as far as I know.
I'm a bit reluctant to implement this transformation. Getting the correct information from SourceLocExpr
seems difficult, and I'm unsure about the benefit.
Andreas
from cppinsights.
Hi Andreas,
your welcome!
I just brought up std::source_location
because this was the class I originally used when I came accross this issue. I guess that since it's standarized since C++20, its usage might be higher than the one of builtin compiler-intrinsics. For a simplification of the code to reproduce the issue, I switched to __builtin_LINE()
.
When using std::source_location::current()
you will get a similar output:
std::source_location::current(/* INSIGHTS-TODO: CodeGenerator.cpp:3851 stmt: SourceLocExpr */)
I agree that it definitely is no urgent or important issue.
from cppinsights.
Hello @Ukilele,
usually I appreciate reduced issue reports, as I did here. Yet, your new std::source_location::current()
reminded me of the implementation of source_location
. Despite the standard not mentioning it, current
takes a parameter of from __builtin_source_location
. Looks like I have to act on this one :-)
Andreas
from cppinsights.
Awesome, that was quick :) Thanks a lot 👍
from cppinsights.
Related Issues (20)
- Pack expansion in ctor call transformed into invalid c++
- Class template argument deduction not working - cpp17 HOT 2
- Build on visualstudio 2019 get ascii, utf errors HOT 1
- Variant initialization improvisation (suggestion) HOT 4
- std::move redundant?? HOT 5
- crash when parse cpp file HOT 1
- different result from godbolt HOT 1
- Incorrect move-only lambda code generation HOT 1
- Superfluous parentheses in declarations are handled incorrectly HOT 4
- Show initialization of non-local variables
- explicit casting for const HOT 2
- NRVO translation is not NRVO eligible HOT 2
- Segmentation Fault: Stack dump without symbol names HOT 1
- structured binding with lambda reports 'Segmentation fault' HOT 1
- Structure binding variables is rvalue reference? HOT 2
- How do I use it with cmake project HOT 2
- can not open "libxml2s.lib" ??? what is "libxml2s.lib" ? from where? HOT 4
- Static casts missing with inherited classes
- Lambda Capture Variable Not Used in Generated Code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppinsights.