C++の話(本当にあった怖い話)

Yuki Tamura
Yuki Tamuraディライトワークス株式会社 en ディライトワークス株式会社
Python Hack-a-thon 2010.07




2010   7   10
name:Isoparametric

                blog:http://d.hatena.ne.jp/Isoparametric/


                         Blog              ……

                             ……

                        Python/Django

2010   7   10
C++

                C++       C

                1983



                      C with Classes




2010   7   10
C++

                1.

                2.

                3.

                4.




2010   7   10
Bjarne Stroustrup




2010   7   10
if, for, while    C




                         (RTTI)



2010   7   10
C++


                            (1986)




                      C++



2010   7   10
C++


            C




2010   7   10
C++   C




2010   7   10
C++




2010   7   10
C++




2010   7   10
C++




2010   7   10
2010   7   10
#include <iostream>
            #include <algorithm>
            #include <boost/array.hpp>
            using namespace std;
            // letsboost
            int main()
            {
            	 boost::array<int, 100> ar; // int ar[100];
            	 for( int i=0; i<ar.size(); ++i )
            	 	 ar[i] = i * 100;

            	 boost::array<int, 4> ar2 = {{0, 100, 200, 300}};

            	 if( equal( ar2.begin(), ar2.end(), ar.begin() ) )
            	 	 cout << "same" << endl;

            	 return 0;
            }

                    boost::array
2010   7   10
/* The following code declares class array,
            * an STL container (as wrapper) for arrays of constant size.
            *
            * See
            *      http://www.boost.org/libs/array/
            * for documentation.
            *
            * The original author site is at: http://www.josuttis.com/
            *
            * (C) Copyright Nicolai M. Josuttis 2001.
            *
            * Distributed under the Boost Software License, Version 1.0. (See
            * accompanying file LICENSE_1_0.txt or copy at
            * http://www.boost.org/LICENSE_1_0.txt)
            *
            * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
            *	 	    See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
            *	 	    Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
            * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow)
            * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis)
            * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
            * 05 Aug 2001 - minor update (Nico Josuttis)
            * 20 Jan 2001 - STLport fix (Beman Dawes)
            * 29 Sep 2000 - Initial Revision (Nico Josuttis)
            *
            * Jan 29, 2004
            */
           #ifndef BOOST_ARRAY_HPP
           #define BOOST_ARRAY_HPP

           #include <boost/detail/workaround.hpp>

           #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
           # pragma warning(push)
           # pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe
           # pragma warning(disable:4510) // boost::array<T,N>' : default constructor could not be generated
           # pragma warning(disable:4610) // warning C4610: class 'boost::array<T,N>' can never be instantiated - user defined constru
           required
           #endif

           #include   <cstddef>
           #include   <stdexcept>
           #include   <boost/assert.hpp>
           #include   <boost/swap.hpp>
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   10
2010   7   12
2010   7   12
2010   7   10
2010   7   10
2010   7   10
http://togetter.com/li/6669
2010   7   10
2010   7   10
2010   7   10
2010   7   10
C++




                C++




2010   7   10
2010   7   10
1 de 70

Más contenido relacionado

La actualidad más candente(20)

テストコードの DRY と DAMPテストコードの DRY と DAMP
テストコードの DRY と DAMP
Yusuke Kagata1.6K vistas
明日使えないすごいビット演算明日使えないすごいビット演算
明日使えないすごいビット演算
京大 マイコンクラブ63.4K vistas
入門 シェル実装入門 シェル実装
入門 シェル実装
Yusuke Sangenya19.8K vistas
条件分岐とcmovとmaxps条件分岐とcmovとmaxps
条件分岐とcmovとmaxps
MITSUNARI Shigeo5.7K vistas
マルチコアを用いた画像処理マルチコアを用いた画像処理
マルチコアを用いた画像処理
Norishige Fukushima51.6K vistas
Go入門Go入門
Go入門
Takuya Ueda34.2K vistas
C++ マルチスレッド 入門C++ マルチスレッド 入門
C++ マルチスレッド 入門
京大 マイコンクラブ57.8K vistas
Intro to SVE 富岳のA64FXを触ってみたIntro to SVE 富岳のA64FXを触ってみた
Intro to SVE 富岳のA64FXを触ってみた
MITSUNARI Shigeo11.6K vistas
Glibc malloc internalGlibc malloc internal
Glibc malloc internal
Motohiro KOSAKI62.1K vistas
クロージャデザインパターンクロージャデザインパターン
クロージャデザインパターン
Moriharu Ohzu19.6K vistas
Marp TutorialMarp Tutorial
Marp Tutorial
Rui Watanabe3.2K vistas

