Behavior of c++ virtual calls inside constructor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.o | |
main | |
*.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.o | |
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.gz | |
*.json | |
.*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Monad | |
import qualified Data.ByteString as B | |
import qualified Data.Vector.Unboxed as U | |
import Data.Word | |
import System.Environment | |
import System.IO | |
iterHelper :: B.ByteString -> Word8 -> | |
U.Vector Int -> Int -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.zhihu.com/question/25037476/answer/30100671 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
见 http://h.acfun.tv/t/4240594?r=4256785 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See main.c. Requires gcc or llvm-clang to compile. | |
$ time ./a.out --fast 40 | |
fibo(40) = 102334155 | |
real 0m0.571s | |
user 0m0.567s | |
sys 0m0.002s | |
$ time ./a.out --slow 40 | |
fibo(40) = 102334155 |
g++ -std=c++11 main.cc
./a.out
http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Type_Erasure
OlderNewer