Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:44:40

0001 // Copyright David Abrahams 2006. Distributed under the Boost
0002 // Software License, Version 1.0. (See accompanying
0003 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0004 #ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
0005 # define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
0006 
0007 # ifdef BOOST_OLD_CONCEPT_SUPPORT
0008 #  include <boost/concept_check/has_constraints.hpp>
0009 #  include <boost/type_traits/conditional.hpp>
0010 # endif
0011 
0012 
0013 namespace boost
0014 {
0015   namespace concept_checking
0016   {
0017     template <class Model>
0018     struct concept_check_
0019     {
0020         virtual void failed(Model* x)
0021         {
0022             x->~Model();
0023         }
0024     };
0025   }
0026   
0027 # ifdef BOOST_OLD_CONCEPT_SUPPORT
0028   
0029   namespace concept_checking
0030   {
0031     template <class Model>
0032     struct constraint_check
0033     {
0034         virtual void failed(Model* x)
0035         {
0036             x->constraints();
0037         }
0038     };
0039   }
0040 
0041   template <class Model>
0042   struct concept_check
0043     : conditional<
0044           concept_checking::has_constraints<Model>::value
0045         , concept_checking::constraint_check<Model>
0046         , concept_checking::concept_check_<Model>
0047       >::type
0048   {};
0049       
0050 # else
0051   
0052   template <class Model>
0053   struct concept_check
0054     : concept_checking::concept_check_<Model>
0055   {};
0056   
0057 # endif
0058 
0059 # if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
0060 
0061   //
0062   // The iterator library sees some really strange errors unless we
0063   // use partial specialization to extract the model type with
0064   // msvc-7.1
0065   // 
0066   template <class Model>
0067   struct concept_check<void(*)(Model)>
0068     : concept_check<Model>
0069   { };
0070 
0071 # define BOOST_CONCEPT_ASSERT( ModelInParens )                          \
0072   enum { BOOST_PP_CAT(boost_concept_check,__LINE__) =                   \
0073          sizeof(::boost::concept_check<void(*) ModelInParens>)          \
0074   }
0075   
0076 # else
0077   
0078   template <class Model>
0079   concept_check<Model>
0080   concept_check_(void(*)(Model));
0081   
0082 # define BOOST_CONCEPT_ASSERT( ModelInParens )                          \
0083   enum { BOOST_PP_CAT(boost_concept_check,__LINE__) =                   \
0084          sizeof(::boost::concept_check_((void(*) ModelInParens)0))      \
0085   }
0086   
0087 # endif 
0088 }
0089 
0090 #endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP