text:
#include <CGAL/basic.h>
#include <iostream>
#include <cassert>

#include <CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h>

#include <boost/mpl/bool.hpp>
#include <boost/mpl/if.hpp>

int dispatch(CGAL::Arr_use_dummy_tag) {
  return 0;
}

int dispatch(CGAL::Arr_use_traits_tag) {
  return 1;
}

int main ()
{

  ////////////////
  // left-right //
  ////////////////

  // oblivious-oblivious
  // oblivious-open
  // oblivious-contracted
  // oblivious-closed

  // Arr_left_right_implementation_dispatch oblivious-oblivious
  {
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_oblivious_side_tag, CGAL::Arr_oblivious_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 0);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 0);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 0);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 0);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 0);
  }
  {
    // Arr_left_right_implementation_dispatch oblivious-open
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_oblivious_side_tag, CGAL::Arr_open_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 0);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 0);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 0);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch oblivious-contracted
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_oblivious_side_tag, CGAL::Arr_contracted_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 0);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 0);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch oblivious-closed
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_oblivious_side_tag, CGAL::Arr_closed_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 1);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 1);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }

  // open-oblivious
  // open-open
  // open-contracted
  // open-closed

  // Arr_left_right_implementation_dispatch open-oblivious
  {
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_open_side_tag, CGAL::Arr_oblivious_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 0);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 0);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 0);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch open-open
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_open_side_tag, CGAL::Arr_open_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 0);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 0);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 0);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch open-contracted
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_open_side_tag, CGAL::Arr_contracted_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 0);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 0);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch open-closed
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_open_side_tag, CGAL::Arr_closed_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 1);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 1);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }

  // contracted-oblivious
  // contracted-open
  // contracted-contracted
  // contracted-closed
  // Arr_left_right_implementation_dispatch contracted-oblivious
  {
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_contracted_side_tag, CGAL::Arr_oblivious_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 0);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 0);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch contracted-open
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_contracted_side_tag, CGAL::Arr_open_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 0);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 0);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch contracted-contracted
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_contracted_side_tag, CGAL::Arr_contracted_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 0);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 0);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch contracted-closed
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_contracted_side_tag, CGAL::Arr_closed_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 1);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 1);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }

  // closed-oblivious
  // closed-open
  // closed-contracted
  // closed-closed
  // Arr_left_right_implementation_dispatch closed-oblivious
  {
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_closed_side_tag, CGAL::Arr_oblivious_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 1);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 1);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch closed-open
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_closed_side_tag, CGAL::Arr_open_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 1);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 1);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch closed-contracted
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_closed_side_tag, CGAL::Arr_contracted_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 1);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 1);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_left_right_implementation_dispatch closed-closed
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_closed_side_tag, CGAL::Arr_closed_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 1);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 1);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 0);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 0);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 1);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }

  // identified-identified
  {
    // Arr_left_right_implementation_dispatch identified-identified
    typedef CGAL::internal::Arr_left_right_implementation_dispatch<
    CGAL::Arr_oblivious_side_tag, CGAL::Arr_identified_side_tag > LR;

    typedef LR::Parameter_space_in_x_2_curve_end_tag Psx_2_curve_end;
    assert(dispatch(Psx_2_curve_end()) == 1);
    typedef LR::Parameter_space_in_x_2_curve_tag Psx_2_curve;
    assert(dispatch(Psx_2_curve()) == 0);
    typedef LR::Parameter_space_in_x_2_point_tag Psx_2_point;
    assert(dispatch(Psx_2_point()) == 0);

    typedef LR::Is_on_y_identification_2_curve_tag Ioyi_2_curve;
    assert(dispatch(Ioyi_2_curve()) == 1);
    typedef LR::Is_on_y_identification_2_point_tag Ioyi_2_point;
    assert(dispatch(Ioyi_2_point()) == 1);

    typedef LR::Compare_y_on_boundary_2_points_tag Cmp_y_ob_2_points;
    assert(dispatch(Cmp_y_ob_2_points()) == 1);

    typedef LR::Compare_y_near_boundary_2_curve_ends_tag Cmp_y_nb_2_curve_ends;
    assert(dispatch(Cmp_y_nb_2_curve_ends()) == 1);
  }

  ////////////////
  // bottom-top //
  ////////////////

  // oblivious-oblivious
  // oblivious-open
  // oblivious-contracted
  // oblivious-closed
  {
    // Arr_bottom_top_implementation_dispatch oblivious-oblivious
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_oblivious_side_tag, CGAL::Arr_oblivious_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 0);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 0);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 0);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 0);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 0);
  }
  {
    // Arr_bottom_top_implementation_dispatch oblivious-open
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_oblivious_side_tag, CGAL::Arr_open_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 0);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 0);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 0);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 0);
  }
  {
    // Arr_bottom_top_implementation_dispatch oblivious-contracted
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_oblivious_side_tag, CGAL::Arr_contracted_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 0);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 0);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_bottom_top_implementation_dispatch oblivious-closed
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_oblivious_side_tag, CGAL::Arr_closed_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 1);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 1);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }

  // open-oblivious
  // open-open
  // open-contracted
  // open-closed
  {
    // Arr_bottom_top_implementation_dispatch open-oblivious
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_open_side_tag, CGAL::Arr_oblivious_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 0);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 0);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 0);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 0);
  }
  {
    // Arr_bottom_top_implementation_dispatch open-open
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_open_side_tag, CGAL::Arr_open_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 0);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 0);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 0);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 0);
  }
  {
    // Arr_bottom_top_implementation_dispatch open-contracted
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_open_side_tag, CGAL::Arr_contracted_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 0);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 0);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_bottom_top_implementation_dispatch open-closed
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_open_side_tag, CGAL::Arr_closed_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 1);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 1);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }

  // contracted-oblivious
  // contracted-open
  // contracted-contracted
  // contracted-closed
  {
    // Arr_bottom_top_implementation_dispatch contracted-oblivious
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_contracted_side_tag, CGAL::Arr_oblivious_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 0);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 0);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_bottom_top_implementation_dispatch contracted-open
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_contracted_side_tag, CGAL::Arr_open_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 0);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 0);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_bottom_top_implementation_dispatch contracted-contracted
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_contracted_side_tag, CGAL::Arr_contracted_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 0);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 0);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_bottom_top_implementation_dispatch contracted-closed
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_contracted_side_tag, CGAL::Arr_closed_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 1);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 1);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }

  // closed-oblivious
  // closed-open
  // closed-contracted
  // closed-closed
  {
    // Arr_bottom_top_implementation_dispatch closed-oblivious
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_closed_side_tag, CGAL::Arr_oblivious_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 1);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 1);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_bottom_top_implementation_dispatch closed-open
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_closed_side_tag, CGAL::Arr_open_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 1);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 1);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 1);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 1);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_bottom_top_implementation_dispatch closed-contracted
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_closed_side_tag, CGAL::Arr_contracted_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 1);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 1);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 1);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 1);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }
  {
    // Arr_bottom_top_implementation_dispatch closed-closed
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_closed_side_tag, CGAL::Arr_closed_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 1);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 1);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 0);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 0);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 1);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }

  // identified-identified
  {
    // Arr_bottom_top_implementation_dispatch identified-identified
    typedef CGAL::internal::Arr_bottom_top_implementation_dispatch<
    CGAL::Arr_identified_side_tag, CGAL::Arr_identified_side_tag > BT;

    typedef BT::Parameter_space_in_y_2_curve_end_tag Psy_2_curve_end;
    assert(dispatch(Psy_2_curve_end()) == 1);
    typedef BT::Parameter_space_in_y_2_curve_tag Psy_2_curve;
    assert(dispatch(Psy_2_curve()) == 0);
    typedef BT::Parameter_space_in_y_2_point_tag Psy_2_point;
    assert(dispatch(Psy_2_point()) == 0);

    typedef BT::Is_on_x_identification_2_curve_tag Ioxi_2_curve;
    assert(dispatch(Ioxi_2_curve()) == 1);
    typedef BT::Is_on_x_identification_2_point_tag Ioxi_2_point;
    assert(dispatch(Ioxi_2_point()) == 1);

    typedef BT::Compare_x_at_limit_2_point_curve_end_tag Cmp_x_al_2_point_curve_end;
    assert(dispatch(Cmp_x_al_2_point_curve_end()) == 0);
    typedef BT::Compare_x_at_limit_2_curve_ends_tag Cmp_x_al_2_curve_ends;
    assert(dispatch(Cmp_x_al_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_limit_2_curve_ends_tag Cmp_x_nl_2_curve_ends;
    assert(dispatch(Cmp_x_nl_2_curve_ends()) == 0);

    typedef BT::Compare_x_on_boundary_2_points_tag Cmp_x_ob_2_points;
    assert(dispatch(Cmp_x_ob_2_points()) == 1);
    typedef BT::Compare_x_on_boundary_2_point_curve_end_tag Cmp_x_ob_2_point_curve_end;
    assert(dispatch(Cmp_x_ob_2_point_curve_end()) == 0);
    typedef BT::Compare_x_on_boundary_2_curve_ends_tag Cmp_x_ob_2_curve_ends;
    assert(dispatch(Cmp_x_ob_2_curve_ends()) == 0);
    typedef BT::Compare_x_near_boundary_2_curve_ends_tag Cmp_x_nb_2_curve_ends;
    assert(dispatch(Cmp_x_nb_2_curve_ends()) == 1);
  }
  return EXIT_SUCCESS;

}

max_stars_repo_name: hlzz/dotfiles

max_issues_repo_name: hlzz/dotfiles

max_forks_repo_name: hlzz/dotfiles


text:
/*!
@file
Includes all the library components except the adapters for external
libraries.

@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
 */

#ifndef BOOST_HANA_HPP
#define BOOST_HANA_HPP

//! @defgroup group-concepts Concepts
//! Concepts provided by the library.

//! @defgroup group-datatypes Data types
//! General purpose data types provided by the library.

//! @defgroup group-functional Functional
//! General purpose function objects.

//! @defgroup group-core Core
//! Core utilities of the library.

//! @defgroup group-experimental Experimental features
//! Experimental features that may or may not make it into the library.
//! These features should not expected to be stable.

//! @defgroup group-ext External adapters
//! Adapters for external libraries.

//! @defgroup group-config Configuration options
//! Configurable options to tweak the global behavior of the library.

//! @defgroup group-assertions Assertions
//! Macros to perform different kinds of assertions.

//! @defgroup group-details Details
//! Implementation details. Do not rely on anything here, even if it is
//! documented.

// Include config.hpp first, so that warning messages about compiler support
// appear as soon as possible.
#include <boost/hana/config.hpp>

#ifdef BOOST_HANA_DOXYGEN_INVOKED
namespace boost {
    //! Namespace containing everything in the library.
    namespace hana {
        //! Namespace containing C++14 user-defined literals provided by Hana.
        namespace literals {}
    }
}
#endif

#include <boost/hana/accessors.hpp>
#include <boost/hana/adapt_adt.hpp>
#include <boost/hana/adapt_struct.hpp>
#include <boost/hana/adjust.hpp>
#include <boost/hana/adjust_if.hpp>
#include <boost/hana/all.hpp>
#include <boost/hana/all_of.hpp>
#include <boost/hana/and.hpp>
#include <boost/hana/any.hpp>
#include <boost/hana/any_of.hpp>
#include <boost/hana/ap.hpp>
#include <boost/hana/append.hpp>
#include <boost/hana/assert.hpp>
#include <boost/hana/at.hpp>
#include <boost/hana/at_key.hpp>
#include <boost/hana/back.hpp>
#include <boost/hana/basic_tuple.hpp>
#include <boost/hana/bool.hpp>
#include <boost/hana/cartesian_product.hpp>
#include <boost/hana/chain.hpp>
#include <boost/hana/comparing.hpp>
#include <boost/hana/concat.hpp>
#include <boost/hana/concept.hpp>
#include <boost/hana/contains.hpp>
#include <boost/hana/core.hpp>
#include <boost/hana/count.hpp>
#include <boost/hana/count_if.hpp>
#include <boost/hana/cycle.hpp>
#include <boost/hana/define_struct.hpp>
#include <boost/hana/difference.hpp>
#include <boost/hana/div.hpp>
#include <boost/hana/drop_back.hpp>
#include <boost/hana/drop_front.hpp>
#include <boost/hana/drop_front_exactly.hpp>
#include <boost/hana/drop_while.hpp>
#include <boost/hana/duplicate.hpp>
#include <boost/hana/empty.hpp>
#include <boost/hana/equal.hpp>
#include <boost/hana/erase_key.hpp>
#include <boost/hana/eval.hpp>
#include <boost/hana/eval_if.hpp>
#include <boost/hana/extend.hpp>
#include <boost/hana/extract.hpp>
#include <boost/hana/fill.hpp>
#include <boost/hana/filter.hpp>
#include <boost/hana/find.hpp>
#include <boost/hana/find_if.hpp>
#include <boost/hana/first.hpp>
#include <boost/hana/flatten.hpp>
#include <boost/hana/fold.hpp>
#include <boost/hana/fold_left.hpp>
#include <boost/hana/fold_right.hpp>
#include <boost/hana/for_each.hpp>
#include <boost/hana/front.hpp>
#include <boost/hana/functional.hpp>
#include <boost/hana/fuse.hpp>
#include <boost/hana/greater.hpp>
#include <boost/hana/greater_equal.hpp>
#include <boost/hana/group.hpp>
#include <boost/hana/index_if.hpp>
#include <boost/hana/if.hpp>
#include <boost/hana/insert.hpp>
#include <boost/hana/insert_range.hpp>
#include <boost/hana/integral_constant.hpp>
#include <boost/hana/intersection.hpp>
#include <boost/hana/intersperse.hpp>
#include <boost/hana/is_disjoint.hpp>
#include <boost/hana/is_empty.hpp>
#include <boost/hana/is_subset.hpp>
#include <boost/hana/keys.hpp>
#include <boost/hana/lazy.hpp>
#include <boost/hana/length.hpp>
#include <boost/hana/less.hpp>
#include <boost/hana/less_equal.hpp>
#include <boost/hana/lexicographical_compare.hpp>
#include <boost/hana/lift.hpp>
#include <boost/hana/map.hpp>
#include <boost/hana/max.hpp>
#include <boost/hana/maximum.hpp>
#include <boost/hana/members.hpp>
#include <boost/hana/min.hpp>
#include <boost/hana/minimum.hpp>
#include <boost/hana/minus.hpp>
#include <boost/hana/mod.hpp>
#include <boost/hana/monadic_compose.hpp>
#include <boost/hana/monadic_fold_left.hpp>
#include <boost/hana/monadic_fold_right.hpp>
#include <boost/hana/mult.hpp>
#include <boost/hana/negate.hpp>
#include <boost/hana/none.hpp>
#include <boost/hana/none_of.hpp>
#include <boost/hana/not.hpp>
#include <boost/hana/not_equal.hpp>
#include <boost/hana/one.hpp>
#include <boost/hana/optional.hpp>
#include <boost/hana/or.hpp>
#include <boost/hana/ordering.hpp>
#include <boost/hana/pair.hpp>
#include <boost/hana/partition.hpp>
#include <boost/hana/permutations.hpp>
#include <boost/hana/plus.hpp>
#include <boost/hana/power.hpp>
#include <boost/hana/prefix.hpp>
#include <boost/hana/prepend.hpp>
#include <boost/hana/product.hpp>
#include <boost/hana/range.hpp>
#include <boost/hana/remove.hpp>
#include <boost/hana/remove_at.hpp>
#include <boost/hana/remove_if.hpp>
#include <boost/hana/remove_range.hpp>
#include <boost/hana/repeat.hpp>
#include <boost/hana/replace.hpp>
#include <boost/hana/replace_if.hpp>
#include <boost/hana/replicate.hpp>
#include <boost/hana/reverse.hpp>
#include <boost/hana/reverse_fold.hpp>
#include <boost/hana/scan_left.hpp>
#include <boost/hana/scan_right.hpp>
#include <boost/hana/second.hpp>
#include <boost/hana/set.hpp>
#include <boost/hana/size.hpp>
#include <boost/hana/slice.hpp>
#include <boost/hana/sort.hpp>
#include <boost/hana/span.hpp>
#include <boost/hana/string.hpp>
#include <boost/hana/suffix.hpp>
#include <boost/hana/sum.hpp>
#include <boost/hana/symmetric_difference.hpp>
#include <boost/hana/take_back.hpp>
#include <boost/hana/take_front.hpp>
#include <boost/hana/take_while.hpp>
#include <boost/hana/tap.hpp>
#include <boost/hana/then.hpp>
#include <boost/hana/traits.hpp>
#include <boost/hana/transform.hpp>
#include <boost/hana/tuple.hpp>
#include <boost/hana/type.hpp>
#include <boost/hana/unfold_left.hpp>
#include <boost/hana/unfold_right.hpp>
#include <boost/hana/union.hpp>
#include <boost/hana/unique.hpp>
#include <boost/hana/unpack.hpp>
#include <boost/hana/value.hpp>
#include <boost/hana/version.hpp>
#include <boost/hana/while.hpp>
#include <boost/hana/zero.hpp>
#include <boost/hana/zip.hpp>
#include <boost/hana/zip_shortest.hpp>
#include <boost/hana/zip_shortest_with.hpp>
#include <boost/hana/zip_with.hpp>

#endif // !BOOST_HANA_HPP

ext: hpp


text:
#ifndef __NODE_MAPNIK_PROJ_TRANSFORM_H__
#define __NODE_MAPNIK_PROJ_TRANSFORM_H__

#include <v8.h>
#include <node_object_wrap.h>

// mapnik
#include <mapnik/proj_transform.hpp>

// boost
#include <boost/shared_ptr.hpp>

using namespace v8;

typedef boost::shared_ptr<mapnik::proj_transform> proj_tr_ptr;

class ProjTransform: public node::ObjectWrap {
public:
    static Persistent<FunctionTemplate> constructor;
    static void Initialize(Handle<Object> target);
    static Handle<Value> New(const Arguments &args);

    static Handle<Value> forward(const Arguments& args);
    static Handle<Value> backward(const Arguments& args);

    ProjTransform(mapnik::projection const& src,
                  mapnik::projection const& dest);

private:
    ~ProjTransform();
    proj_tr_ptr this_;
};

#endif

max_stars_repo_name: calvinmetcalf/node-mapnik

max_issues_repo_name: calvinmetcalf/node-mapnik

max_forks_repo_name: calvinmetcalf/node-mapnik


text:
#include <iostream>
#include <filesystem>
#include <fstream>

#include <boost/log/trivial.hpp>
#include <boost/program_options.hpp>
#include <SDL2/SDL.h>

#include "engine/core/app.h"
#include "engine/core/json_utils.h"
#include "engine/controls/controls.h"

namespace po = boost::program_options;

/// Emulate a bunch of user bindings from the controls config
void makeUserBindings(const Json::Value & config,
                      std::map<std::string, engine::Controls::BindingId> & nameToId,
                      std::map<engine::Controls::BindingId, std::string> & idToName)
{
  if(config != Json::Value())
  {
    for(auto && device : engine::getNodeOrThrow(config, "devices"))
    {
      for(auto && binding : engine::getNodeOrThrow(device, "bindings"))
      {
        std::string name;
        engine::get(binding, "name", name);
        engine::Controls::BindingId bindingID(nameToId.size() + 1);
        nameToId.emplace(name, bindingID);
        idToName.emplace(bindingID, name);
      }
    }
  }
}

int main(int argc, char ** argv)
{
  try
  {
    std::filesystem::path config;

    engine::App app;
    app.add_options()
      ("config,c", po::value<std::filesystem::path>(&config), "Control configuration file");

    if(app.run(argc, argv))
    {
      BOOST_LOG_TRIVIAL(info) << "Init SDL";

      engine::Controls controls;

      std::map<std::string, engine::Controls::BindingId> nameToId;
      std::map<engine::Controls::BindingId, std::string> idToName;
      if(!config.empty())
      {
        Json::Value jsonConfig;
        std::ifstream str(config);
        str >> jsonConfig;
        makeUserBindings(jsonConfig, nameToId, idToName);
        controls.initConfig(jsonConfig, nameToId);
      }

      controls.onButton().connect
        ([&idToName](engine::Controls::BindingId bindingID)
         {
           auto it = idToName.find(bindingID);
           if(it != idToName.end())
           {
             BOOST_LOG_TRIVIAL(info) << "onButton[" << it->second << "]";
           }
         });

      controls.onAxis().connect
        ([&idToName](engine::Controls::BindingId bindingID, float value)
         {
           auto it = idToName.find(bindingID);
           if(it != idToName.end())
           {
             BOOST_LOG_TRIVIAL(info) << "onAxis[" << it->second << "] " << value;
           }
         });

      bool running = true;
      while(running)
      {
        SDL_Event event;
        while(SDL_PollEvent(&event))
        {
          if(event.type == SDL_QUIT)
          {
            running = false;
          }
          else
          {
            controls.process(event);
          }
        }

        SDL_Delay(20);
      }
    }

    SDL_Quit();
    return 0;
  }
  catch(const std::exception & e)
  {
    SDL_Quit();
    BOOST_LOG_TRIVIAL(error) << e.what();
    return -1;
  }
}

ext: cpp

max_stars_repo_name: smallduckinette/engine

max_issues_repo_name: smallduckinette/engine

max_forks_repo_name: smallduckinette/engine


text:
#include <metaSMT/support/disable_warnings.hpp>
#include <boost/python.hpp>
#include <metaSMT/support/enable_warnings.hpp>

#include "solvers.hpp"

#include <metaSMT/API/SymbolTable.hpp>

using namespace boost::python;
using namespace metaSMT::expression;

template<typename T>
solver make_solver()
{
  return solver( boost::shared_ptr<T>( new T() ) );
}

template<typename T>
struct evaluate_expression_visitor : public boost::static_visitor<typename T::result_type>
{
  typedef typename T::result_type result_type;

  explicit evaluate_expression_visitor( T& _solver ) : _solver( _solver ) {}

  typename T::result_type operator()( bool expr ) const
  {
    if ( expr )
    {
      return metaSMT::evaluate( _solver, metaSMT::logic::True );
    }
    else
    {
      return metaSMT::evaluate( _solver, metaSMT::logic::False );
    }
  }

  typename T::result_type operator()( const metaSMT::logic::QF_BV::QF_BV<boost::proto::terminal<metaSMT::logic::QF_BV::tag::bit0_tag>::type>& ) const
  {
    return metaSMT::evaluate( _solver, metaSMT::logic::QF_BV::bit0 );
  }

  typename T::result_type operator()( const metaSMT::logic::QF_BV::QF_BV<boost::proto::terminal<metaSMT::logic::QF_BV::tag::bit1_tag>::type>& ) const
  {
    return metaSMT::evaluate( _solver, metaSMT::logic::QF_BV::bit1 );
  }

  typename T::result_type operator()( const metaSMT::logic::predicate& pred ) const
  {
    return metaSMT::evaluate( _solver, pred );
  }

  typename T::result_type operator()( const metaSMT::logic::QF_BV::bitvector& bv ) const
  {
    return metaSMT::evaluate( _solver, bv );
  }

  typename T::result_type operator()( const metaSMT::logic::Array::array& array ) const
  {
    return metaSMT::evaluate( _solver, array );
  }

  typename T::result_type operator()( const bv_const<metaSMT::logic::QF_BV::tag::bvuint_tag>& expr ) const
  {
    return metaSMT::evaluate( _solver, metaSMT::logic::QF_BV::bvuint( expr.value, expr.width ) );
  }

  typename T::result_type operator()( const bv_const<metaSMT::logic::QF_BV::tag::bvsint_tag>& expr ) const
  {
    return metaSMT::evaluate( _solver, metaSMT::logic::QF_BV::bvuint( expr.value, expr.width ) );
  }

  template<typename Tag>
  typename T::result_type operator()( const bv_const<Tag>& expr ) const
  {
    return metaSMT::evaluate( _solver, boost::proto::make_expr<Tag>( boost::cref( expr.str ) ) );
  }

  template<typename LogicTag, typename Tag>
  typename T::result_type operator()( const unary_expression<LogicTag, Tag>& expr ) const
  {
    return metaSMT::evaluate( _solver, boost::proto::make_expr<Tag>( boost::cref( boost::apply_visitor( *this, expr.expr ) ) ) );
  }

  template<typename LogicTag, typename Tag>
  typename T::result_type operator()( const binary_expression<LogicTag, Tag>& expr ) const
  {
    return metaSMT::evaluate( _solver, boost::proto::make_expr<Tag>( boost::cref( boost::apply_visitor( *this, expr.left ) ), boost::cref( boost::apply_visitor( *this, expr.right ) ) ) );
  }

  template<typename LogicTag, typename Tag>
  typename T::result_type operator()( const ternary_expression<LogicTag, Tag>& expr ) const
  {
    return metaSMT::evaluate( _solver, boost::proto::make_expr<Tag>( boost::cref( boost::apply_visitor( *this, expr.expr1 ) ), boost::cref( boost::apply_visitor( *this, expr.expr2 ) ), boost::cref( boost::apply_visitor( *this, expr.expr3 ) ) ) );
  }

  typename T::result_type operator()( const select_expression &expr ) const
  {
    return metaSMT::evaluate( _solver, metaSMT::logic::Array::select( boost::apply_visitor( *this, expr.array ) , boost::apply_visitor( *this, expr.index ) ) );
  }

  typename T::result_type operator()( const store_expression &expr ) const
  {
    return metaSMT::evaluate( _solver, metaSMT::logic::Array::store( boost::apply_visitor( *this, expr.array ), boost::apply_visitor( *this, expr.index ), boost::apply_visitor( *this, expr.value ) ) );
  }

  // nary expressions
  typename T::result_type operator() ( nary_expression<uf_tag, boost::proto::tag::function> e ) const {
    assert( false && "Yet not implemented" );
    return metaSMT::evaluate( _solver, metaSMT::logic::False);
  }

  typename T::result_type operator() ( nary_expression<logic_tag, predtags::and_tag> e ) const {
    typedef nary_expression<logic_tag, predtags::and_tag> Expr;
    result_type r = evaluate( _solver, metaSMT::logic::True);
    for ( Expr::ContainerType::const_iterator it = e.begin(), ie = e.end(); it != ie; ++it ) {
      result_type arg = boost::apply_visitor(*this, *it);
      r = evaluate(_solver, metaSMT::logic::And(r, arg));
    }
    return r;
  }

  typename T::result_type operator() ( nary_expression<logic_tag, predtags::or_tag> e ) const {
    typedef nary_expression<logic_tag, predtags::or_tag> Expr;
    result_type r = evaluate( _solver, metaSMT::logic::False);
    for ( Expr::ContainerType::const_iterator it = e.begin(), ie = e.end(); it != ie; ++it ) {
      result_type arg = boost::apply_visitor(*this, *it);
      r = evaluate(_solver, metaSMT::logic::Or(r, arg));
    }
    return r;
  }

  template<typename Tag>
  typename T::result_type operator()( const extend_expression<Tag>& expr ) const
  {
    return metaSMT::evaluate( _solver, boost::proto::make_expr<Tag>( boost::cref( expr.by ), boost::cref( boost::apply_visitor( *this, expr.expr ) ) ) );
  }

  template<typename Tag>
  typename T::result_type operator()( const extract_expression<Tag>& expr ) const
  {
    return metaSMT::evaluate( _solver, boost::proto::make_expr<Tag>( boost::cref( expr.from ), boost::cref( expr.width ), boost::cref( boost::apply_visitor( *this, expr.expr ) ) ) );
  }

  template<typename OtherTag>
  typename T::result_type operator()( const OtherTag & expr ) const
  {
    std::cerr << "\nunknown operator used \n" << typeid(expr).name() << "\n";
    return metaSMT::evaluate( _solver, metaSMT::logic::False );
  }

private:
  T& _solver;
};

struct assertion_visitor : public boost::static_visitor<>
{
  explicit assertion_visitor( const logic_expression& expr ) : expr( expr ) {}

  template<typename T>
  void operator()( const boost::shared_ptr<T>& s ) const
  {
    metaSMT::assertion( *s, boost::apply_visitor( evaluate_expression_visitor<T>( *s ), expr ) );
  }

private:
  const logic_expression& expr;
};

void py_assertion( const solver& ctx, const logic_expression& expr )
{
  boost::apply_visitor( assertion_visitor( expr ), ctx );
}

struct assumption_visitor : public boost::static_visitor<>
{
  explicit assumption_visitor( const logic_expression& expr ) : expr( expr ) {}

  template<typename T>
  void operator()( const boost::shared_ptr<T>& s ) const
  {
    metaSMT::assumption( *s, boost::apply_visitor( evaluate_expression_visitor<T>( *s ), expr ) );
  }

private:
  const logic_expression& expr;
};

void py_assumption( const solver& ctx, const logic_expression& expr )
{
  boost::apply_visitor( assumption_visitor( expr ), ctx );
}

struct solve_visitor : public boost::static_visitor<bool>
{
  template<typename T>
  bool operator()( const T& s ) const
  {
    return metaSMT::solve( *s );
  }
};

bool py_solve( const solver& ctx )
{
  return boost::apply_visitor( solve_visitor(), ctx );
}

struct read_value_visitor : public boost::static_visitor<bool>
{
  explicit read_value_visitor( const metaSMT::logic::predicate& pred ) : pred( pred ) {}

  template<typename T>
  bool operator()( const T& s ) const
  {
    return metaSMT::read_value( *s, pred );
  }

private:
  const metaSMT::logic::predicate& pred;
};

bool py_read_value( const solver& ctx, const metaSMT::logic::predicate& pred )
{
  return boost::apply_visitor( read_value_visitor( pred ), ctx );
}

struct read_bv_value_visitor : public boost::static_visitor<unsigned>
{
  explicit read_bv_value_visitor( const metaSMT::logic::QF_BV::bitvector& bv ) : bv( bv ) {}

  template<typename T>
  unsigned operator()( const T& s ) const
  {
    return metaSMT::read_value( *s, bv );
  }

private:
  const metaSMT::logic::QF_BV::bitvector& bv;
};

unsigned py_read_bv_value( const solver& ctx, const metaSMT::logic::QF_BV::bitvector& bv )
{
  return boost::apply_visitor( read_bv_value_visitor( bv ), ctx );
}

// Symbol Table
class smt2_symbol_table
{
public:
  typedef std::map<unsigned, std::string> map;

  std::string operator()( unsigned id )
  {
    map::const_iterator it = _map.find( id );
    if ( it == _map.end() )
    {
      return boost::str( boost::format( "var_%d" ) % id );
    }
    else
    {
      return it->second;
    }
  }

  void insert1( metaSMT::logic::predicate p, const std::string& name )
  {
    _map.insert( std::make_pair( boost::proto::value( p ).id, name ) );
  }

  void insert2( metaSMT::logic::QF_BV::bitvector b, const std::string& name )
  {
    _map.insert( std::make_pair( boost::proto::value( b ).id, name ) );
  }

private:
  map _map;
};

struct set_symbol_table_visitor : public boost::static_visitor<void>
{
  explicit set_symbol_table_visitor( smt2_symbol_table& table ) : table( table ) {}

  void operator()( boost::shared_ptr<smt2_solver>& s ) const
  {
    metaSMT::set_symbol_table( *s, table );
  }

  template<typename T>
  void operator()( T& s ) const
  {
    // do nothing
  }

private:
  smt2_symbol_table& table;
};

void py_set_symbol_table( solver& ctx, smt2_symbol_table& table )
{
  boost::apply_visitor( set_symbol_table_visitor( table ), ctx );
}

void export_solvers()
{
  class_<solver>( "solver" )
    .def( "py_assertion", &py_assertion )
    .def( "py_assumption", &py_assumption )
    .def( "solve", &py_solve )
    .def( "read_value", &py_read_value )
    .def( "read_value", &py_read_bv_value )
    .def( "__getitem__", &py_read_value )
    .def( "__getitem__", &py_read_bv_value )
    .def( "set_symbol_table", &py_set_symbol_table )
    ;
#if ENABLE_SOLVER_SWORD
  def( "sword_solver", &make_solver<sword_solver> );
#endif
#if ENABLE_SOLVER_BOOLECTOR
  def( "boolector_solver", &make_solver<boolector_solver> );
#endif
#if ENABLE_SOLVER_Z3
  def( "z3_solver", &make_solver<z3_solver> );
#endif
#if ENABLE_SOLVER_CUDD
  def( "cudd_solver", &make_solver<cudd_solver> );
#endif
#if ENABLE_SOLVER_MINISAT
  def( "minisat_solver", &make_solver<minisat_solver> );
#if ENABLE_SOLVER_AIGER
  def( "minisat_aiger_solver", &make_solver<minisat_aiger_solver> );
#endif
#endif
#if ENABLE_SOLVER_PICOSAT
  def( "picosat_solver", &make_solver<picosat_solver> );
#endif
#if ENABLE_SOLVER_GLUCOSER
  def( "glucoser_executable_solver", &make_solver<glucoser_executable_solver> );
#endif
#if ENABLE_SOLVER_MINISAT_EXECUTABLE
  def( "minisat_executable_solver", &make_solver<minisat_executable_solver> );
#endif
#if ENABLE_SOLVER_PICOSAT_EXECUTABLE
  def( "picosat_executable_solver", &make_solver<picosat_executable_solver> );
#endif
#if ENABLE_SOLVER_PLINGELING_EXECUTABLE
  def( "plingeling_executable_solver", &make_solver<plingeling_executable_solver> );
#endif
#if ENABLE_SOLVER_PRECOSAT_EXECUTABLE
  def( "precosat_executable_solver", &make_solver<precosat_executable_solver> );
#endif
#if ENABLE_SOLVER_SMT2
  def( "smt2_solver", &make_solver<smt2_solver> );
#endif

#if ENABLE_SOLVER_CONSTRAINT
  def( "constraint_solver", &make_solver<constraint_solver> );
#endif

  class_<smt2_symbol_table>( "smt2_symbol_table" )
    .def( "insert", &smt2_symbol_table::insert1 )
    .def( "insert", &smt2_symbol_table::insert2 )
    ;
}

max_stars_repo_name: finnhaedicke/metaSMT

max_issues_repo_name: finnhaedicke/metaSMT

max_forks_repo_name: finnhaedicke/metaSMT


text:
/*
 * This file is open source software, licensed to you under the terms
 * of the Apache License, Version 2.0 (the "License").  See the NOTICE file
 * distributed with this work for additional information regarding copyright
 * ownership.  You may not use this file except in compliance with the License.
 *
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
/*
 * Copyright (C) 2016 ScyllaDB
 */

#pragma once

#include <boost/intrusive/list.hpp>

namespace seastar {

/// A non-owning reference to an object.
///
/// weak_ptr allows one to keep a non-owning reference to an object. When the
/// object is destroyed, it notifies all weak_ptr instances pointing to it.
/// A weak_ptr instance pointing to a destroyed object is equivalent to a
/// `nullptr`.
///
/// The referenced object must inherit from weakly_referencable.
/// weak_ptr instances can only be obtained by calling weak_from_this() on
/// the to-be-referenced object.
///
/// \see weakly_referencable
template<typename T>
class weak_ptr {
    template<typename U>
    friend class weakly_referencable;
private:
    using hook_type = boost::intrusive::list_member_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>>;
    hook_type _hook;
    T* _ptr = nullptr;
    weak_ptr(T* p) noexcept : _ptr(p) {}
public:
    // Note: The default constructor's body is implemented as no-op
    // rather than `noexcept = default` due to a bug with gcc 9.3.1
    // that deletes the constructor since boost::intrusive::list_member_hook
    // is not default_nothrow_constructible.
    weak_ptr() noexcept {}
    weak_ptr(std::nullptr_t) noexcept : weak_ptr() {}
    weak_ptr(weak_ptr&& o) noexcept
        : _ptr(o._ptr)
    {
        _hook.swap_nodes(o._hook);
        o._ptr = nullptr;
    }
    weak_ptr& operator=(weak_ptr&& o) noexcept {
        if (this != &o) {
            this->~weak_ptr();
            new (this) weak_ptr(std::move(o));
        }
        return *this;
    }
    explicit operator bool() const noexcept { return _ptr != nullptr; }
    T* operator->() const noexcept { return _ptr; }
    T& operator*() const noexcept { return *_ptr; }
    T* get() const noexcept { return _ptr; }
    bool operator==(const weak_ptr& o) const noexcept { return _ptr == o._ptr; }
    bool operator!=(const weak_ptr& o) const noexcept { return _ptr != o._ptr; }
};

/// Allows obtaining a non-owning reference (weak_ptr) to the object.
///
/// A live weak_ptr object doesn't prevent the referenced object form being destroyed.
///
/// The underlying pointer held by weak_ptr is valid as long as the referenced object is alive.
/// When the object dies, all weak_ptr objects associated with it are emptied.
///
/// A weak reference is obtained like this:
///
///     class X : public weakly_referencable<X> {};
///     auto x = std::make_unique<X>();
///     weak_ptr<X> ptr = x->weak_from_this();
///
/// The user of weak_ptr can check if it still holds a valid pointer like this:
///
///     if (ptr) ptr->do_something();
///
template<typename T>
class weakly_referencable {
    boost::intrusive::list<weak_ptr<T>,
            boost::intrusive::member_hook<weak_ptr<T>, typename weak_ptr<T>::hook_type, &weak_ptr<T>::_hook>,
            boost::intrusive::constant_time_size<false>> _ptr_list;
public:
    // Note: The default constructor's body is implemented as no-op
    // rather than `noexcept = default` due to a bug with gcc 9.3.1
    // that deletes the constructor since boost::intrusive::member_hook
    // is not default_nothrow_constructible.
    weakly_referencable() noexcept {}
    weakly_referencable(weakly_referencable&&) = delete; // pointer to this is captured and passed to weak_ptr
    weakly_referencable(const weakly_referencable&) = delete;
    ~weakly_referencable() noexcept {
        _ptr_list.clear_and_dispose([] (weak_ptr<T>* wp) noexcept {
            wp->_ptr = nullptr;
        });
    }
    weak_ptr<T> weak_from_this() noexcept {
        weak_ptr<T> ptr(static_cast<T*>(this));
        _ptr_list.push_back(ptr);
        return ptr;
    }
};

}

ext: hh

max_stars_repo_name: liubangchen/seastar

max_issues_repo_name: liubangchen/seastar

max_forks_repo_name: liubangchen/seastar


text:
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2015-2015. 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)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////

#ifndef BOOST_CONTAINER_TEST_ALLOCATOR_ARGUMENT_TESTER_HPP
#define BOOST_CONTAINER_TEST_ALLOCATOR_ARGUMENT_TESTER_HPP

#include <boost/container/uses_allocator.hpp>
#include <boost/container/detail/mpl.hpp>
#include <boost/move/core.hpp>

template<class T, unsigned int Id, bool HasTrueTypes = false>
class propagation_test_allocator
{
   BOOST_COPYABLE_AND_MOVABLE(propagation_test_allocator)
   public:

   template<class U>
   struct rebind
   {
      typedef propagation_test_allocator<U, Id, HasTrueTypes> other;
   };

   typedef boost::container::dtl::bool_<HasTrueTypes>  propagate_on_container_copy_assignment;
   typedef boost::container::dtl::bool_<HasTrueTypes>  propagate_on_container_move_assignment;
   typedef boost::container::dtl::bool_<HasTrueTypes>  propagate_on_container_swap;
   typedef boost::container::dtl::bool_<HasTrueTypes>  is_always_equal;
   typedef T value_type;

   propagation_test_allocator()
      : m_move_contructed(false), m_move_assigned(false)
   {}

   propagation_test_allocator(const propagation_test_allocator&)
      : m_move_contructed(false), m_move_assigned(false)
   {}

   propagation_test_allocator(BOOST_RV_REF(propagation_test_allocator) )
      : m_move_contructed(true), m_move_assigned(false)
   {}

   template<class U>
   propagation_test_allocator(BOOST_RV_REF_BEG propagation_test_allocator<U, Id, HasTrueTypes> BOOST_RV_REF_END)
      : m_move_contructed(true), m_move_assigned(false)
   {}

   template<class U>
   propagation_test_allocator(const propagation_test_allocator<U, Id, HasTrueTypes> &)
   {}

   propagation_test_allocator & operator=(BOOST_COPY_ASSIGN_REF(propagation_test_allocator))
   {
      return *this;
   }

   propagation_test_allocator & operator=(BOOST_RV_REF(propagation_test_allocator))
   {
      m_move_assigned = true;
      return *this;
   }

   std::size_t max_size() const
   {  return std::size_t(-1);  }

   T* allocate(std::size_t n)
   {  return (T*)::new char[n*sizeof(T)];  }

   void deallocate(T*p, std::size_t)
   {  delete []static_cast<char*>(static_cast<void*>(p));  }

   bool m_move_contructed;
   bool m_move_assigned;
};

template <class T1, class T2, unsigned int Id, bool HasTrueTypes>
bool operator==( const propagation_test_allocator<T1, Id, HasTrueTypes>&
               , const propagation_test_allocator<T2, Id, HasTrueTypes>&)
{  return true;   }

