News for hackers. Stuff that matters.
Re:C++ Patterns: The Badge by jcl on Wednesday June 12, 2019 @01:31AM (#20162016)
I'm not sure I follow... The motivation for Badge is to have methods on VFS that only Device can call, without exposing VFS's internals to Device. Without Badge, what prevents non-Device functions from calling register_device()?
Re:C++ Patterns: The Badge by taylorconor on Wednesday June 12, 2019 @01:37AM (#20162038)
I guess the inline function would require a Badge and the private member function would not. So an inline constructed but never used Badge is even more likely to be completely optimized away
Re:C++ Patterns: The Badge by dearrifling on Wednesday June 12, 2019 @01:41AM (#20162049)