From 10550b69d4239cd98ce35cffa5f1c26a56e0df7e Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Mon, 13 Mar 2017 16:08:34 -0700 Subject: [PATCH] Deleting accidentally committed file. --- include/boost/exception/exception_data.hpp | 81 ---------------------- 1 file changed, 81 deletions(-) delete mode 100644 include/boost/exception/exception_data.hpp diff --git a/include/boost/exception/exception_data.hpp b/include/boost/exception/exception_data.hpp deleted file mode 100644 index cf2ded1..0000000 --- a/include/boost/exception/exception_data.hpp +++ /dev/null @@ -1,81 +0,0 @@ -//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. - -//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) - -#ifndef UUID_D63C9FFE03C611E7B6F710AB63EDCBF1 -#define UUID_D63C9FFE03C611E7B6F710AB63EDCBF1 - -namespace -boost - { - class - exception_datum - { - exception_datum( exception_datum const & ); - exception_datum & operator=( exception_datum const & ); - std::type_info ti_; - shared_ptr v_; - public: - explicit - template - exception_datum( T const & v ): - ti_(typeid(T)), - v_(make_shared(v)) - { - } - template - T * - cast() - { - if( typeid(T)==ti_ ) - return static_cast(v_.get()); - else - return 0; - } - }; - class - exception_data - { - std::map data_; - protected: - exception_data() - { - } - ~exception_data() - { - } - public: - template - exception_data & - set( char const * tag, T const & value ) - { - data_[tag]=exception_datum(value); - return *this; - } - template - T const * - get( char const * tag ) const - { - auto it=data_.find(tag); - if( it!=data_.end() ) - return it->cast(); - else - return 0; - } - }; - } - -catch( -exception_data & d ) - { - d["file_name"].set("foo.txt"); - d["file_name"].get(); - - d.set("file_name","foo.txt"); - throw; - } - -throw_exception(foo_error(),make_pair("errno",errno),pair("width",width)); - -#endif