Destacado

C++の黒魔術C++の黒魔術
C++の黒魔術Daichi OBINATA
6.8K vistas24 diapositivas
闇魔術を触ってみた闇魔術を触ってみた
闇魔術を触ってみたSatoshi Sato
6.7K vistas36 diapositivas
C++14 OverviewC++14 Overview
C++14 OverviewAkira Takahashi
11.8K vistas33 diapositivas
C++ PresentationC++ Presentation
C++ PresentationCarson Wilber
2.5K vistas53 diapositivas

Destacado(9)

C++の黒魔術C++の黒魔術
C++の黒魔術
Daichi OBINATA6.8K vistas
闇魔術を触ってみた闇魔術を触ってみた
闇魔術を触ってみた
Satoshi Sato6.7K vistas
Boostのあるプログラミング生活Boostのあるプログラミング生活
Boostのあるプログラミング生活
Akira Takahashi3.8K vistas
C++14 OverviewC++14 Overview
C++14 Overview
Akira Takahashi11.8K vistas
C++ PresentationC++ Presentation
C++ Presentation
Carson Wilber2.5K vistas

Similar a C++の話(本当にあった怖い話)(20)

Mini Project- Stepper Motor ControlMini Project- Stepper Motor Control
Mini Project- Stepper Motor Control
University of Hertfordshire, School of Electronic Communications and Electrical Engineering7.7K vistas
Quiz 9Quiz 9
Quiz 9
Keroles karam khalil2.1K vistas
为什么 rust-lang 吸引我?为什么 rust-lang 吸引我?
为什么 rust-lang 吸引我?
勇浩 赖2.7K vistas
C++ ProgramsC++ Programs
C++ Programs
NarayanlalMenariya164 vistas
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
Guillaume Laforge1K vistas
Python at FacebookPython at Facebook
Python at Facebook
Angelo Failla4.6K vistas
(Slightly) Smarter Smart Pointers(Slightly) Smarter Smart Pointers
(Slightly) Smarter Smart Pointers
Carlo Pescio157 vistas
tittit
tit
Christian Heinrich1.9K vistas
CompilersAndLibrariesCompilersAndLibraries
CompilersAndLibraries
Staffan Tjernström259 vistas
Python EvolutionPython Evolution
Python Evolution
Quintagroup1.9K vistas
Lift Presentation at DuSE VILift Presentation at DuSE VI
Lift Presentation at DuSE VI
Peter Robinett1.7K vistas
OpenMPOpenMP
OpenMP
ZongYing Lyu585 vistas
Placement paperPlacement paper
Placement paper
Ramanujam Ramu237 vistas
Wap to implement bitwise operatorsWap to implement bitwise operators
Wap to implement bitwise operators
Harleen Sodhi305 vistas

Último(20)

The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)
CSUC - Consorci de Serveis Universitaris de Catalunya59 vistas
Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver24 vistas
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation24 vistas
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
Eleanor McHugh36 vistas
AMD: 4th Generation EPYC CXL DemoAMD: 4th Generation EPYC CXL Demo
AMD: 4th Generation EPYC CXL Demo
CXL Forum123 vistas