template <class T1, class T2, unsigned int Id, bool HasTrueTypes>
bool operator!=( const propagation_test_allocator<T1, Id, HasTrueTypes>&
               , const propagation_test_allocator<T2, Id, HasTrueTypes>&)
{  return false;   }

//This enum lists the construction options
//for an allocator-aware type
enum ConstructionTypeEnum
{
   ConstructiblePrefix,
   ConstructibleSuffix,
   NotUsesAllocator
};

//This base class provices types for
//the derived class to implement each construction
//type. If a construction type does not apply
//the typedef is set to an internal nat
//so that the class is not constructible from
//the user arguments.
template<ConstructionTypeEnum ConstructionType, unsigned int AllocatorTag>
struct uses_allocator_base;

template<unsigned int AllocatorTag>
struct uses_allocator_base<ConstructibleSuffix, AllocatorTag>
{
   typedef propagation_test_allocator<int, AllocatorTag> allocator_type;
   typedef allocator_type allocator_constructor_type;
   struct nat{};
   typedef nat allocator_arg_type;
};

template<unsigned int AllocatorTag>
struct uses_allocator_base<ConstructiblePrefix, AllocatorTag>
{
   typedef propagation_test_allocator<int, AllocatorTag> allocator_type;
   typedef allocator_type allocator_constructor_type;
   typedef boost::container::allocator_arg_t allocator_arg_type;
};

