Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Forward deceleration using #include

Name: Anonymous 2012-12-27 23:00

Is it poor form to forward declare everything in its own header file, let's say "forwardDec.hpp" -- then #including that file in every other header file and just including any dependant header files from each of the .cpp files?

Name: Anonymous 2012-12-27 23:02

Shalom, hymie!

Name: Anonymous 2012-12-27 23:15

No that's fine if you're trying to use two-way including.

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-12-28 0:11

forward deceleration
Also known as 'acceleration'.

Name: Anonymous 2012-12-28 2:01

Cudder, is it ok if I do this though?

Name: Anonymous 2012-12-28 2:48

>>5
You should do it, continue using it throughout your large project, and then one month later come back here and submit a four page essay on why it should never be done.

Name: Anonymous 2012-12-28 3:45

It is poor form to use shitCase.

Name: >>6 2012-12-28 4:26

but I think doing this should be fine. Forward declarations are annoying and this gets rid of them. But now every time you declare a data type you have to add its name to the list in forwardDec.hpp. It's still less typing than what you would do with forward declarations though.

Name: Anonymous 2012-12-28 6:39

>>7

What alternative to camel case do you suggest then?

Name: Anonymous 2012-12-28 8:22

>>9
Other than no case and using -_, there really isn't much else. I prefer camel case and let the haters roll around in their filth.

Name: Anonymous 2012-12-29 18:40

>>6
What are you expecting from me in this report?

Name: Anonymous 2012-12-29 19:58

Still using header files in 2012

Name: Anonymous 2012-12-29 20:52

>>12
are u dumb?

Name: Anonymous 2012-12-29 21:17

>>12,13
back to /g/

Name: Anonymous 2012-12-29 21:41

>>14
Seriously, use D or C# or something. There's better alternatives out there, OP. You don't have to torture yourself like this.

Name: Anonymous 2012-12-29 21:42

>>14
LLLLLLLLLLLLLLLLLLELLLLLLLLLLLLLLLLLLLLLL GRO
LE EGIN

Name: Anonymous 2012-12-29 22:06

LLLLLLEEEEEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
EGIN
EGIN

Name: Anonymous 2012-12-29 22:24

>>16-17
... what?

Name: Anonymous 2012-12-30 1:07

>>18
LE E/G/IN GWOIN /G/RO

Name: Anonymous 2012-12-30 17:33

Someone please explain the shitty >>19 meme to me.

Name: Anonymous 2012-12-30 17:40

>>20
Ahmed is one of /prog/'s prolific shitposters. It's harmless to ignore him.

Name: Anonymous 2012-12-30 18:50

How many Ahmed are there?
He seems to have infinite shitposting power.

Name: Anonymous 2012-12-30 20:00

>>20-21
Ahmed is a smart and cool guy, >>19's not him.

Name: Anonymous 2012-12-30 21:04

How many nybbles is there in an MegAhmed?

Name: Anonymous 2012-12-30 21:27

FORWARD DECELERATION WITH #INCLUDE

FUCKING WORKS.  I TAPE IT TO MY HEADLIGHT AND I DECELERATE

Name: Anonymous 2013-11-18 18:05

%░████▀▀▒▒▒▒▒░░░░▄▄▄▄▒▒▒▀▀███████░░
%░░██▒▒▄▄▒░░░░▒▒▀▒▒▒▒▒▒▒▒▒▒▒▒▀▀██▌░
%░░█▌▄▀▀▒▒▒▒▒▒▒▒▒▄▄▄▄▄▒▒▒▒▒▒▒▌▐▒█▐░
%░░▀▌▒▒▒▄▄▄▒▒▒▒▒▀▄▄█▀▒▒░▒▒▒▒▒▐▒▐▒█░
%░░░▐▒▄▀██▄▀▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▌▌▒█░
%░░░▐▒▒▒▒▒▒▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▌▄▀█░
%░░░▐▒▒▒▒▒▒▌▒▒▒▒▀▄░░░▒▒▒▒▒▒▒▒▒▌▐██░
%░░░░▌▒▒▒▒▐▒▒▒▒▄▄▀░░░░▒▒▒▒▒▒▒▒▒▌▒█░
%░░░░▐▒▒▒▒▒▀▀▒▀▒▄▄▄▄░▒▒▒▒▒▒▒▒▒░███░
%░░░░░▌▒▒▒▄█▀▀▀▀▀▀▀▀█▒▒▒▒▒▒▒▒░▀▐██░
%░░░░░▐▒▒▒█▒▀████▀▀▒▐▌▒▒▒▒▒░▄▒▒▐░░░
%░░░░░░▐▒▒▀▒▒▒▒▒▒▒▒▒▒▐▒▒▒▒▄▒▒▒▄▐░░░
%░░░░░░▀▌▒▐▌▐▌▀▌▀▌▀▌▀▌▐▀▀▌▒▐▐▌▌▌▌░░
%░░░░░░░█▒▐▒▐▌▒▌▄▌▐▌▄▒▐▌▄▌▒█▌█▒▒▐░░
%░░░░░░░▐▌▌▒▐▌▒▌▒▒▐▌▒▄▐▌▀▄▒▒▒▒▒▒▒▀▄
%░░░░░░░░▀▒▐▀▀▒▀▒▒▀▀▀▀▒▀▒▀▀▒▒▒▒▒▒▒
%YOU'LL COWARDS DON'T EVEN SMOKE CRACK
%POST lN 3 THREADS OR YOU'LL COWARD

Name: Anonymous 2013-11-19 22:07

>>1,2
Given that the whole point of forward declarations in headers is to eliminate unnecessary dependencies, introducing an extra header file that all compilation units must use seems totally self-defeating.  In practice, if you have to change the forward declaration you'll likely have to change all the other headers anyway.

>>6
Yup.

Name: Anonymous 2013-11-19 22:19

>>15
Or he could use a tool to extract the header information from the sources automatically... I wonder why something like that hasn't been added to C compilers already.

Name: Anonymous 2013-11-21 2:57

BAMPU PANTSU

Name: Anonymous 2013-11-21 4:39

#include <iosfwd>

Name: Anonymous 2013-11-21 23:49

There's no such thing as deceleration.

Don't change these.
Name: Email:
Entire Thread Thread List