C++の話(本当にあった怖い話)

  • 2. name:Isoparametric blog:http://d.hatena.ne.jp/Isoparametric/ Blog …… …… Python/Django 2010 7 10
  • 3. C++ C++ C 1983 C with Classes 2010 7 10
  • 4. C++ 1. 2. 3. 4. 2010 7 10
  • 6. if, for, while C (RTTI) 2010 7 10
  • 7. C++ (1986) C++ 2010 7 10
  • 8. C++ C 2010 7 10
  • 9. C++ C 2010 7 10
  • 10. C++ 2010 7 10
  • 11. C++ 2010 7 10
  • 12. C++ 2010 7 10
  • 13. 2010 7 10
  • 14. #include <iostream> #include <algorithm> #include <boost/array.hpp> using namespace std; // letsboost int main() { boost::array<int, 100> ar; // int ar[100]; for( int i=0; i<ar.size(); ++i ) ar[i] = i * 100; boost::array<int, 4> ar2 = {{0, 100, 200, 300}}; if( equal( ar2.begin(), ar2.end(), ar.begin() ) ) cout << "same" << endl; return 0; } boost::array 2010 7 10
  • 15. /* The following code declares class array, * an STL container (as wrapper) for arrays of constant size. * * See * http://www.boost.org/libs/array/ * for documentation. * * The original author site is at: http://www.josuttis.com/ * * (C) Copyright Nicolai M. Josuttis 2001. * * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group. * See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168 * Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow) * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow) * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis) * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries. * 05 Aug 2001 - minor update (Nico Josuttis) * 20 Jan 2001 - STLport fix (Beman Dawes) * 29 Sep 2000 - Initial Revision (Nico Josuttis) * * Jan 29, 2004 */ #ifndef BOOST_ARRAY_HPP #define BOOST_ARRAY_HPP #include <boost/detail/workaround.hpp> #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) # pragma warning(push) # pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe # pragma warning(disable:4510) // boost::array<T,N>' : default constructor could not be generated # pragma warning(disable:4610) // warning C4610: class 'boost::array<T,N>' can never be instantiated - user defined constru required #endif #include <cstddef> #include <stdexcept> #include <boost/assert.hpp> #include <boost/swap.hpp> 2010 7 10
  • 16. 2010 7 10
  • 17. 2010 7 10
  • 18. 2010 7 10
  • 19. 2010 7 10
  • 20. 2010 7 10
  • 21. 2010 7 10
  • 22. 2010 7 10
  • 23. 2010 7 10
  • 24. 2010 7 10
  • 25. 2010 7 10
  • 26. 2010 7 10
  • 27. 2010 7 10
  • 28. 2010 7 10
  • 29. 2010 7 10
  • 30. 2010 7 10
  • 31. 2010 7 10
  • 32. 2010 7 10
  • 33. 2010 7 10
  • 34. 2010 7 10
  • 35. 2010 7 10
  • 36. 2010 7 10
  • 37. 2010 7 10
  • 38. 2010 7 10
  • 39. 2010 7 10
  • 40. 2010 7 10
  • 41. 2010 7 10
  • 42. 2010 7 10
  • 43. 2010 7 10
  • 44. 2010 7 10
  • 45. 2010 7 10
  • 46. 2010 7 10
  • 47. 2010 7 10
  • 48. 2010 7 10
  • 49. 2010 7 10
  • 50. 2010 7 10
  • 51. 2010 7 10
  • 52. 2010 7 10
  • 53. 2010 7 10
  • 54. 2010 7 10
  • 55. 2010 7 10
  • 56. 2010 7 10
  • 57. 2010 7 10
  • 58. 2010 7 10
  • 59. 2010 7 10
  • 60. 2010 7 12
  • 61. 2010 7 12
  • 62. 2010 7 10
  • 63. 2010 7 10
  • 64. 2010 7 10
  • 66. 2010 7 10
  • 67. 2010 7 10
  • 68. 2010 7 10
  • 69. C++ C++ 2010 7 10
  • 70. 2010 7 10