template<unsigned int AllocatorTag>
struct uses_allocator_base<NotUsesAllocator, AllocatorTag>
{
   struct nat{};
   typedef nat allocator_constructor_type;
   typedef nat allocator_arg_type;
};

template<ConstructionTypeEnum ConstructionType, unsigned int AllocatorTag>
struct allocator_argument_tester
   : uses_allocator_base<ConstructionType, AllocatorTag>
{
   private:
   BOOST_COPYABLE_AND_MOVABLE(allocator_argument_tester)

   public:

   typedef uses_allocator_base<ConstructionType, AllocatorTag> base_type;

   //0 user argument constructors
   allocator_argument_tester()
      : construction_type(NotUsesAllocator), value(0)
   {}

   explicit allocator_argument_tester
      (typename base_type::allocator_constructor_type)
      : construction_type(ConstructibleSuffix), value(0)
   {}

   explicit allocator_argument_tester
      (typename base_type::allocator_arg_type, typename base_type::allocator_constructor_type)
      : construction_type(ConstructiblePrefix), value(0)
   {}

   //1 user argument constructors
   explicit allocator_argument_tester(int i)
      : construction_type(NotUsesAllocator), value(i)
   {}

   allocator_argument_tester
      (int i, typename base_type::allocator_constructor_type)
      : construction_type(ConstructibleSuffix), value(i)
   {}

   allocator_argument_tester
      ( typename base_type::allocator_arg_type
      , typename base_type::allocator_constructor_type
      , int i)
      : construction_type(ConstructiblePrefix), value(i)
   {}

   //Copy constructors
   allocator_argument_tester(const allocator_argument_tester &other)
      : construction_type(NotUsesAllocator), value(other.value)
   {}

   allocator_argument_tester( const allocator_argument_tester &other
                            , typename base_type::allocator_constructor_type)
      : construction_type(ConstructibleSuffix), value(other.value)
   {}

   allocator_argument_tester( typename base_type::allocator_arg_type
                            , typename base_type::allocator_constructor_type
                            , const allocator_argument_tester &other)
      : construction_type(ConstructiblePrefix), value(other.value)
   {}

   //Move constructors
   allocator_argument_tester(BOOST_RV_REF(allocator_argument_tester) other)
      : construction_type(NotUsesAllocator), value(other.value)
   {  other.value = 0;  other.construction_type = NotUsesAllocator;  }

   allocator_argument_tester( BOOST_RV_REF(allocator_argument_tester) other
                            , typename base_type::allocator_constructor_type)
      : construction_type(ConstructibleSuffix), value(other.value)
   {  other.value = 0;  other.construction_type = ConstructibleSuffix;  }

   allocator_argument_tester( typename base_type::allocator_arg_type
                            , typename base_type::allocator_constructor_type
                            , BOOST_RV_REF(allocator_argument_tester) other)
      : construction_type(ConstructiblePrefix), value(other.value)
   {  other.value = 0;  other.construction_type = ConstructiblePrefix;  }

   ConstructionTypeEnum construction_type;
   int                  value;
};

