« first day (1898 days earlier)      last day (973 days later) » 

3:38 PM
@tkausl hello, I wanted to check in with you about this recently deleted comment thread: stackoverflow.com/questions/69271602/…
I hope to see you here. Remember to tag me @sehe if you want my attention
 
3:52 PM
@ everyone else, I think that question deserves a few reopen votes stackoverflow.com/q/69271602/85371
 
nwp
> This question was voluntarily removed by its author
Can you even reopen those?
 
Sure.
@nwp It's technically undeletion
 
4:04 PM
It's sad, because that's a legitimate question, and actually an excellent fit for StackOverflow. On that will help many others.
I guess @tkausl momentarily forget thet both "post" and "Beast" imply HTTP protocol.
 
 
3 hours later…
7:05 PM
@sehe I can't even vote on it now
I just get the page that says it was removed by the author
no option to vote for a re-open
 
7:19 PM
@JoshMenzel Yeah, you don't have the privileges to see/manipulate deleted posts, I think. Thanks for looking though
 
7:30 PM
(that's btw the reason I posted a screenshots of the comment; not everybody can view those)
 
7:55 PM
Hi all!
I understand that
template<class T> struct Foo { /*...*/};
using VoidFoo = Foo<void>;
Isn't going to instantiate Foo<>
However, with a slight modification:
template<class T> struct Foo {
typedef shared_ptr<T> Bar;
};

vod func(Foo<void>::Bar &barRef);
Will this instantiate Foo<void>?
 
Ues, because getting a nested tpe (::Bar) requires it
 
does all ODR-use cause a class template instantiation?
 
Note that merely declaring a reference to the template itself does NOT trigger instantiation: coliru.stacked-crooked.com/a/c03cca98be9496cd
@PeterT I've never quite figured out the semantics of ODR -used so I can't answer in useful terms :)
 
I was just trying to read the cppreference stuff around it, but I can't quite parse it out from the text
 
But see my counter example. It's how I find this "intuitive".
But really, "going inside the type" requires the type to be complete. "getting the size of a type" - ditto and all variations where these are implied (declaring an array of the type, because that requires the size etc)
The type cannot be complete without instantiating. In fact, instantiation may lead to failure.
 
8:08 PM
Ok, I see, thanks!
@sehe coliru won't show the internals, will it?
 
@iksemyonov Nope. I don't know what internals you crave :) But the static assert shows you the crux
 
@sehe Ahh, gotcha! Thanks.
 
8:23 PM
Precisely.
 
Basically we have some tangible compile times here, and there are all kinds of boost and things in use
So I'm researching to find the balance between PCH and pimpl for each of those libs we use
 
A noble art.
You'll get pretty good at this and it will help you sketch out interface designs that minimize coupling. A very noble art indeed.
 
@sehe Well, it could be fun if I hadn't spent the time I've spent on this.But yes, indeed, it's valuable experience.
 
I've been "victim" of the "every header only means every template can be inlined" approach. It really doesn't scale.
It is still important to go through that "extremist" phase, perhaps, because it taught me that I need to make compromises and exactly where I want to make them so they are acceptable.
 
@sehe How does that apply exactly? Not sure I entirely understand that principle.
I mean, imagine, we have boost signals in a public header, because that's how signals work, kind of. Now after I've tested the "just PCH it" approach, I can see that certain instantiations "survive" clang's in-PCH instantiation phase, and now I even understand why.
 
 
1 hour later…
9:33 PM
I'd say it's usually possible/fine to hide the signals interface. E.g. making onSignal(boost::function<Signature>&&). This might smell like it would introduce multiple level of virtual dispatch (in the function<> type erasure) but (a) I'd check the profiler that that is significant (b) there is a non-zero chance that the internal representation uses boost::function so there is no additional overhead, instead the actual instance is forwarded
In short there's a 100% chance that the slot callbacks get type erased. So, there is zero reason to try to prevent that. Then the next goal becomes, finding the sweet spot, where you have the least library coupling and the most performance.
 
10:15 PM
@sehe those signals in out project are in the orders of 10(10's) invocations/minute at worst, that is, rare enough not to care about performance (yet). Yet your point makes sense, thanks for the explanation!
Ah, right, I see now, you would try to forward the boost::function into the connect function.
 

« first day (1898 days earlier)      last day (973 days later) »