Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:47:51

0001 /* Copyright 2016-2017 Joaquin M Lopez Munoz.
0002  * Distributed under the Boost Software License, Version 1.0.
0003  * (See accompanying file LICENSE_1_0.txt or copy at
0004  * http://www.boost.org/LICENSE_1_0.txt)
0005  *
0006  * See http://www.boost.org/libs/poly_collection for library home page.
0007  */
0008 
0009 #ifndef BOOST_POLY_COLLECTION_EXCEPTION_HPP
0010 #define BOOST_POLY_COLLECTION_EXCEPTION_HPP
0011 
0012 #if defined(_MSC_VER)
0013 #pragma once
0014 #endif
0015 
0016 #include <stdexcept>
0017 #include <typeinfo>
0018 
0019 namespace boost{
0020 
0021 namespace poly_collection{
0022 
0023 struct unregistered_type:std::logic_error
0024 {
0025   unregistered_type(const std::type_info& info):
0026     std::logic_error{"type not registered"},
0027     pinfo{&info}
0028   {}
0029 
0030   const std::type_info* pinfo;
0031 };
0032 
0033 struct not_copy_constructible:std::logic_error
0034 {
0035   not_copy_constructible(const std::type_info& info):
0036     std::logic_error{"type is not copy constructible"},
0037     pinfo{&info}
0038   {}
0039 
0040   const std::type_info* pinfo;
0041 };
0042 
0043 struct not_equality_comparable:std::logic_error
0044 {
0045   not_equality_comparable(const std::type_info& info):
0046     std::logic_error{"type does not support equality comparison"},
0047     pinfo{&info}
0048   {}
0049 
0050   const std::type_info* pinfo;
0051 };
0052 
0053 } /* namespace poly_collection */
0054 
0055 } /* namespace boost */
0056 
0057 #endif