namespace boost {
namespace container {

template<unsigned int AllocatorTag>
struct constructible_with_allocator_prefix
   < ::allocator_argument_tester<ConstructiblePrefix, AllocatorTag> >
{
   static const bool value = true;
};

template<unsigned int AllocatorTag>
struct constructible_with_allocator_suffix
   < ::allocator_argument_tester<ConstructibleSuffix, AllocatorTag> >
{
   static const bool value = true;
};

}  //namespace container {
}  //namespace boost {

#endif   //BOOST_CONTAINER_TEST_ALLOCATOR_ARGUMENT_TESTER_HPP


text:
//  (C) Copyright Andy Tompkins 2010. Permission to copy, use, modify, sell and
//  distribute this software is granted provided this copyright notice appears
//  in all copies. This software is provided "as is" without express or implied
//  warranty, and with no claim as to its suitability for any purpose.

// 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)

//  libs/uuid/test/lightweight_test_ex.hpp  -------------------------------//

//  BOOST_TEST_NE(expr1, expr2)

#ifndef BOOST_UUID_TEST_LIGHTWEIGHT_TEST_EX_HPP
#define BOOST_UUID_TEST_LIGHTWEIGHT_TEST_EX_HPP

#include <boost/detail/lightweight_test.hpp>

namespace boost {
namespace detail {

template<class T, class U> inline void test_ne_impl( char const * expr1, char const * expr2, char const * file, int line, char const * function, T const & t, U const & u )
{
    if( t != u )
    {
    }
    else
    {
        std::cerr << file << "(" << line << "): test '" << expr1 << " != " << expr2
            << "' failed in function '" << function << "': "
            << "'" << t << "' == '" << u << "'" << std::endl;
        ++test_errors();
    }
}

}} // namespace boost::detail

