メインページ | ネームスペース一覧 | クラス階層 | 構成 | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ | 関連ページ

destruct.h

説明を見る。
00001 #ifndef STATIC_CONTAINER_CONTAINER_DESTRUCT_H
00002 
00003 #define STATIC_CONTAINER_CONTAINER_DESTRUCT_H
00004 
00005 /*
00006 gslib/static_container/destruct.h
00007 
00008 zlib/libpng license
00009 -------------------
00010 
00011 Copyright (C) 2004 &o
00012 
00013 This software is provided 'as-is', without any express or implied warranty. In n
00014 o event will the authors be held liable for any damages arising from the use of 
00015 this software.
00016 
00017 Permission is granted to anyone to use this software for any purpose, including 
00018 commercial applications, and to alter it and redistribute it freely, subject to 
00019 the following restrictions:
00020 
00021 The origin of this software must not be misrepresented; you must not claim that 
00022 you wrote the original software. If you use this software in a product, an ackno
00023 wledgment in the product documentation would be appreciated but is not required.
00024 
00025 Altered source versions must be plainly marked as such, and must not be misrepre
00026 sented as being the original software.
00027 This notice may not be removed or altered from any source distribution.
00028 
00029 project site : https://sourceforge.jp/projects/gslib/
00030 my site : http://www.game-syokunin.com/
00031 --------------------------------------------------------------------------------
00032 
00033 法的には、上記の原文のほうが有効なので、より厳密には日本語訳よりも原文を参考にし
00034 てください。日本語訳は、http://opensource.jp/licenses/zlib-license.html から頂い
00035 てきました。
00036 
00037 zlib/libpngライセンス ( 日本語訳 )
00038 
00039 Copyright (C) 2004 &o
00040 
00041 本ソフトウェアは「現状のまま」で、明示であるか暗黙であるかを問わず、何らの保証も
00042 なく提供されます。本ソフトウェアの使用によって生じるいかなる損害についても、作者
00043 は一切の責任を負わないものとします。 以下の制限に従う限り、商用アプリケーション
00044 を含めて、本ソフトウェアを任意の目的に使用し、自由に改変して再頒布することをすべ
00045 ての人に許可します。
00046 
00047 本ソフトウェアの出自について虚偽の表示をしてはなりません。あなたがオリジナルのソ
00048 フトウェアを作成したと主張してはなりません。あなたが本ソフトウェアを製品内で使用
00049 する場合、製品の文書に謝辞をれていただければ幸いですが、必須ではありません。
00050 ソースを変更した場合は、そのことを明示しなければなりません。オリジナルのソフトウ
00051 ェアであるという虚偽の表示をしてはなりません。
00052 ソースの頒布物から、この表示を削除したり、表示の内容を変更したりしてはなりません
00053 
00054 
00055 project site : https://sourceforge.jp/projects/gslib/
00056 my site : http://www.game-syokunin.com/
00057 */
00058 
00059 #include <boost/type_traits/is_pod.hpp>
00060 #include <boost/mpl/if.hpp>
00061 
00062 namespace gslib {
00063     namespace static_container {
00064         namespace detail {
00065             template < typename T >
00066             struct destructor_caller {
00067                 static void call( T& t ) {
00068                     t.~T();
00069                 }
00070             };
00071 
00072             template < typename T >
00073             struct through {
00074                 static void call( T& t ) {}
00075             };
00076         }
00077         
00079         template < typename T >
00080         void destruct( T& t ) {
00081             boost::mpl::if_<
00082                 boost::is_POD< T >,
00083                 detail::through< T >,
00084                 detail::destructor_caller< T > >::type::call( t );
00085         }
00086     }
00087 }
00088 
00089 #endif

static_containerに対してSat Nov 27 15:03:12 2004に生成されました。 doxygen 1.3.6