Sha256: 9a9f8685bd4e69c60a8af6f0a31c1439e5c1f1fc83bac5f4f85677ae1cee2089

Contents?: true

Size: 1.89 KB

Versions: 35

Compression:

Stored size: 1.89 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/config.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__)             \
      BOOST_ATTRIBUTE_UNUSED

}}

#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
passenger-6.0.2 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-6.0.1 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-6.0.0 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.3.7 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.3.6 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.3.5 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.3.4 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.3.3 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.3.2 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.3.1 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.3.0 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.2.3 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.2.2 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.2.1 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.2.0 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.1.12 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.1.11 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.1.10 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.1.9 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp
passenger-5.1.8 src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp