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

C++ Template classes

Name: Anonymous 2012-12-09 12:38

So I want to use dynamic_cast in some situations (when template<T> is an inherited class) but not if template is int, char, bool, etc.. but it doesn't compile if yjose instances even exist.

I can't figure out how to make a general rule for that. I was hoping you can HIDE functions depending on template type. So if you initialise the class an MyClass<int> you see different things to MyClass<OtherClass>

Is that possible?

Name: Anonymous 2012-12-09 12:42

SEPPLES

Name: Anonymous 2012-12-09 13:08

You have been visited by the Spooky Skeleton! Repost this 3 times in the next 2 minutes seconds or you will be visited by a Spooky Skeleton tonight! 95% of people will not post this..... and they will become skeleton.....


█████░░░░░░░░░░░█████
███░░░░░░░░░░░░░░░███
██░░░░░░░░░░░░░░░░░██
██░░▓▓░░░░░░░░░▓▓░░██
██░░▓▓▓▓░░░░░▓▓▓▓░░██
██░░░░░░░░▓░░░░░░░░██
███░░░░░░▓▓▓░░░░░░███
█████░░░░░░░░░░░█████
█████░░▓▓▓▓▓▓▓░░█████
█████░░▓▓▓▓▓▓▓░░█████
██████░░░░░░░░░██████
███████░░░░░░░███████

Name: Anonymous 2012-12-09 13:17

Holy fuck this board is shit. I completely forgot about this, at least no one has haxed my anus..

Name: Anonymous 2012-12-09 13:23

Don't use C++ unless you want to deal with this garbage. If you must use OOP crap, the use a language that wasn't hacked on top of another language and works for more than half the time.

Name: Anonymous 2012-12-09 14:03

>>5
Like Common Lisp.

Name: Anonymous 2012-12-09 15:36

>>6
I think you mean Java

Name: Anonymous 2012-12-09 15:56

>>7
I think you are a 66faggot99

Name: Anonymous 2012-12-09 16:24

>>7
>Java
>object oriented
LELLLLELLLELLLLELLLEllellellelllelllellell1__1__1__1___1__1+__+__+____++__+__+_.,,.,,,,.,,....,,,..,,....,,,,,,,..,..,.,.,....,,,..,,,.,,,, (   ( (   ((( ( |\|\\\\|\\|\\||||||\\\=-=-====----=---------=====--=----===---%%$$$%%$$$$$$%%%%$%$%$%$$$$$$^~~^~^~~~~^^^^~^~^~~^^~~#&#&&#&&####&#&###&#&#&#&#&&#&&&&&&#&&#&&&&&&&#mnmmmnnnnnmnmnmmmnnmnmnmnmmnmnmnpppppppqqqqpqppqppqppppqqqqppqppqpppqppqbbbbbdbbdbbdbbbbbbbbdbbdbdbbdbbdbbdbbdbbbbbbbbdddddbbbdbbdbbdbbbbbbhyhhyhhhhhhhyhhyyyyhhyhhyhhyhhyhhyhhyhyhyhhyhyhhyhhhhhhhhyyyQOQOOQOOQOOOOOQQQQOOOOOQOOQOQQNZNZNNZNNNNZNZZZZNZNNZNZZZZNZNNZNNZNNZNNZNNNNZNNZNNNNZNN<V<<V<<V<<VVV<V<<V<<V<<V<<V<<V<<V<<V<<<<<<<V<V<<<<VVVV<<VLLL7LLLL7777LL7L7777LLLL7777L777LLLL77777L8B8888BBBBB8B8BBB888888BBBBB96999999666666699996996969999669996999995252525222222525525525525522222222225555555553mm3mm3mm3mm3mmmmm3mm3mmmmm3mm3mmmmmnuunnnnnnunnnnunnunnunnunnunnunnuuunnunnul_lll_l_____lllll____gaggaggaggaaaaagaggagggaaggagggggx+++xxx+xxxx+xx+xxxx+++++xx++x

Name: Anonymous 2012-12-09 16:35

Use the template<> syntax to instantiate

Name: Anonymous 2012-12-09 17:33

>>1

Yes, it is possible. Check out "policy-based design" from Andrei Alexandrescu's book "Modern C++ Design".

Name: Anonymous 2012-12-09 18:36

What's a yjose instance?

So if you initialise the class an MyClass<int> you see different things to MyClass<OtherClass>
Look up template specialisation.

Name: Anonymous 2012-12-09 23:54

>>9

wideshit off the front page

Name: Anonymous 2012-12-09 23:54

>>9

wideshit off the front page

Name: Anonymous 2012-12-10 10:37

Everything in C++ is surprisingly fucking convoluted.

Name: Anonymous 2013-11-30 8:06

░░░░░░░▄▀▀▀▀▀▀▀▀▀▀▄▄░░░░░░░░░
░░░░▄▀▀░░░░░░░░░░░░░▀▄░░░░░░░
░░▄▀░░░░░░░░░░░░░░░░░░▀▄░░░░░ YOU HAVE BEEN VISITED BY
░░█░░░░░░░░░░░░░░░░░░░░░▀▄░░░ LE 'FEEL OF NO GF
░▐▌░░░░░░░░▄▄▄▄▄▄▄░░░░░░░▐▌░░
░█░░░░░░░░░░░▄▄▄▄░░▀▀▀▀▀░░█░░ A qt 3.14 gf will come to you,
▐▌░░░░░░░▀▀▀▀░░░░░▀▀▀▀▀░░░▐▌░ but ONLY if you post a
█░░░░░░░░░▄▄▀▀▀▀▀░░░░▀▀▀▀▄░█░ `>tfw no GF on this thread
█░░░░░░░░░░░░░░░░▀░░░▐░░░░░▐▌
▐▌░░░░░░░░░▐██▀█▄░░░░░░█▀█░▐▌
░█░░░░░░░░░░░▀▀▀░░░░░░▀▀▀▀░▀▄
░▐▌░░░░▄░░░░░░░░░░░░░▌░░░░░░█
░░▐▌░░▐░░░░░░░░░░░░░░▀▄░░░░░█
░░░█░░░▌░░░░░░░░▐▀░░░░▄▀░░░▐▌
░░░▐▌░░▀▄░░░░░░░░▀░▀░▀▀░░░▄▀░
░░░▐▌░░▐▀▄░░░░░░░░░░░░░░░░█░░
░░░▐▌░░░▌░▀▄░░░░▀▀▀▀▀▀░░░█░░░
░░░█░░░▀░░░░▀▄░░░░░░░░░░▄▀░░░
░░▐▌░░░░░░░░░░▀▄░░░░░░▄▀░░░░░
░▄▀░░░▄▀░░░░░░░░▀▀▀▀█▀░░░░░░░

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