The one definition rule of c++ is something I learnt and forgot several times, but it makes an interesting read every time!!
More links
The One-Definition Rule
Also see Weaving a Way Past the C++ One Definition Rule
Subscribe to:
Post Comments (Atom)
privacy
Some of the policy from the app automation refers to https://rclone.org/privacy/ if you are a general blog reader, follow Google's polic...
-
I received my MS degree from BITS Pilani today. Wow! I am now qualified to do more, I feel so energized. As I am writing this blog, I look ...
-
I reviewed a chapter of Computer Organization & Architecture, Designing for Performance. This is the last of my reviews for a long time ...
-
I still remember meeting a great architect at a place I worked. He was very humble and so good that he was a role model. Basically whether w...
3 comments:
Pardon me but I am thinking why one would define an entity such as a class more than once, unless by mistake or perhaps when including two libraries where there is a name clash. Java embeds a convenient namespace mechanism in definition of class itself so duplicate definitions are caught at the file system or at compile time. And declaration and definition are the same in Java.
The definition could be in a header, which in turn could be included by multiple c++ source files.
Java's convention is good and smart, but it is also kind of limiting and painful at times. I also kind of like their directory parsing
a.b.c.d
for a/b/c/d
Post a Comment