Sha256: 8c847fabbfc6384ea7517e0beaa8847dcc8ae781690eb88212f156179dc596ad

Contents?: true

Size: 1.53 KB

Versions: 35

Compression:

Stored size: 1.53 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>

# 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 concept {

template <class ModelFn>
struct requirement_;

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

template <class Model>
struct requirement
{
    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_<
        concept::not_satisfied<Model>
      , constraint<Model>
      , requirement<Model>
    >::type
{};
  
# else

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

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

}}

#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP

Version data entries

35 entries across 35 versions & 5 rubygems

Version Path
rockdog-passenger-0.0.1 ext/boost/concept/detail/general.hpp
vanity-1.7.1 vendor/ruby/1.9.1/gems/passenger-2.2.15/ext/boost/concept/detail/general.hpp
passenger-3.0.0 ext/boost/concept/detail/general.hpp
passenger-3.0.0.pre4 ext/boost/concept/detail/general.hpp
passenger-3.0.0.pre3 ext/boost/concept/detail/general.hpp
passenger-3.0.0.pre2 ext/boost/concept/detail/general.hpp
passenger-3.0.0.pre1 ext/boost/concept/detail/general.hpp
passenger-2.2.15 ext/boost/concept/detail/general.hpp
passenger-2.2.14 ext/boost/concept/detail/general.hpp
passenger-2.2.13 ext/boost/concept/detail/general.hpp
passenger-2.2.12 ext/boost/concept/detail/general.hpp
colouringcode-passenger-0.2 ext/boost/concept/detail/general.hpp
passenger-2.2.11 ext/boost/concept/detail/general.hpp
passenger-jmazzi-2.2.10 ext/boost/concept/detail/general.hpp
passenger-2.2.10 ext/boost/concept/detail/general.hpp
passenger-jmazzi-2.2.9 ext/boost/concept/detail/general.hpp
passenger-2.2.9 ext/boost/concept/detail/general.hpp
passenger-2.2.8 ext/boost/concept/detail/general.hpp
colouringcode-passenger-0.1 ext/boost/concept/detail/general.hpp
passenger-2.2.7 ext/boost/concept/detail/general.hpp