Re:“C is how the computer works” is a dangerous mindset for ...
by twic on Tuesday March 31, 2020 @02:58PM
(#22741135)
Not in my experience. IntelliJ can't even figure out where a make_shared call goes.
[ Parent
| on HN ]
Re:“C is how the computer works” is a dangerous mindset for ...
by saagarjha on Tuesday March 31, 2020 @03:11PM
(#22741270)
Does IntelliJ actually support C++?
Re:“C is how the computer works” is a dangerous mindset for ...
by ivankolev on Tuesday March 31, 2020 @03:52PM
(#22741740)
Probably talking about CLion, their C/C++ offering.
Re:“C is how the computer works” is a dangerous mindset for ...
by twic on Tuesday March 31, 2020 @05:19PM
(#22742709)
Yes, CLion, my mistake, sorry.
Re:“C is how the computer works” is a dangerous mindset for ...
by saagarjha on Tuesday March 31, 2020 @11:29PM
(#22745362)
Hmm, that's a bit disappointing…might I suggest trying out a LibClang-based IDE, if CLion isn't using it already? It can do wonders even to "stupid" applications. For example, my Sublime Text (by itself, with only basic knowledge of C++ keywords and such) with clangd tells me that std::make_shared comes from this code in <memory>:
template<class _Tp, class ..._Args>
inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
!is_array<_Tp>::value,
shared_ptr<_Tp>
>::type
make_shared(_Args&& ...__args)
{
return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
}
Re:“C is how the computer works” is a dangerous mindset for ...
by twic on Wednesday April 01, 2020 @08:08AM
(#22747822)
Oh no, what i mean is that it can't help me find the constructor of the thing i'm creating. Resolving a make_shared call to the implementation of make_shared is completely useless; the only thing you ever want to do is find the constructor it's forwarding to.