#define BOOST_TEST_NE(expr1,expr2) ( ::boost::detail::test_ne_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )

#endif //BOOST_UUID_TEST_LIGHTWEIGHT_TEST_EX_HPP

max_stars_repo_name: zyiacas/boost-doc-zh

max_issues_repo_name: sdfict/boost-doc-zh

max_forks_repo_name: sdfict/boost-doc-zh


text:
#pragma once

#include <oslo/lib/blocks.hpp>
#include <oslo/node/state_block_signature_verification.hpp>
#include <oslo/secure/common.hpp>

#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/sequenced_index.hpp>
#include <boost/multi_index_container.hpp>

#include <chrono>
#include <memory>
#include <unordered_set>

namespace oslo
{
class node;
class transaction;
class write_transaction;
class write_database_queue;

enum class block_origin
{
	local,
	remote
};

class block_post_events final
{
public:
	~block_post_events ();
	std::deque<std::function<void()>> events;
};

/**
 * Processing blocks is a potentially long IO operation.
 * This class isolates block insertion from other operations like servicing network operations
 */
class block_processor final
{
public:
	explicit block_processor (oslo::node &, oslo::write_database_queue &);
	~block_processor ();
	void stop ();
	void flush ();
	size_t size ();
	bool full ();
	bool half_full ();
	void add (oslo::unchecked_info const &, const bool = false);
	void add (std::shared_ptr<oslo::block>, uint64_t = 0);
	void force (std::shared_ptr<oslo::block>);
	void wait_write ();
	bool should_log ();
	bool have_blocks ();
	void process_blocks ();
	oslo::process_return process_one (oslo::write_transaction const &, block_post_events &, oslo::unchecked_info, const bool = false, oslo::block_origin const = oslo::block_origin::remote);
	oslo::process_return process_one (oslo::write_transaction const &, block_post_events &, std::shared_ptr<oslo::block>, const bool = false);
	std::atomic<bool> flushing{ false };
	// Delay required for average network propagartion before requesting confirmation
	static std::chrono::milliseconds constexpr confirmation_request_delay{ 1500 };

private:
	void queue_unchecked (oslo::write_transaction const &, oslo::block_hash const &);
	void process_batch (oslo::unique_lock<std::mutex> &);
	void process_live (oslo::block_hash const &, std::shared_ptr<oslo::block>, oslo::process_return const &, const bool = false, oslo::block_origin const = oslo::block_origin::remote);
	void process_old (oslo::write_transaction const &, std::shared_ptr<oslo::block> const &, oslo::block_origin const);
	void requeue_invalid (oslo::block_hash const &, oslo::unchecked_info const &);
	void process_verified_state_blocks (std::deque<oslo::unchecked_info> &, std::vector<int> const &, std::vector<oslo::block_hash> const &, std::vector<oslo::signature> const &);
	bool stopped{ false };
	bool active{ false };
	bool awaiting_write{ false };
	std::chrono::steady_clock::time_point next_log;
	std::deque<oslo::unchecked_info> blocks;
	std::deque<std::shared_ptr<oslo::block>> forced;
	oslo::condition_variable condition;
	oslo::node & node;
	oslo::write_database_queue & write_database_queue;
	std::mutex mutex;
	oslo::state_block_signature_verification state_block_signature_verification;

	friend std::unique_ptr<container_info_component> collect_container_info (block_processor & block_processor, const std::string & name);
};
std::unique_ptr<oslo::container_info_component> collect_container_info (block_processor & block_processor, const std::string & name);
}

max_stars_repo_name: oslocurrency/oslo-node

