Sha256: 9a99afba2c5cf5ce8b4407d16a4b7e30e20990766d2d29be7e8256b9bfaf223c

Contents?: true

Size: 1.82 KB

Versions: 107

Compression:

Stored size: 1.82 KB

Contents

// Copyright David Abrahams 2006. 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 BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP

# include <boost/preprocessor/cat.hpp>
# include <boost/concept/detail/backward_compatibility.hpp>

# ifdef BOOST_OLD_CONCEPT_SUPPORT
#  include <boost/concept/detail/has_constraints.hpp>
#  include <boost/mpl/if.hpp>
# endif

// This implementation works on Comeau and GCC, all the way back to
// 2.95
namespace boost { namespace concepts {

template <class ModelFn>
struct requirement_;

namespace detail
{
  template <void(*)()> struct instantiate {};
}

template <class Model>
struct requirement
{
    static void failed() { ((Model*)0)->~Model(); }
};

struct failed {};

template <class Model>
struct requirement<failed ************ Model::************>
{
    static void failed() { ((Model*)0)->~Model(); }
};

# ifdef BOOST_OLD_CONCEPT_SUPPORT

template <class Model>
struct constraint
{
    static void failed() { ((Model*)0)->constraints(); }
};
  
template <class Model>
struct requirement_<void(*)(Model)>
  : mpl::if_<
        concepts::not_satisfied<Model>
      , constraint<Model>
      , requirement<failed ************ Model::************>
    >::type
{};
  
# else

// For GCC-2.x, these can't have exactly the same name
template <class Model>
struct requirement_<void(*)(Model)>
    : requirement<failed ************ Model::************>
{};
  
# endif

#  define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr )             \
    typedef ::boost::concepts::detail::instantiate<          \
    &::boost::concepts::requirement_<ModelFnPtr>::failed>    \
      BOOST_PP_CAT(boost_concept_check,__LINE__)

}}

#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP

Version data entries

107 entries across 107 versions & 4 rubygems

Version Path
passenger-5.0.24 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.0.23 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.0.22 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-4.0.60 ext/boost/concept/detail/general.hpp
passenger-5.0.21 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.0.20 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.0.19 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.0.18 ext/boost/concept/detail/general.hpp
passenger-5.0.17 ext/boost/concept/detail/general.hpp
passenger-5.0.16 ext/boost/concept/detail/general.hpp
passenger-5.0.15 ext/boost/concept/detail/general.hpp
passenger-5.0.14 ext/boost/concept/detail/general.hpp
passenger-5.0.13 ext/boost/concept/detail/general.hpp
passenger-5.0.11 ext/boost/concept/detail/general.hpp
passenger-5.0.10 ext/boost/concept/detail/general.hpp
passenger-5.0.9 ext/boost/concept/detail/general.hpp
passenger-5.0.8 ext/boost/concept/detail/general.hpp
passenger-5.0.7 ext/boost/concept/detail/general.hpp
passenger-5.0.6 ext/boost/concept/detail/general.hpp
passenger-5.0.5 ext/boost/concept/detail/general.hpp