max_issues_repo_name: oslocurrency/oslo-node

max_forks_repo_name: oslocurrency/oslo-node


text:
// ======================================================================

#include "Defs.h"
#include "Config.h"
#include "Hash.h"
#include "State.h"
#include "Symbols.h"
#include <boost/timer/timer.hpp>
#include <ctpp2/CDT.hpp>
#include <macgyver/Exception.h>
#include <spine/HTTP.h>

namespace SmartMet
{
namespace Plugin
{
namespace Dali
{
// ----------------------------------------------------------------------
/*!
 * \brief Initialize the product from JSON
 */
// ----------------------------------------------------------------------

void Defs::init(const Json::Value& theJson,
                const State& theState,
                const Config& theConfig,
                const Properties& theParent)
{
  try
  {
    // Inherit properties
    Properties::init(theJson, theState, theConfig, theParent);

    if (theJson.isNull())
      return;

    if (!theJson.isObject())
      throw Fmi::Exception(BCP, "Defs JSON is not a JSON object (name-value pairs)");

    // Extract member values

    Json::Value nulljson;

    auto json = theJson.get("qid", nulljson);
    if (!json.isNull())
      qid = json.asString();

    json = theJson.get("styles", nulljson);
    if (!json.isNull())
      styles.init(json, theConfig);

    json = theJson.get("layers", nulljson);
    if (!json.isNull())
      layers.init(json, theState, theConfig, *this);

    json = theJson.get("symbols", nulljson);
    if (!json.isNull())
      symbols.init(json, theState);
    json = theJson.get("filters", nulljson);
    if (!json.isNull())
      filters.init(json, theState);
    json = theJson.get("markers", nulljson);
    if (!json.isNull())
      markers.init(json, theState);
    json = theJson.get("patterns", nulljson);
    if (!json.isNull())
      patterns.init(json, theState);
    json = theJson.get("gradients", nulljson);
    if (!json.isNull())
      gradients.init(json, theState);
    json = theJson.get("css", nulljson);
    if (!json.isNull())
      csss.init(json, theState);
  }
  catch (...)
  {
    throw Fmi::Exception::Trace(BCP, "Operation failed!");
  }
}

// ----------------------------------------------------------------------
/*!
 * \brief Generate the definitions into the template hash tables
 */
// ----------------------------------------------------------------------

void Defs::generate(CTPP::CDT& theGlobals, State& theState)
{
  try
  {
    theState.inDefs(true);
    styles.generate(theGlobals, theState);
    theGlobals["layers"] = CTPP::CDT(CTPP::CDT::ARRAY_VAL);
    layers.generate(theGlobals, theGlobals["layers"], theState);
    theState.inDefs(false);
  }
  catch (...)
  {
    throw Fmi::Exception::Trace(BCP, "Operation failed!");
  }
}

// ----------------------------------------------------------------------
/*!
 * \brief Hash value
 */
// ----------------------------------------------------------------------

std::size_t Defs::hash_value(const State& theState) const
{
  try
  {
    std::size_t hash = 0;
    Fmi::hash_combine(hash, Fmi::hash_value(qid));
    Fmi::hash_combine(hash, Dali::hash_value(styles, theState));
    Fmi::hash_combine(hash, Dali::hash_value(layers, theState));
    return hash;
  }
  catch (...)
  {
    throw Fmi::Exception::Trace(BCP, "Operation failed!");
  }
}

}  // namespace Dali
}  // namespace Plugin
}  // namespace SmartMet

max_stars_repo_name: fmidev/smartmet-plugin-wms

max_issues_repo_name: fmidev/smartmet-plugin-wms

max_forks_repo_name: fmidev/smartmet-plugin-wms


text:
#include <string>
#include <iostream>
#include <boost/lambda/lambda.hpp>
#include "sqlite3pp.h"
#include "sqlite3ppext.h"

using namespace std;
using namespace boost::lambda;

int test0()
{
  return 100;
}

void test1(sqlite3pp::ext::context& ctx)
{
  ctx.result(200);
}

void test2(sqlite3pp::ext::context& ctx)
{
  std::string args = ctx.get<std::string>(0);
  ctx.result(args);
}

void test3(sqlite3pp::ext::context& ctx)
{
  ctx.result_copy(0);
}

std::string test5(std::string const& value)
{
  return value;
}

std::string test6(std::string const& s1, std::string const& s2, std::string const& s3)
{
  return s1 + s2 + s3;
}

int main(int argc, char* argv[])
{
  try {
    sqlite3pp::database db("test.db");

    sqlite3pp::ext::function func(db);
    cout << func.create<int ()>("h0", &test0) << endl;
    cout << func.create("h1", &test1) << endl;
    cout << func.create("h2", &test2, 1) << endl;
    cout << func.create("h3", &test3, 1) << endl;
    cout << func.create<int ()>("h4", constant(500)) << endl;
    cout << func.create<int (int)>("h5", _1 + constant(1000)) << endl;
    cout << func.create<string (string, string, string)>("h6", &test6) << endl;

    sqlite3pp::query qry(db, "SELECT h0(), h1(), h2('x'), h3('y'), h4(), h5(10), h6('a', 'b', 'c')");

    for (int i = 0; i < qry.column_count(); ++i) {
      cout << qry.column_name(i) << "\t";
    }
    cout << endl;

    for (sqlite3pp::query::iterator i = qry.begin(); i != qry.end(); ++i) {
      for (int j = 0; j < qry.column_count(); ++j) {
	cout << (*i).get<char const*>(j) << "\t";
      }
      cout << endl;
    }
    cout << endl;
  }
  catch (exception& ex) {
    cout << ex.what() << endl;
  }
}

max_issues_repo_name: sinomiko/project


text:
#define BOOST_TEST_MODULE pcraster aguila rgb_tuple
#include <boost/test/unit_test.hpp>
#include "com_rgbtuple.h"

BOOST_AUTO_TEST_CASE(eq)
{
  using namespace com;

  RgbTuple gray25(64,64,64);
  BOOST_CHECK(gray25 == gray25);
  BOOST_CHECK(gray25 != RgbTuple::gray50_);
  BOOST_CHECK(RgbTuple::gray50_ == RgbTuple::gray50_);
  BOOST_CHECK(RgbTuple::gray50_ != RgbTuple::black_);
}

ext: cc

max_stars_repo_name: quanpands/wflow

max_issues_repo_name: quanpands/wflow

max_forks_repo_name: quanpands/wflow


text:
--- src/main/portfolio.cpp.intermediate	2019-05-04 13:41:43 UTC
+++ src/main/portfolio.cpp
@@ -18,7 +18,7 @@
 #include <boost/bind.hpp>
 #include <boost/thread/condition.hpp>
 #include <boost/exception_ptr.hpp>
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <pthread_np.h>
 #endif

@@ -105,7 +105,7 @@ std::pair<int, S> runPortfolio(int numTh
       pthread_attr_t attr;
 #ifdef __linux__
       pthread_getattr_np(threads[t].native_handle(), &attr);
-#elif __FreeBSD__
+#elif __FreeBSD__ || __DragonFly__
       pthread_attr_get_np(threads[t].native_handle(), &attr);
 #endif
       pthread_attr_getstack(&attr, &stackaddr, &stacksize);

max_stars_repo_name: liweitianux/DeltaPorts

max_issues_repo_name: liweitianux/DeltaPorts

max_forks_repo_name: liweitianux/DeltaPorts