Merge branch 'sender'
1
.gitignore
vendored
|
@ -8,3 +8,4 @@ xs/buildtmp
|
|||
*.o
|
||||
MANIFEST.bak
|
||||
xs/MANIFEST.bak
|
||||
xs/assertlib*
|
||||
|
|
3
Build.PL
|
@ -7,6 +7,7 @@ use Config;
|
|||
use File::Spec;
|
||||
|
||||
my %prereqs = qw(
|
||||
Devel::CheckLib 0
|
||||
Encode 0
|
||||
Encode::Locale 1.05
|
||||
ExtUtils::MakeMaker 6.80
|
||||
|
@ -49,6 +50,8 @@ if ($gui) {
|
|||
Net::Bonjour 0
|
||||
);
|
||||
if ($^O eq 'MSWin32') {
|
||||
$recommends{"Win32::TieRegistry"} = 0;
|
||||
|
||||
# we need an up-to-date Win32::API because older aren't thread-safe (GH #2517)
|
||||
$prereqs{'Win32::API'} = 0.79;
|
||||
}
|
||||
|
|
|
@ -197,6 +197,7 @@ sub thread_cleanup {
|
|||
*Slic3r::GCode::AvoidCrossingPerimeters::DESTROY = sub {};
|
||||
*Slic3r::GCode::OozePrevention::DESTROY = sub {};
|
||||
*Slic3r::GCode::PlaceholderParser::DESTROY = sub {};
|
||||
*Slic3r::GCode::Sender::DESTROY = sub {};
|
||||
*Slic3r::GCode::Wipe::DESTROY = sub {};
|
||||
*Slic3r::GCode::Writer::DESTROY = sub {};
|
||||
*Slic3r::Geometry::BoundingBox::DESTROY = sub {};
|
||||
|
|
|
@ -5,10 +5,14 @@ use utf8;
|
|||
|
||||
use File::Basename qw(basename);
|
||||
use FindBin;
|
||||
use Slic3r::GUI::2DBed;
|
||||
use Slic3r::GUI::AboutDialog;
|
||||
use Slic3r::GUI::BedShapeDialog;
|
||||
use Slic3r::GUI::BonjourBrowser;
|
||||
use Slic3r::GUI::ConfigWizard;
|
||||
use Slic3r::GUI::Controller;
|
||||
use Slic3r::GUI::Controller::ManualControlDialog;
|
||||
use Slic3r::GUI::Controller::PrinterPanel;
|
||||
use Slic3r::GUI::MainFrame;
|
||||
use Slic3r::GUI::Notifier;
|
||||
use Slic3r::GUI::Plater;
|
||||
|
@ -31,7 +35,7 @@ our $have_OpenGL = eval "use Slic3r::GUI::3DScene; 1";
|
|||
our $have_LWP = eval "use LWP::UserAgent; 1";
|
||||
|
||||
use Wx 0.9901 qw(:bitmap :dialog :icon :id :misc :systemsettings :toplevelwindow
|
||||
:filedialog);
|
||||
:filedialog :font);
|
||||
use Wx::Event qw(EVT_IDLE EVT_COMMAND);
|
||||
use base 'Wx::App';
|
||||
|
||||
|
@ -64,8 +68,12 @@ our $Settings = {
|
|||
our $have_button_icons = &Wx::wxVERSION_STRING =~ / (?:2\.9\.[1-9]|3\.)/;
|
||||
our $small_font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||
$small_font->SetPointSize(11) if !&Wx::wxMSW;
|
||||
our $small_bold_font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||
$small_bold_font->SetPointSize(11) if !&Wx::wxMSW;
|
||||
$small_bold_font->SetWeight(wxFONTWEIGHT_BOLD);
|
||||
our $medium_font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||
$medium_font->SetPointSize(12);
|
||||
our $grey = Wx::Colour->new(200,200,200);
|
||||
|
||||
our $VERSION_CHECK_EVENT : shared = Wx::NewEventType;
|
||||
|
||||
|
@ -305,4 +313,29 @@ sub CallAfter {
|
|||
push @cb, $cb;
|
||||
}
|
||||
|
||||
sub scan_serial_ports {
|
||||
my ($self) = @_;
|
||||
|
||||
my @ports = ();
|
||||
|
||||
if ($^O eq 'MSWin32') {
|
||||
# Windows
|
||||
if (eval "use Win32::TieRegistry; 1") {
|
||||
my $ts = Win32::TieRegistry->new("HKEY_LOCAL_MACHINE\\HARDWARE\\DEVICEMAP\\SERIALCOMM",
|
||||
{ Access => 'KEY_READ' });
|
||||
if ($ts) {
|
||||
# when no serial ports are available, the registry key doesn't exist and
|
||||
# TieRegistry->new returns undef
|
||||
$ts->Tie(\my %reg);
|
||||
push @ports, sort values %reg;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# UNIX and OS X
|
||||
push @ports, glob '/dev/{ttyUSB,ttyACM,tty.,cu.,rfcomm}*';
|
||||
}
|
||||
|
||||
return grep !/Bluetooth|FireFly/, @ports;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
196
lib/Slic3r/GUI/2DBed.pm
Normal file
|
@ -0,0 +1,196 @@
|
|||
package Slic3r::GUI::2DBed;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use List::Util qw(min max);
|
||||
use Slic3r::Geometry qw(PI X Y unscale deg2rad);
|
||||
use Slic3r::Geometry::Clipper qw(intersection_pl);
|
||||
use Wx qw(:misc :pen :brush :font wxTAB_TRAVERSAL);
|
||||
use Wx::Event qw(EVT_PAINT EVT_MOUSE_EVENTS);
|
||||
use base qw(Wx::Panel Class::Accessor);
|
||||
|
||||
__PACKAGE__->mk_accessors(qw(bed_shape interactive pos _scale_factor _shift on_move));
|
||||
|
||||
sub new {
|
||||
my ($class, $parent, $bed_shape) = @_;
|
||||
|
||||
my $self = $class->SUPER::new($parent, -1, wxDefaultPosition, [250,-1], wxTAB_TRAVERSAL);
|
||||
$self->bed_shape($bed_shape // []);
|
||||
EVT_PAINT($self, \&_repaint);
|
||||
EVT_MOUSE_EVENTS($self, \&_mouse_event);
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub _repaint {
|
||||
my ($self) = @_;
|
||||
|
||||
my $dc = Wx::PaintDC->new($self);
|
||||
my ($cw, $ch) = $self->GetSizeWH;
|
||||
return if $cw == 0; # when canvas is not rendered yet, size is 0,0
|
||||
|
||||
# turn $cw and $ch from sizes to max coordinates
|
||||
$cw--;
|
||||
$ch--;
|
||||
|
||||
my $cbb = Slic3r::Geometry::BoundingBoxf->new_from_points([
|
||||
Slic3r::Pointf->new(0, 0),
|
||||
Slic3r::Pointf->new($cw, $ch),
|
||||
]);
|
||||
|
||||
# leave space for origin point
|
||||
$cbb->set_x_min($cbb->x_min + 2);
|
||||
$cbb->set_y_max($cbb->y_max - 2);
|
||||
|
||||
# leave space for origin label
|
||||
$cbb->set_y_max($cbb->y_max - 10);
|
||||
|
||||
# read new size
|
||||
($cw, $ch) = @{$cbb->size};
|
||||
my $ccenter = $cbb->center;
|
||||
|
||||
# get bounding box of bed shape in G-code coordinates
|
||||
my $bed_shape = $self->bed_shape;
|
||||
my $bed_polygon = Slic3r::Polygon->new_scale(@$bed_shape);
|
||||
my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($bed_shape);
|
||||
$bb->merge_point(Slic3r::Pointf->new(0,0)); # origin needs to be in the visible area
|
||||
my ($bw, $bh) = @{$bb->size};
|
||||
my $bcenter = $bb->center;
|
||||
|
||||
# calculate the scaling factor for fitting bed shape in canvas area
|
||||
my $sfactor = min($cw/$bw, $ch/$bh);
|
||||
my $shift = Slic3r::Pointf->new(
|
||||
$ccenter->x - $bcenter->x * $sfactor,
|
||||
$ccenter->y - $bcenter->y * $sfactor, #-
|
||||
);
|
||||
$self->_scale_factor($sfactor);
|
||||
$self->_shift(Slic3r::Pointf->new(
|
||||
$shift->x + $cbb->x_min,
|
||||
$shift->y - ($cbb->y_max-$self->GetSize->GetHeight), #++
|
||||
));
|
||||
|
||||
# draw bed fill
|
||||
{
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(0,0,0), 1, wxSOLID));
|
||||
$dc->SetBrush(Wx::Brush->new(Wx::Colour->new(255,255,255), wxSOLID));
|
||||
$dc->DrawPolygon([ map $self->to_pixels($_), @$bed_shape ], 0, 0);
|
||||
}
|
||||
|
||||
# draw grid
|
||||
{
|
||||
my $step = 10; # 1cm grid
|
||||
my @polylines = ();
|
||||
for (my $x = $bb->x_min - ($bb->x_min % $step) + $step; $x < $bb->x_max; $x += $step) {
|
||||
push @polylines, Slic3r::Polyline->new_scale([$x, $bb->y_min], [$x, $bb->y_max]);
|
||||
}
|
||||
for (my $y = $bb->y_min - ($bb->y_min % $step) + $step; $y < $bb->y_max; $y += $step) {
|
||||
push @polylines, Slic3r::Polyline->new_scale([$bb->x_min, $y], [$bb->x_max, $y]);
|
||||
}
|
||||
@polylines = @{intersection_pl(\@polylines, [$bed_polygon])};
|
||||
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(230,230,230), 1, wxSOLID));
|
||||
$dc->DrawLine(map @{$self->to_pixels([map unscale($_), @$_])}, @$_[0,-1]) for @polylines;
|
||||
}
|
||||
|
||||
# draw bed contour
|
||||
{
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(0,0,0), 1, wxSOLID));
|
||||
$dc->SetBrush(Wx::Brush->new(Wx::Colour->new(255,255,255), wxTRANSPARENT));
|
||||
$dc->DrawPolygon([ map $self->to_pixels($_), @$bed_shape ], 0, 0);
|
||||
}
|
||||
|
||||
my $origin_px = $self->to_pixels(Slic3r::Pointf->new(0,0));
|
||||
|
||||
# draw axes
|
||||
{
|
||||
my $axes_len = 50;
|
||||
my $arrow_len = 6;
|
||||
my $arrow_angle = deg2rad(45);
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(255,0,0), 2, wxSOLID)); # red
|
||||
my $x_end = Slic3r::Pointf->new($origin_px->[X] + $axes_len, $origin_px->[Y]);
|
||||
$dc->DrawLine(@$origin_px, @$x_end);
|
||||
foreach my $angle (-$arrow_angle, +$arrow_angle) {
|
||||
my $end = $x_end->clone;
|
||||
$end->translate(-$arrow_len, 0);
|
||||
$end->rotate($angle, $x_end);
|
||||
$dc->DrawLine(@$x_end, @$end);
|
||||
}
|
||||
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(0,255,0), 2, wxSOLID)); # green
|
||||
my $y_end = Slic3r::Pointf->new($origin_px->[X], $origin_px->[Y] - $axes_len);
|
||||
$dc->DrawLine(@$origin_px, @$y_end);
|
||||
foreach my $angle (-$arrow_angle, +$arrow_angle) {
|
||||
my $end = $y_end->clone;
|
||||
$end->translate(0, +$arrow_len);
|
||||
$end->rotate($angle, $y_end);
|
||||
$dc->DrawLine(@$y_end, @$end);
|
||||
}
|
||||
}
|
||||
|
||||
# draw origin
|
||||
{
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(0,0,0), 1, wxSOLID));
|
||||
$dc->SetBrush(Wx::Brush->new(Wx::Colour->new(0,0,0), wxSOLID));
|
||||
$dc->DrawCircle(@$origin_px, 3);
|
||||
|
||||
$dc->SetTextForeground(Wx::Colour->new(0,0,0));
|
||||
$dc->SetFont(Wx::Font->new(10, wxDEFAULT, wxNORMAL, wxNORMAL));
|
||||
$dc->DrawText("(0,0)", $origin_px->[X] + 1, $origin_px->[Y] + 2);
|
||||
}
|
||||
|
||||
# draw current position
|
||||
if (defined $self->pos) {
|
||||
my $pos_px = $self->to_pixels($self->pos);
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(200,0,0), 2, wxSOLID));
|
||||
$dc->SetBrush(Wx::Brush->new(Wx::Colour->new(200,0,0), wxTRANSPARENT));
|
||||
$dc->DrawCircle(@$pos_px, 5);
|
||||
|
||||
$dc->DrawLine($pos_px->[X]-15, $pos_px->[Y], $pos_px->[X]+15, $pos_px->[Y]);
|
||||
$dc->DrawLine($pos_px->[X], $pos_px->[Y]-15, $pos_px->[X], $pos_px->[Y]+15);
|
||||
}
|
||||
}
|
||||
|
||||
sub _mouse_event {
|
||||
my ($self, $event) = @_;
|
||||
|
||||
return if !$self->interactive;
|
||||
|
||||
my $pos = $event->GetPosition;
|
||||
my $point = $self->to_units([ $pos->x, $pos->y ]); #]]
|
||||
if ($event->LeftDown || $event->Dragging) {
|
||||
$self->on_move->($point) if $self->on_move;
|
||||
$self->Refresh;
|
||||
}
|
||||
}
|
||||
|
||||
# convert G-code coordinates into pixels
|
||||
sub to_pixels {
|
||||
my ($self, $point) = @_;
|
||||
|
||||
my $p = Slic3r::Pointf->new(@$point);
|
||||
$p->scale($self->_scale_factor);
|
||||
$p->translate(@{$self->_shift});
|
||||
return [$p->x, $self->GetSize->GetHeight - $p->y]; #]]
|
||||
}
|
||||
|
||||
# convert pixels into G-code coordinates
|
||||
sub to_units {
|
||||
my ($self, $point) = @_;
|
||||
|
||||
my $p = Slic3r::Pointf->new(
|
||||
$point->[X],
|
||||
$self->GetSize->GetHeight - $point->[Y],
|
||||
);
|
||||
$p->translate(@{$self->_shift->negative});
|
||||
$p->scale(1/$self->_scale_factor);
|
||||
return $p;
|
||||
}
|
||||
|
||||
sub set_pos {
|
||||
my ($self, $pos) = @_;
|
||||
|
||||
$self->pos($pos);
|
||||
$self->Refresh;
|
||||
}
|
||||
|
||||
1;
|
|
@ -42,9 +42,8 @@ package Slic3r::GUI::BedShapePanel;
|
|||
|
||||
use List::Util qw(min max sum first);
|
||||
use Slic3r::Geometry qw(PI X Y scale unscale scaled_epsilon deg2rad);
|
||||
use Slic3r::Geometry::Clipper qw(intersection_pl);
|
||||
use Wx qw(:font :id :misc :sizer :choicebook :filedialog :pen :brush wxTAB_TRAVERSAL);
|
||||
use Wx::Event qw(EVT_CLOSE EVT_CHOICEBOOK_PAGE_CHANGED EVT_BUTTON EVT_PAINT);
|
||||
use Wx::Event qw(EVT_CLOSE EVT_CHOICEBOOK_PAGE_CHANGED EVT_BUTTON);
|
||||
use base 'Wx::Panel';
|
||||
|
||||
use constant SHAPE_RECTANGULAR => 0;
|
||||
|
@ -113,10 +112,7 @@ sub new {
|
|||
});
|
||||
|
||||
# right pane with preview canvas
|
||||
my $canvas = $self->{canvas} = Wx::Panel->new($self, -1, wxDefaultPosition, [250,-1], wxTAB_TRAVERSAL);
|
||||
EVT_PAINT($canvas, sub {
|
||||
$self->_repaint_canvas;
|
||||
});
|
||||
my $canvas = $self->{canvas} = Slic3r::GUI::2DBed->new($self);
|
||||
|
||||
# main sizer
|
||||
my $top_sizer = Wx::BoxSizer->new(wxHORIZONTAL);
|
||||
|
@ -204,12 +200,12 @@ sub _update_shape {
|
|||
$y0 -= $dy;
|
||||
$y1 -= $dy;
|
||||
}
|
||||
$self->{bed_shape} = [
|
||||
$self->{canvas}->bed_shape([
|
||||
[$x0,$y0],
|
||||
[$x1,$y0],
|
||||
[$x1,$y1],
|
||||
[$x0,$y1],
|
||||
];
|
||||
]);
|
||||
} elsif ($page_idx == SHAPE_CIRCULAR) {
|
||||
my $diameter = $self->{optgroups}[SHAPE_CIRCULAR]->get_value('diameter');
|
||||
return if !$diameter;
|
||||
|
@ -220,9 +216,9 @@ sub _update_shape {
|
|||
map [ $r * cos $_, $r * sin $_ ],
|
||||
map { $twopi/$edges*$_ } 1..$edges
|
||||
);
|
||||
$self->{bed_shape} = [
|
||||
$self->{canvas}->bed_shape([
|
||||
map [ unscale($_->x), unscale($_->y) ], @$polygon #))
|
||||
];
|
||||
]);
|
||||
}
|
||||
|
||||
$self->{on_change}->();
|
||||
|
@ -234,129 +230,6 @@ sub _update_preview {
|
|||
$self->{canvas}->Refresh if $self->{canvas};
|
||||
}
|
||||
|
||||
sub _repaint_canvas {
|
||||
my ($self) = @_;
|
||||
|
||||
my $canvas = $self->{canvas};
|
||||
my $dc = Wx::PaintDC->new($canvas);
|
||||
my ($cw, $ch) = $canvas->GetSizeWH;
|
||||
return if $cw == 0; # when canvas is not rendered yet, size is 0,0
|
||||
|
||||
# turn $cw and $ch from sizes to max coordinates
|
||||
$cw--;
|
||||
$ch--;
|
||||
|
||||
my $cbb = Slic3r::Geometry::BoundingBoxf->new_from_points([
|
||||
Slic3r::Pointf->new(0, 0),
|
||||
Slic3r::Pointf->new($cw, $ch),
|
||||
]);
|
||||
|
||||
# leave space for origin point
|
||||
$cbb->set_x_min($cbb->x_min + 2);
|
||||
$cbb->set_y_max($cbb->y_max - 2);
|
||||
|
||||
# leave space for origin label
|
||||
$cbb->set_y_max($cbb->y_max - 10);
|
||||
|
||||
# read new size
|
||||
($cw, $ch) = @{$cbb->size};
|
||||
my $ccenter = $cbb->center;
|
||||
|
||||
# get bounding box of bed shape in G-code coordinates
|
||||
my $bed_shape = $self->{bed_shape};
|
||||
my $bed_polygon = Slic3r::Polygon->new_scale(@$bed_shape);
|
||||
my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($bed_shape);
|
||||
$bb->merge_point(Slic3r::Pointf->new(0,0)); # origin needs to be in the visible area
|
||||
my ($bw, $bh) = @{$bb->size};
|
||||
my $bcenter = $bb->center;
|
||||
|
||||
# calculate the scaling factor for fitting bed shape in canvas area
|
||||
my $sfactor = min($cw/$bw, $ch/$bh);
|
||||
my $shift = [
|
||||
$ccenter->x - $bcenter->x * $sfactor,
|
||||
$ccenter->y - $bcenter->y * $sfactor, #-
|
||||
];
|
||||
|
||||
# prepare function to convert G-code coordinates into pixels
|
||||
my $to_pixel = sub {
|
||||
my ($point) = @_;
|
||||
|
||||
my $p = Slic3r::Pointf->new(@$point);
|
||||
$p->scale($sfactor);
|
||||
$p->translate(@$shift);
|
||||
return [ $p->x + $cbb->x_min, $ch-$p->y + $cbb->y_min ]; #++
|
||||
};
|
||||
|
||||
# draw bed fill
|
||||
{
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(0,0,0), 1, wxSOLID));
|
||||
$dc->SetBrush(Wx::Brush->new(Wx::Colour->new(255,255,255), wxSOLID));
|
||||
$dc->DrawPolygon([ map $to_pixel->($_), @$bed_shape ], 0, 0);
|
||||
}
|
||||
|
||||
# draw grid
|
||||
{
|
||||
my $step = 10; # 1cm grid
|
||||
my @polylines = ();
|
||||
for (my $x = $bb->x_min - ($bb->x_min % $step) + $step; $x < $bb->x_max; $x += $step) {
|
||||
push @polylines, Slic3r::Polyline->new_scale([$x, $bb->y_min], [$x, $bb->y_max]);
|
||||
}
|
||||
for (my $y = $bb->y_min - ($bb->y_min % $step) + $step; $y < $bb->y_max; $y += $step) {
|
||||
push @polylines, Slic3r::Polyline->new_scale([$bb->x_min, $y], [$bb->x_max, $y]);
|
||||
}
|
||||
@polylines = @{intersection_pl(\@polylines, [$bed_polygon])};
|
||||
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(230,230,230), 1, wxSOLID));
|
||||
$dc->DrawLine(map @{$to_pixel->([map unscale($_), @$_])}, @$_[0,-1]) for @polylines;
|
||||
}
|
||||
|
||||
# draw bed contour
|
||||
{
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(0,0,0), 1, wxSOLID));
|
||||
$dc->SetBrush(Wx::Brush->new(Wx::Colour->new(255,255,255), wxTRANSPARENT));
|
||||
$dc->DrawPolygon([ map $to_pixel->($_), @$bed_shape ], 0, 0);
|
||||
}
|
||||
|
||||
my $origin_px = $to_pixel->(Slic3r::Pointf->new(0,0));
|
||||
|
||||
# draw axes
|
||||
{
|
||||
my $axes_len = 50;
|
||||
my $arrow_len = 6;
|
||||
my $arrow_angle = deg2rad(45);
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(255,0,0), 2, wxSOLID)); # red
|
||||
my $x_end = Slic3r::Pointf->new($origin_px->[X] + $axes_len, $origin_px->[Y]);
|
||||
$dc->DrawLine(@$origin_px, @$x_end);
|
||||
foreach my $angle (-$arrow_angle, +$arrow_angle) {
|
||||
my $end = $x_end->clone;
|
||||
$end->translate(-$arrow_len, 0);
|
||||
$end->rotate($angle, $x_end);
|
||||
$dc->DrawLine(@$x_end, @$end);
|
||||
}
|
||||
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(0,255,0), 2, wxSOLID)); # green
|
||||
my $y_end = Slic3r::Pointf->new($origin_px->[X], $origin_px->[Y] - $axes_len);
|
||||
$dc->DrawLine(@$origin_px, @$y_end);
|
||||
foreach my $angle (-$arrow_angle, +$arrow_angle) {
|
||||
my $end = $y_end->clone;
|
||||
$end->translate(0, +$arrow_len);
|
||||
$end->rotate($angle, $y_end);
|
||||
$dc->DrawLine(@$y_end, @$end);
|
||||
}
|
||||
}
|
||||
|
||||
# draw origin
|
||||
{
|
||||
$dc->SetPen(Wx::Pen->new(Wx::Colour->new(0,0,0), 1, wxSOLID));
|
||||
$dc->SetBrush(Wx::Brush->new(Wx::Colour->new(0,0,0), wxSOLID));
|
||||
$dc->DrawCircle(@$origin_px, 3);
|
||||
|
||||
$dc->SetTextForeground(Wx::Colour->new(0,0,0));
|
||||
$dc->SetFont(Wx::Font->new(10, wxDEFAULT, wxNORMAL, wxNORMAL));
|
||||
$dc->DrawText("(0,0)", $origin_px->[X] + 1, $origin_px->[Y] + 2);
|
||||
}
|
||||
}
|
||||
|
||||
sub _init_shape_options_page {
|
||||
my ($self, $title) = @_;
|
||||
|
||||
|
@ -403,12 +276,12 @@ sub _load_stl {
|
|||
}
|
||||
|
||||
my $polygon = $expolygons->[0]->contour;
|
||||
$self->{bed_shape} = [ map [ unscale($_->x), unscale($_->y) ], @$polygon ]; #))
|
||||
$self->{canvas}->bed_shape([ map [ unscale($_->x), unscale($_->y) ], @$polygon ]); #))
|
||||
}
|
||||
|
||||
sub GetValue {
|
||||
my ($self) = @_;
|
||||
return $self->{bed_shape};
|
||||
return $self->{canvas}->bed_shape;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
193
lib/Slic3r/GUI/Controller.pm
Normal file
|
@ -0,0 +1,193 @@
|
|||
package Slic3r::GUI::Controller;
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
|
||||
use Wx qw(wxTheApp :frame :id :misc :sizer :bitmap :button :icon :dialog);
|
||||
use Wx::Event qw(EVT_CLOSE EVT_LEFT_DOWN EVT_MENU);
|
||||
use base qw(Wx::ScrolledWindow Class::Accessor);
|
||||
|
||||
__PACKAGE__->mk_accessors(qw(_selected_printer_preset));
|
||||
|
||||
our @ConfigOptions = qw(bed_shape serial_port serial_speed);
|
||||
|
||||
sub new {
|
||||
my ($class, $parent) = @_;
|
||||
my $self = $class->SUPER::new($parent, -1, wxDefaultPosition, [600,350]);
|
||||
|
||||
$self->SetScrollbars(0, 1, 0, 1);
|
||||
$self->{sizer} = my $sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
|
||||
# warning to show when there are no printers configured
|
||||
{
|
||||
$self->{text_no_printers} = Wx::StaticText->new($self, -1,
|
||||
"No printers were configured for USB/serial control.",
|
||||
wxDefaultPosition, wxDefaultSize);
|
||||
$self->{sizer}->Add($self->{text_no_printers}, 0, wxTOP | wxLEFT, 30);
|
||||
}
|
||||
|
||||
# button for adding new printer panels
|
||||
{
|
||||
my $btn = $self->{btn_add} = Wx::BitmapButton->new($self, -1, Wx::Bitmap->new("$Slic3r::var/add.png", wxBITMAP_TYPE_PNG),
|
||||
wxDefaultPosition, wxDefaultSize, Wx::wxBORDER_NONE);
|
||||
$btn->SetToolTipString("Add printer…")
|
||||
if $btn->can('SetToolTipString');
|
||||
|
||||
EVT_LEFT_DOWN($btn, sub {
|
||||
my $menu = Wx::Menu->new;
|
||||
my %presets = wxTheApp->presets('printer');
|
||||
|
||||
# remove printers that already exist
|
||||
my @panels = $self->print_panels;
|
||||
delete $presets{$_} for map $_->printer_name, @panels;
|
||||
|
||||
foreach my $preset_name (sort keys %presets) {
|
||||
my $config = Slic3r::Config->load($presets{$preset_name});
|
||||
next if !$config->serial_port;
|
||||
|
||||
my $id = &Wx::NewId();
|
||||
$menu->Append($id, $preset_name);
|
||||
EVT_MENU($menu, $id, sub {
|
||||
$self->add_printer($preset_name, $config);
|
||||
});
|
||||
}
|
||||
$self->PopupMenu($menu, $btn->GetPosition);
|
||||
$menu->Destroy;
|
||||
});
|
||||
$self->{sizer}->Add($btn, 0, wxTOP | wxLEFT, 10);
|
||||
}
|
||||
|
||||
$self->SetSizer($sizer);
|
||||
$self->SetMinSize($self->GetSize);
|
||||
#$sizer->SetSizeHints($self);
|
||||
|
||||
EVT_CLOSE($self, sub {
|
||||
my (undef, $event) = @_;
|
||||
|
||||
if ($event->CanVeto) {
|
||||
foreach my $panel ($self->print_panels) {
|
||||
if ($panel->printing) {
|
||||
my $confirm = Wx::MessageDialog->new(
|
||||
$self, "Printer '" . $panel->printer_name . "' is printing.\n\nDo you want to stop printing?",
|
||||
'Unfinished Print', wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION,
|
||||
);
|
||||
if ($confirm->ShowModal == wxID_NO) {
|
||||
$event->Veto;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach my $panel ($self->print_panels) {
|
||||
$panel->disconnect;
|
||||
}
|
||||
|
||||
$event->Skip;
|
||||
});
|
||||
|
||||
$self->Layout;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub OnActivate {
|
||||
my ($self) = @_;
|
||||
|
||||
# get all available presets
|
||||
my %presets = ();
|
||||
{
|
||||
my %all = wxTheApp->presets('printer');
|
||||
my %configs = map { my $name = $_; $name => Slic3r::Config->load($all{$name}) } keys %all;
|
||||
%presets = map { $_ => $configs{$_} } grep $configs{$_}->serial_port, keys %all;
|
||||
}
|
||||
|
||||
# decide which ones we want to keep
|
||||
my %active = ();
|
||||
|
||||
# keep the ones that are currently connected or have jobs in queue
|
||||
$active{$_} = 1 for map $_->printer_name,
|
||||
grep { $_->is_connected || @{$_->jobs} > 0 }
|
||||
$self->print_panels;
|
||||
|
||||
if (%presets) {
|
||||
# if there are no active panels, use sensible defaults
|
||||
if (!%active && keys %presets <= 2) {
|
||||
# if only one or two presets exist, load them
|
||||
$active{$_} = 1 for keys %presets;
|
||||
}
|
||||
if (!%active) {
|
||||
# enable printers whose port is available
|
||||
my %ports = map { $_ => 1 } wxTheApp->scan_serial_ports;
|
||||
$active{$_} = 1
|
||||
for grep exists $ports{$presets{$_}->serial_port}, keys %presets;
|
||||
}
|
||||
if (!%active && $self->_selected_printer_preset) {
|
||||
# enable currently selected printer if it is configured
|
||||
$active{$self->_selected_printer_preset} = 1
|
||||
if $presets{$self->_selected_printer_preset};
|
||||
}
|
||||
}
|
||||
|
||||
# apply changes
|
||||
for my $panel ($self->print_panels) {
|
||||
next if $active{$panel->printer_name};
|
||||
|
||||
$self->{sizer}->DetachWindow($panel);
|
||||
$panel->Destroy;
|
||||
}
|
||||
$self->add_printer($_, $presets{$_}) for sort keys %active;
|
||||
|
||||
# show/hide the warning about no printers
|
||||
$self->{text_no_printers}->Show(!%presets);
|
||||
|
||||
# show/hide the Add button
|
||||
$self->{btn_add}->Show(keys %presets != keys %active);
|
||||
|
||||
$self->Layout;
|
||||
|
||||
# we need this in order to trigger the OnSize event of wxScrolledWindow which
|
||||
# recalculates the virtual size
|
||||
Wx::GetTopLevelParent($self)->SendSizeEvent;
|
||||
}
|
||||
|
||||
sub add_printer {
|
||||
my ($self, $printer_name, $config) = @_;
|
||||
|
||||
# check that printer doesn't exist already
|
||||
foreach my $panel ($self->print_panels) {
|
||||
if ($panel->printer_name eq $printer_name) {
|
||||
return $panel;
|
||||
}
|
||||
}
|
||||
|
||||
my $printer_panel = Slic3r::GUI::Controller::PrinterPanel->new($self, $printer_name, $config);
|
||||
$self->{sizer}->Prepend($printer_panel, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 10);
|
||||
$self->Layout;
|
||||
|
||||
return $printer_panel;
|
||||
}
|
||||
|
||||
sub print_panels {
|
||||
my ($self) = @_;
|
||||
return grep $_->isa('Slic3r::GUI::Controller::PrinterPanel'),
|
||||
map $_->GetWindow, $self->{sizer}->GetChildren;
|
||||
}
|
||||
|
||||
sub update_presets {
|
||||
my $self = shift;
|
||||
my ($group, $presets, $selected, $is_dirty) = @_;
|
||||
|
||||
# update configs of currently loaded print panels
|
||||
foreach my $panel ($self->print_panels) {
|
||||
foreach my $preset (@$presets) {
|
||||
if ($panel->printer_name eq $preset->name) {
|
||||
my $config = $preset->config(\@ConfigOptions);
|
||||
$panel->config->apply($config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$self->_selected_printer_preset($presets->[$selected]->name);
|
||||
}
|
||||
|
||||
1;
|
148
lib/Slic3r/GUI/Controller/ManualControlDialog.pm
Normal file
|
@ -0,0 +1,148 @@
|
|||
package Slic3r::GUI::Controller::ManualControlDialog;
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
|
||||
use Slic3r::Geometry qw(PI X Y unscale);
|
||||
use Wx qw(:dialog :id :misc :sizer :choicebook :button :bitmap
|
||||
wxBORDER_NONE wxTAB_TRAVERSAL);
|
||||
use Wx::Event qw(EVT_CLOSE EVT_BUTTON);
|
||||
use base qw(Wx::Dialog Class::Accessor);
|
||||
|
||||
__PACKAGE__->mk_accessors(qw(sender));
|
||||
|
||||
use constant TRAVEL_SPEED => 130*60; # TODO: make customizable?
|
||||
|
||||
sub new {
|
||||
my ($class, $printer_panel) = @_;
|
||||
|
||||
my $self = $class->SUPER::new($printer_panel, -1, "Manual Control", wxDefaultPosition,
|
||||
[430,380], wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
||||
$self->sender($printer_panel->sender);
|
||||
|
||||
my $bed_sizer = Wx::FlexGridSizer->new(2, 3, 1, 1);
|
||||
$bed_sizer->AddGrowableCol(1, 1);
|
||||
$bed_sizer->AddGrowableRow(0, 1);
|
||||
|
||||
my $move_button = sub {
|
||||
my ($sizer, $label, $icon, $bold, $pos, $handler) = @_;
|
||||
|
||||
my $btn = Wx::Button->new($self, -1, $label, wxDefaultPosition, wxDefaultSize,
|
||||
wxBU_LEFT | wxBU_EXACTFIT);
|
||||
$btn->SetFont($bold ? $Slic3r::GUI::small_bold_font : $Slic3r::GUI::small_font);
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/$icon.png", wxBITMAP_TYPE_PNG));
|
||||
$btn->SetBitmapPosition($pos);
|
||||
}
|
||||
EVT_BUTTON($self, $btn, $handler);
|
||||
$sizer->Add($btn, 1, wxEXPAND | wxALL, 0);
|
||||
};
|
||||
|
||||
# Y buttons
|
||||
{
|
||||
my $sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
for my $d (qw(+10 +1 +0.1)) {
|
||||
$move_button->($sizer, $d, 'arrow_up', 0, wxLEFT, sub { $self->rel_move('Y', $d) });
|
||||
}
|
||||
$move_button->($sizer, 'Y', 'house', 1, wxLEFT, sub { $self->home('Y') });
|
||||
for my $d (qw(-0.1 -1 -10)) {
|
||||
$move_button->($sizer, $d, 'arrow_down', 0, wxLEFT, sub { $self->rel_move('Y', $d) });
|
||||
};
|
||||
$bed_sizer->Add($sizer, 1, wxEXPAND, 0);
|
||||
}
|
||||
|
||||
# Bed canvas
|
||||
{
|
||||
my $bed_shape = $printer_panel->config->bed_shape;
|
||||
$self->{canvas} = my $canvas = Slic3r::GUI::2DBed->new($self, $bed_shape);
|
||||
$canvas->interactive(1);
|
||||
$canvas->on_move(sub {
|
||||
my ($pos) = @_;
|
||||
|
||||
# delete any pending commands to get a smoother movement
|
||||
$self->sender->purge_queue(1);
|
||||
$self->abs_xy_move($pos);
|
||||
});
|
||||
$bed_sizer->Add($canvas, 0, wxEXPAND | wxRIGHT, 3);
|
||||
}
|
||||
|
||||
# Z buttons
|
||||
{
|
||||
my $sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
for my $d (qw(+10 +1 +0.1)) {
|
||||
$move_button->($sizer, $d, 'arrow_up', 0, wxLEFT, sub { $self->rel_move('Z', $d) });
|
||||
}
|
||||
$move_button->($sizer, 'Z', 'house', 1, wxLEFT, sub { $self->home('Z') });
|
||||
for my $d (qw(-0.1 -1 -10)) {
|
||||
$move_button->($sizer, $d, 'arrow_down', 0, wxLEFT, sub { $self->rel_move('Z', $d) });
|
||||
};
|
||||
$bed_sizer->Add($sizer, 1, wxEXPAND, 0);
|
||||
}
|
||||
|
||||
$bed_sizer->AddSpacer(0);
|
||||
|
||||
# X buttons
|
||||
{
|
||||
my $sizer = Wx::BoxSizer->new(wxHORIZONTAL);
|
||||
for my $d (qw(-10 -1 -0.1)) {
|
||||
$move_button->($sizer, $d, 'arrow_left', 0, wxTOP, sub { $self->rel_move('X', $d) });
|
||||
}
|
||||
$move_button->($sizer, 'X', 'house', 1, wxTOP, sub { $self->home('X') });
|
||||
for my $d (qw(+0.1 +1 +10)) {
|
||||
$move_button->($sizer, $d, 'arrow_right', 0, wxTOP, sub { $self->rel_move('X', $d) });
|
||||
}
|
||||
$bed_sizer->Add($sizer, 1, wxEXPAND, 0);
|
||||
}
|
||||
|
||||
my $main_sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
$main_sizer->Add($bed_sizer, 1, wxEXPAND | wxALL, 10);
|
||||
$main_sizer->Add($self->CreateButtonSizer(wxCLOSE), 0, wxEXPAND);
|
||||
EVT_BUTTON($self, wxID_CLOSE, sub { $self->Close });
|
||||
|
||||
$self->SetSizer($main_sizer);
|
||||
$self->SetMinSize($self->GetSize);
|
||||
#$main_sizer->SetSizeHints($self);
|
||||
$self->Layout;
|
||||
|
||||
# needed to actually free memory
|
||||
EVT_CLOSE($self, sub {
|
||||
$self->EndModal(wxID_OK);
|
||||
$self->Destroy;
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub abs_xy_move {
|
||||
my ($self, $pos) = @_;
|
||||
|
||||
$self->sender->send("G90", 1); # set absolute positioning
|
||||
$self->sender->send(sprintf("G1 X%.1f Y%.1f F%d", @$pos, TRAVEL_SPEED), 1);
|
||||
$self->{canvas}->set_pos($pos);
|
||||
}
|
||||
|
||||
sub rel_move {
|
||||
my ($self, $axis, $distance) = @_;
|
||||
|
||||
$self->sender->send("G91", 1); # set relative positioning
|
||||
$self->sender->send(sprintf("G1 %s%.1f F%d", $axis, $distance, TRAVEL_SPEED), 1);
|
||||
$self->sender->send("G90", 1); # set absolute positioning
|
||||
|
||||
if (my $pos = $self->{canvas}->pos) {
|
||||
if ($axis eq 'X') {
|
||||
$pos->translate($distance, 0);
|
||||
} elsif ($axis eq 'Y') {
|
||||
$pos->translate(0, $distance);
|
||||
}
|
||||
$self->{canvas}->set_pos($pos);
|
||||
}
|
||||
}
|
||||
|
||||
sub home {
|
||||
my ($self, $axis) = @_;
|
||||
|
||||
$self->sender->send(sprintf("G28 %s", $axis), 1);
|
||||
$self->{canvas}->set_pos(undef);
|
||||
}
|
||||
|
||||
1;
|
722
lib/Slic3r/GUI/Controller/PrinterPanel.pm
Normal file
|
@ -0,0 +1,722 @@
|
|||
package Slic3r::GUI::Controller::PrinterPanel;
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
|
||||
use Wx qw(wxTheApp :panel :id :misc :sizer :button :bitmap :window :gauge :timer
|
||||
:textctrl :font :systemsettings);
|
||||
use Wx::Event qw(EVT_BUTTON EVT_MOUSEWHEEL EVT_TIMER EVT_SCROLLWIN);
|
||||
use base qw(Wx::Panel Class::Accessor);
|
||||
|
||||
__PACKAGE__->mk_accessors(qw(printer_name config sender jobs
|
||||
printing status_timer temp_timer));
|
||||
|
||||
use constant CONNECTION_TIMEOUT => 3; # seconds
|
||||
use constant STATUS_TIMER_INTERVAL => 1000; # milliseconds
|
||||
use constant TEMP_TIMER_INTERVAL => 5000; # milliseconds
|
||||
|
||||
sub new {
|
||||
my ($class, $parent, $printer_name, $config) = @_;
|
||||
my $self = $class->SUPER::new($parent, -1, wxDefaultPosition, [500, 250]);
|
||||
|
||||
$self->printer_name($printer_name || 'Printer');
|
||||
$self->config($config);
|
||||
$self->jobs([]);
|
||||
|
||||
# set up the timer that polls for updates
|
||||
{
|
||||
my $timer_id = &Wx::NewId();
|
||||
$self->status_timer(Wx::Timer->new($self, $timer_id));
|
||||
EVT_TIMER($self, $timer_id, sub {
|
||||
my ($self, $event) = @_;
|
||||
|
||||
if ($self->printing) {
|
||||
my $queue_size = $self->sender->queue_size;
|
||||
$self->{gauge}->SetValue($self->{gauge}->GetRange - $queue_size);
|
||||
if ($queue_size == 0) {
|
||||
$self->print_completed;
|
||||
}
|
||||
}
|
||||
$self->{log_textctrl}->AppendText("$_\n") for @{$self->sender->purge_log};
|
||||
{
|
||||
my $temp = $self->sender->getT;
|
||||
if ($temp eq '') {
|
||||
$self->{temp_panel}->Hide;
|
||||
} else {
|
||||
if (!$self->{temp_panel}->IsShown) {
|
||||
$self->{temp_panel}->Show;
|
||||
$self->Layout;
|
||||
}
|
||||
$self->{temp_text}->SetLabel($temp . "°C");
|
||||
|
||||
$temp = $self->sender->getB;
|
||||
if ($temp eq '') {
|
||||
$self->{bed_temp_text}->SetLabel('n.a.');
|
||||
} else {
|
||||
$self->{bed_temp_text}->SetLabel($temp . "°C");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
# set up the timer that sends temperature requests
|
||||
# (responses are handled by status_timer)
|
||||
{
|
||||
my $timer_id = &Wx::NewId();
|
||||
$self->temp_timer(Wx::Timer->new($self, $timer_id));
|
||||
EVT_TIMER($self, $timer_id, sub {
|
||||
my ($self, $event) = @_;
|
||||
$self->sender->send("M105", 1); # send it through priority queue
|
||||
});
|
||||
}
|
||||
|
||||
my $box = Wx::StaticBox->new($self, -1, "");
|
||||
my $sizer = Wx::StaticBoxSizer->new($box, wxHORIZONTAL);
|
||||
my $left_sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
|
||||
# printer name
|
||||
{
|
||||
my $text = Wx::StaticText->new($box, -1, $self->printer_name, wxDefaultPosition, [220,-1]);
|
||||
my $font = $text->GetFont;
|
||||
$font->SetPointSize(20);
|
||||
$text->SetFont($font);
|
||||
$left_sizer->Add($text, 0, wxEXPAND, 0);
|
||||
}
|
||||
|
||||
# connection info
|
||||
{
|
||||
my $conn_sizer = Wx::FlexGridSizer->new(2, 2, 1, 0);
|
||||
$conn_sizer->SetFlexibleDirection(wxHORIZONTAL);
|
||||
$conn_sizer->AddGrowableCol(1, 1);
|
||||
$left_sizer->Add($conn_sizer, 0, wxEXPAND | wxTOP, 5);
|
||||
{
|
||||
my $text = Wx::StaticText->new($box, -1, "Port:", wxDefaultPosition, wxDefaultSize);
|
||||
$text->SetFont($Slic3r::GUI::small_font);
|
||||
$conn_sizer->Add($text, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 5);
|
||||
}
|
||||
my $serial_port_sizer = Wx::BoxSizer->new(wxHORIZONTAL);
|
||||
{
|
||||
$self->{serial_port_combobox} = Wx::ComboBox->new($box, -1, $config->serial_port, wxDefaultPosition, wxDefaultSize, []);
|
||||
$self->{serial_port_combobox}->SetFont($Slic3r::GUI::small_font);
|
||||
$self->update_serial_ports;
|
||||
$serial_port_sizer->Add($self->{serial_port_combobox}, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 1);
|
||||
}
|
||||
{
|
||||
$self->{btn_rescan_serial} = my $btn = Wx::BitmapButton->new($box, -1, Wx::Bitmap->new("$Slic3r::var/arrow_rotate_clockwise.png", wxBITMAP_TYPE_PNG),
|
||||
wxDefaultPosition, wxDefaultSize, &Wx::wxBORDER_NONE);
|
||||
$btn->SetToolTipString("Rescan serial ports")
|
||||
if $btn->can('SetToolTipString');
|
||||
$serial_port_sizer->Add($btn, 0, wxALIGN_CENTER_VERTICAL, 0);
|
||||
EVT_BUTTON($self, $btn, sub { $self->update_serial_ports });
|
||||
}
|
||||
$conn_sizer->Add($serial_port_sizer, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 5);
|
||||
|
||||
{
|
||||
my $text = Wx::StaticText->new($box, -1, "Speed:", wxDefaultPosition, wxDefaultSize);
|
||||
$text->SetFont($Slic3r::GUI::small_font);
|
||||
$conn_sizer->Add($text, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 5);
|
||||
}
|
||||
my $serial_speed_sizer = Wx::BoxSizer->new(wxHORIZONTAL);
|
||||
{
|
||||
$self->{serial_speed_combobox} = Wx::ComboBox->new($box, -1, $config->serial_speed, wxDefaultPosition, wxDefaultSize,
|
||||
["115200", "250000"]);
|
||||
$self->{serial_speed_combobox}->SetFont($Slic3r::GUI::small_font);
|
||||
$serial_speed_sizer->Add($self->{serial_speed_combobox}, 0, wxALIGN_CENTER_VERTICAL, 0);
|
||||
}
|
||||
{
|
||||
$self->{btn_disconnect} = my $btn = Wx::Button->new($box, -1, "Disconnect", wxDefaultPosition, wxDefaultSize);
|
||||
$btn->SetFont($Slic3r::GUI::small_font);
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/delete.png", wxBITMAP_TYPE_PNG));
|
||||
}
|
||||
$serial_speed_sizer->Add($btn, 0, wxLEFT, 5);
|
||||
EVT_BUTTON($self, $btn, \&disconnect);
|
||||
}
|
||||
$conn_sizer->Add($serial_speed_sizer, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 5);
|
||||
}
|
||||
|
||||
# buttons
|
||||
{
|
||||
$self->{btn_connect} = my $btn = Wx::Button->new($box, -1, "Connect to printer", wxDefaultPosition, [-1, 40]);
|
||||
my $font = $btn->GetFont;
|
||||
$font->SetPointSize($font->GetPointSize + 2);
|
||||
$btn->SetFont($font);
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/arrow_up.png", wxBITMAP_TYPE_PNG));
|
||||
}
|
||||
$left_sizer->Add($btn, 0, wxTOP, 15);
|
||||
EVT_BUTTON($self, $btn, \&connect);
|
||||
}
|
||||
|
||||
# print progress bar
|
||||
{
|
||||
my $gauge = $self->{gauge} = Wx::Gauge->new($self, wxGA_HORIZONTAL, 100, wxDefaultPosition, wxDefaultSize);
|
||||
$left_sizer->Add($self->{gauge}, 0, wxEXPAND | wxTOP, 15);
|
||||
$gauge->Hide;
|
||||
}
|
||||
|
||||
# status
|
||||
$self->{status_text} = Wx::StaticText->new($box, -1, "", wxDefaultPosition, [200,-1]);
|
||||
$left_sizer->Add($self->{status_text}, 1, wxEXPAND | wxTOP, 15);
|
||||
|
||||
# manual control
|
||||
{
|
||||
$self->{btn_manual_control} = my $btn = Wx::Button->new($box, -1, "Manual control", wxDefaultPosition, wxDefaultSize);
|
||||
$btn->SetFont($Slic3r::GUI::small_font);
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/cog.png", wxBITMAP_TYPE_PNG));
|
||||
}
|
||||
$btn->Hide;
|
||||
$left_sizer->Add($btn, 0, wxTOP, 15);
|
||||
EVT_BUTTON($self, $btn, sub {
|
||||
my $dlg = Slic3r::GUI::Controller::ManualControlDialog->new($self);
|
||||
$dlg->ShowModal;
|
||||
});
|
||||
}
|
||||
|
||||
# temperature
|
||||
{
|
||||
my $temp_panel = $self->{temp_panel} = Wx::Panel->new($box, -1);
|
||||
my $temp_sizer = Wx::BoxSizer->new(wxHORIZONTAL);
|
||||
|
||||
my $temp_font = Wx::Font->new($Slic3r::GUI::small_font);
|
||||
$temp_font->SetWeight(wxFONTWEIGHT_BOLD);
|
||||
{
|
||||
my $text = Wx::StaticText->new($temp_panel, -1, "Temperature:", wxDefaultPosition, wxDefaultSize);
|
||||
$text->SetFont($Slic3r::GUI::small_font);
|
||||
$temp_sizer->Add($text, 0, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
$self->{temp_text} = Wx::StaticText->new($temp_panel, -1, "", wxDefaultPosition, wxDefaultSize);
|
||||
$self->{temp_text}->SetFont($temp_font);
|
||||
$self->{temp_text}->SetForegroundColour(Wx::wxRED);
|
||||
$temp_sizer->Add($self->{temp_text}, 1, wxALIGN_CENTER_VERTICAL);
|
||||
}
|
||||
{
|
||||
my $text = Wx::StaticText->new($temp_panel, -1, "Bed:", wxDefaultPosition, wxDefaultSize);
|
||||
$text->SetFont($Slic3r::GUI::small_font);
|
||||
$temp_sizer->Add($text, 0, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
$self->{bed_temp_text} = Wx::StaticText->new($temp_panel, -1, "", wxDefaultPosition, wxDefaultSize);
|
||||
$self->{bed_temp_text}->SetFont($temp_font);
|
||||
$self->{bed_temp_text}->SetForegroundColour(Wx::wxRED);
|
||||
$temp_sizer->Add($self->{bed_temp_text}, 1, wxALIGN_CENTER_VERTICAL);
|
||||
}
|
||||
$temp_panel->SetSizer($temp_sizer);
|
||||
$temp_panel->Hide;
|
||||
$left_sizer->Add($temp_panel, 0, wxEXPAND | wxTOP | wxBOTTOM, 4);
|
||||
}
|
||||
|
||||
# print jobs panel
|
||||
$self->{print_jobs_sizer} = my $print_jobs_sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
{
|
||||
my $text = Wx::StaticText->new($box, -1, "Queue:", wxDefaultPosition, wxDefaultSize);
|
||||
$text->SetFont($Slic3r::GUI::small_font);
|
||||
$print_jobs_sizer->Add($text, 0, wxEXPAND, 0);
|
||||
|
||||
$self->{jobs_panel} = Wx::ScrolledWindow->new($box, -1, wxDefaultPosition, wxDefaultSize,
|
||||
wxVSCROLL | wxBORDER_NONE);
|
||||
$self->{jobs_panel}->SetScrollbars(0, 1, 0, 1);
|
||||
$self->{jobs_panel_sizer} = Wx::BoxSizer->new(wxVERTICAL);
|
||||
$self->{jobs_panel}->SetSizer($self->{jobs_panel_sizer});
|
||||
$print_jobs_sizer->Add($self->{jobs_panel}, 1, wxEXPAND, 0);
|
||||
|
||||
# TODO: fix this. We're trying to pass the scroll event to the parent but it
|
||||
# doesn't work.
|
||||
EVT_SCROLLWIN($self->{jobs_panel}, sub {
|
||||
my ($panel, $event) = @_;
|
||||
|
||||
my $controller = $self->GetParent;
|
||||
my $new_event = Wx::ScrollWinEvent->new(
|
||||
$event->GetEventType,
|
||||
$event->GetPosition,
|
||||
$event->GetOrientation,
|
||||
);
|
||||
$controller->ProcessEvent($new_event);
|
||||
}) if 0;
|
||||
}
|
||||
|
||||
my $log_sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
{
|
||||
my $text = Wx::StaticText->new($box, -1, "Log:", wxDefaultPosition, wxDefaultSize);
|
||||
$text->SetFont($Slic3r::GUI::small_font);
|
||||
$log_sizer->Add($text, 0, wxEXPAND, 0);
|
||||
|
||||
my $log = $self->{log_textctrl} = Wx::TextCtrl->new($box, -1, "", wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE | wxBORDER_NONE);
|
||||
$log->SetBackgroundColour($box->GetBackgroundColour);
|
||||
$log->SetFont($Slic3r::GUI::small_font);
|
||||
$log->SetEditable(0);
|
||||
$log_sizer->Add($self->{log_textctrl}, 1, wxEXPAND, 0);
|
||||
}
|
||||
|
||||
$sizer->Add($left_sizer, 0, wxEXPAND | wxALL, 0);
|
||||
$sizer->Add($print_jobs_sizer, 2, wxEXPAND | wxALL, 0);
|
||||
$sizer->Add($log_sizer, 1, wxEXPAND | wxLEFT, 15);
|
||||
|
||||
$self->SetSizer($sizer);
|
||||
$self->SetMinSize($self->GetSize);
|
||||
|
||||
$self->_update_connection_controls;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub is_connected {
|
||||
my ($self) = @_;
|
||||
return $self->sender && $self->sender->is_connected;
|
||||
}
|
||||
|
||||
sub _update_connection_controls {
|
||||
my ($self) = @_;
|
||||
|
||||
$self->{btn_connect}->Show;
|
||||
$self->{btn_disconnect}->Hide;
|
||||
$self->{serial_port_combobox}->Enable;
|
||||
$self->{serial_speed_combobox}->Enable;
|
||||
$self->{btn_rescan_serial}->Enable;
|
||||
$self->{btn_manual_control}->Hide;
|
||||
$self->{btn_manual_control}->Disable;
|
||||
|
||||
if ($self->is_connected) {
|
||||
$self->{btn_connect}->Hide;
|
||||
$self->{btn_manual_control}->Show;
|
||||
if (!$self->printing || $self->printing->paused) {
|
||||
$self->{btn_disconnect}->Show;
|
||||
$self->{btn_manual_control}->Enable;
|
||||
}
|
||||
$self->{serial_port_combobox}->Disable;
|
||||
$self->{serial_speed_combobox}->Disable;
|
||||
$self->{btn_rescan_serial}->Disable;
|
||||
}
|
||||
|
||||
$self->Layout;
|
||||
}
|
||||
|
||||
sub set_status {
|
||||
my ($self, $status) = @_;
|
||||
$self->{status_text}->SetLabel($status);
|
||||
$self->{status_text}->Wrap($self->{status_text}->GetSize->GetWidth);
|
||||
$self->{status_text}->Refresh;
|
||||
$self->Layout;
|
||||
}
|
||||
|
||||
sub connect {
|
||||
my ($self) = @_;
|
||||
|
||||
return if $self->is_connected;
|
||||
|
||||
$self->set_status("Connecting...");
|
||||
$self->sender(Slic3r::GCode::Sender->new);
|
||||
my $res = $self->sender->connect(
|
||||
$self->{serial_port_combobox}->GetValue,
|
||||
$self->{serial_speed_combobox}->GetValue,
|
||||
);
|
||||
if (!$res) {
|
||||
$self->set_status("Connection failed. Check serial port and speed.");
|
||||
} else {
|
||||
if ($self->sender->wait_connected) {
|
||||
$self->set_status("Printer is online. You can now start printing from the queue on the right.");
|
||||
$self->status_timer->Start(STATUS_TIMER_INTERVAL, wxTIMER_CONTINUOUS);
|
||||
$self->temp_timer->Start(TEMP_TIMER_INTERVAL, wxTIMER_CONTINUOUS);
|
||||
|
||||
# request temperature now, without waiting for the timer
|
||||
$self->sender->send("M105", 1);
|
||||
} else {
|
||||
$self->set_status("Connection failed. Check serial port and speed.");
|
||||
}
|
||||
}
|
||||
$self->_update_connection_controls;
|
||||
$self->reload_jobs;
|
||||
}
|
||||
|
||||
sub disconnect {
|
||||
my ($self) = @_;
|
||||
|
||||
$self->status_timer->Stop;
|
||||
$self->temp_timer->Stop;
|
||||
return if !$self->is_connected;
|
||||
|
||||
$self->printing->printing(0) if $self->printing;
|
||||
$self->printing(undef);
|
||||
$self->{gauge}->Hide;
|
||||
$self->{temp_panel}->Hide;
|
||||
$self->sender->disconnect;
|
||||
$self->set_status("");
|
||||
$self->_update_connection_controls;
|
||||
$self->reload_jobs;
|
||||
}
|
||||
|
||||
sub update_serial_ports {
|
||||
my ($self) = @_;
|
||||
|
||||
my $cb = $self->{serial_port_combobox};
|
||||
my $current = $cb->GetValue;
|
||||
$cb->Clear;
|
||||
$cb->Append($_) for wxTheApp->scan_serial_ports;
|
||||
$cb->SetValue($current);
|
||||
}
|
||||
|
||||
sub load_print_job {
|
||||
my ($self, $gcode_file, $filament_stats) = @_;
|
||||
|
||||
push @{$self->jobs}, my $job = Slic3r::GUI::Controller::PrinterPanel::PrintJob->new(
|
||||
id => time() . $gcode_file . rand(1000),
|
||||
gcode_file => $gcode_file,
|
||||
filament_stats => $filament_stats,
|
||||
);
|
||||
$self->reload_jobs;
|
||||
return $job;
|
||||
}
|
||||
|
||||
sub delete_job {
|
||||
my ($self, $job) = @_;
|
||||
|
||||
$self->jobs([ grep $_->id ne $job->id, @{$self->jobs} ]);
|
||||
$self->reload_jobs;
|
||||
}
|
||||
|
||||
sub print_job {
|
||||
my ($self, $job) = @_;
|
||||
|
||||
$self->printing($job);
|
||||
$job->printing(1);
|
||||
$self->reload_jobs;
|
||||
|
||||
open my $fh, '<', $job->gcode_file;
|
||||
my $line_count = 0;
|
||||
while (my $row = <$fh>) {
|
||||
$self->sender->send($row);
|
||||
$line_count++;
|
||||
}
|
||||
close $fh;
|
||||
|
||||
$self->_update_connection_controls;
|
||||
$self->{gauge}->SetRange($line_count);
|
||||
$self->{gauge}->SetValue(0);
|
||||
$self->{gauge}->Enable;
|
||||
$self->{gauge}->Show;
|
||||
$self->Layout;
|
||||
|
||||
$self->set_status('Printing...');
|
||||
$self->{log_textctrl}->AppendText(sprintf "=====\n");
|
||||
$self->{log_textctrl}->AppendText(sprintf "Printing %s\n", $job->name);
|
||||
$self->{log_textctrl}->AppendText(sprintf "Print started at %s\n", $self->_timestamp);
|
||||
}
|
||||
|
||||
sub print_completed {
|
||||
my ($self) = @_;
|
||||
|
||||
my $job = $self->printing;
|
||||
$self->printing(undef);
|
||||
$job->printing(0);
|
||||
$job->printed(1);
|
||||
$self->_update_connection_controls;
|
||||
$self->{gauge}->Hide;
|
||||
$self->Layout;
|
||||
|
||||
$self->set_status('Print completed.');
|
||||
$self->{log_textctrl}->AppendText(sprintf "Print completed at %s\n", $self->_timestamp);
|
||||
|
||||
$self->reload_jobs;
|
||||
}
|
||||
|
||||
sub reload_jobs {
|
||||
my ($self) = @_;
|
||||
|
||||
# reorder jobs
|
||||
@{$self->jobs} = sort { ($a->printed <=> $b->printed) || ($a->timestamp <=> $b->timestamp) }
|
||||
@{$self->jobs};
|
||||
|
||||
# remove all panels
|
||||
foreach my $child ($self->{jobs_panel_sizer}->GetChildren) {
|
||||
my $window = $child->GetWindow;
|
||||
$self->{jobs_panel_sizer}->Detach($window);
|
||||
# now $child does not exist anymore
|
||||
$window->Destroy;
|
||||
}
|
||||
|
||||
# re-add all panels
|
||||
foreach my $job (@{$self->jobs}) {
|
||||
my $panel = Slic3r::GUI::Controller::PrinterPanel::PrintJobPanel->new($self->{jobs_panel}, $job);
|
||||
$self->{jobs_panel_sizer}->Add($panel, 0, wxEXPAND | wxBOTTOM, 5);
|
||||
|
||||
$panel->on_delete_job(sub {
|
||||
my ($job) = @_;
|
||||
$self->delete_job($job);
|
||||
});
|
||||
$panel->on_print_job(sub {
|
||||
my ($job) = @_;
|
||||
$self->print_job($job);
|
||||
});
|
||||
$panel->on_pause_print(sub {
|
||||
my ($job) = @_;
|
||||
$self->sender->pause_queue;
|
||||
$job->paused(1);
|
||||
$self->reload_jobs;
|
||||
$self->_update_connection_controls;
|
||||
$self->{gauge}->Disable;
|
||||
$self->set_status('Print is paused. Click on Resume to continue.');
|
||||
});
|
||||
$panel->on_abort_print(sub {
|
||||
my ($job) = @_;
|
||||
$self->sender->purge_queue;
|
||||
$self->printing(undef);
|
||||
$job->printing(0);
|
||||
$job->paused(0);
|
||||
$self->reload_jobs;
|
||||
$self->_update_connection_controls;
|
||||
$self->{gauge}->Disable;
|
||||
$self->{gauge}->Hide;
|
||||
$self->set_status('Print was aborted.');
|
||||
$self->{log_textctrl}->AppendText(sprintf "Print aborted at %s\n", $self->_timestamp);
|
||||
});
|
||||
$panel->on_resume_print(sub {
|
||||
my ($job) = @_;
|
||||
$self->sender->resume_queue;
|
||||
$job->paused(0);
|
||||
$self->reload_jobs;
|
||||
$self->_update_connection_controls;
|
||||
$self->{gauge}->Enable;
|
||||
$self->set_status('Printing...');
|
||||
});
|
||||
$panel->enable_print if $self->is_connected && !$self->printing;
|
||||
|
||||
EVT_MOUSEWHEEL($panel, sub {
|
||||
my (undef, $event) = @_;
|
||||
Wx::PostEvent($self->{jobs_panel}, $event);
|
||||
$event->Skip;
|
||||
});
|
||||
}
|
||||
|
||||
$self->{jobs_panel}->Layout;
|
||||
$self->{print_jobs_sizer}->Layout;
|
||||
}
|
||||
|
||||
sub _timestamp {
|
||||
my ($self) = @_;
|
||||
|
||||
my @time = localtime(time);
|
||||
return sprintf '%02d:%02d:%02d', @time[2,1,0];
|
||||
}
|
||||
|
||||
package Slic3r::GUI::Controller::PrinterPanel::PrintJob;
|
||||
use Moo;
|
||||
|
||||
use File::Basename qw(basename);
|
||||
|
||||
has 'id' => (is => 'ro', required => 1);
|
||||
has 'timestamp' => (is => 'ro', default => sub { time });
|
||||
has 'gcode_file' => (is => 'ro', required => 1);
|
||||
has 'filament_stats' => (is => 'rw');
|
||||
has 'printing' => (is => 'rw', default => sub { 0 });
|
||||
has 'paused' => (is => 'rw', default => sub { 0 });
|
||||
has 'printed' => (is => 'rw', default => sub { 0 });
|
||||
|
||||
sub name {
|
||||
my ($self) = @_;
|
||||
return basename($self->gcode_file);
|
||||
}
|
||||
|
||||
package Slic3r::GUI::Controller::PrinterPanel::PrintJobPanel;
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
|
||||
use Wx qw(wxTheApp :panel :id :misc :sizer :button :bitmap :font :dialog :icon :timer
|
||||
:colour :brush :pen);
|
||||
use Wx::Event qw(EVT_BUTTON EVT_TIMER EVT_ERASE_BACKGROUND);
|
||||
use base qw(Wx::Panel Class::Accessor);
|
||||
|
||||
__PACKAGE__->mk_accessors(qw(job on_delete_job on_print_job on_pause_print on_resume_print
|
||||
on_abort_print blink_timer));
|
||||
|
||||
sub new {
|
||||
my ($class, $parent, $job) = @_;
|
||||
my $self = $class->SUPER::new($parent, -1, wxDefaultPosition, wxDefaultSize);
|
||||
|
||||
$self->job($job);
|
||||
$self->SetBackgroundColour(wxWHITE);
|
||||
|
||||
{
|
||||
my $white_brush = Wx::Brush->new(wxWHITE, wxSOLID);
|
||||
my $pen = Wx::Pen->new(Wx::Colour->new(200,200,200), 1, wxSOLID);
|
||||
EVT_ERASE_BACKGROUND($self, sub {
|
||||
my ($self, $event) = @_;
|
||||
my $dc = $event->GetDC;
|
||||
my $size = $self->GetSize;
|
||||
$dc->SetBrush($white_brush);
|
||||
$dc->SetPen($pen);
|
||||
$dc->DrawRoundedRectangle(0, 0, $size->GetWidth,$size->GetHeight, 6);
|
||||
});
|
||||
}
|
||||
|
||||
my $left_sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
{
|
||||
$self->{job_name_textctrl} = my $text = Wx::StaticText->new($self, -1, $job->name, wxDefaultPosition, wxDefaultSize);
|
||||
my $font = $text->GetFont;
|
||||
$font->SetWeight(wxFONTWEIGHT_BOLD);
|
||||
$text->SetFont($font);
|
||||
if ($job->printed) {
|
||||
$text->SetForegroundColour($Slic3r::GUI::grey);
|
||||
}
|
||||
$left_sizer->Add($text, 0, wxEXPAND, 0);
|
||||
}
|
||||
{
|
||||
my $filament_stats = join "\n",
|
||||
map "$_ (" . sprintf("%.2f", $job->filament_stats->{$_}/1000) . "m)",
|
||||
sort keys %{$job->filament_stats};
|
||||
my $text = Wx::StaticText->new($self, -1, $filament_stats, wxDefaultPosition, wxDefaultSize);
|
||||
$text->SetFont($Slic3r::GUI::small_font);
|
||||
if ($job->printed && !$job->printing) {
|
||||
$text->SetForegroundColour($Slic3r::GUI::grey);
|
||||
}
|
||||
$left_sizer->Add($text, 0, wxEXPAND | wxTOP, 6);
|
||||
}
|
||||
|
||||
my $buttons_sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
my $button_style = Wx::wxBORDER_NONE | wxBU_EXACTFIT;
|
||||
{
|
||||
my $btn = $self->{btn_delete} = Wx::Button->new($self, -1, 'Delete',
|
||||
wxDefaultPosition, wxDefaultSize, $button_style);
|
||||
$btn->SetToolTipString("Delete this job from print queue")
|
||||
if $btn->can('SetToolTipString');
|
||||
$btn->SetFont($Slic3r::GUI::small_font);
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/delete.png", wxBITMAP_TYPE_PNG));
|
||||
}
|
||||
if ($job->printing) {
|
||||
$btn->Hide;
|
||||
}
|
||||
$buttons_sizer->Add($btn, 0, wxBOTTOM, 2);
|
||||
|
||||
EVT_BUTTON($self, $btn, sub {
|
||||
my $res = Wx::MessageDialog->new($self, "Are you sure you want to delete this print job?", 'Delete Job', wxYES_NO | wxYES_DEFAULT | wxICON_QUESTION)->ShowModal;
|
||||
return unless $res == wxID_YES;
|
||||
|
||||
wxTheApp->CallAfter(sub {
|
||||
$self->on_delete_job->($job);
|
||||
});
|
||||
});
|
||||
}
|
||||
{
|
||||
my $label = $job->printed ? 'Print Again' : 'Print This';
|
||||
my $btn = $self->{btn_print} = Wx::Button->new($self, -1, $label, wxDefaultPosition, wxDefaultSize,
|
||||
$button_style);
|
||||
$btn->SetFont($Slic3r::GUI::small_bold_font);
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/control_play.png", wxBITMAP_TYPE_PNG));
|
||||
$btn->SetBitmapCurrent(Wx::Bitmap->new("$Slic3r::var/control_play_blue.png", wxBITMAP_TYPE_PNG));
|
||||
#$btn->SetBitmapPosition(wxRIGHT);
|
||||
}
|
||||
$btn->Hide;
|
||||
$buttons_sizer->Add($btn, 0, wxBOTTOM, 2);
|
||||
|
||||
EVT_BUTTON($self, $btn, sub {
|
||||
wxTheApp->CallAfter(sub {
|
||||
$self->on_print_job->($job);
|
||||
});
|
||||
});
|
||||
}
|
||||
{
|
||||
my $btn = $self->{btn_pause} = Wx::Button->new($self, -1, "Pause", wxDefaultPosition, wxDefaultSize,
|
||||
$button_style);
|
||||
$btn->SetFont($Slic3r::GUI::small_font);
|
||||
if (!$job->printing || $job->paused) {
|
||||
$btn->Hide;
|
||||
}
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/control_pause.png", wxBITMAP_TYPE_PNG));
|
||||
$btn->SetBitmapCurrent(Wx::Bitmap->new("$Slic3r::var/control_pause_blue.png", wxBITMAP_TYPE_PNG));
|
||||
}
|
||||
$buttons_sizer->Add($btn, 0, wxBOTTOM, 2);
|
||||
|
||||
EVT_BUTTON($self, $btn, sub {
|
||||
wxTheApp->CallAfter(sub {
|
||||
$self->on_pause_print->($job);
|
||||
});
|
||||
});
|
||||
}
|
||||
{
|
||||
my $btn = $self->{btn_resume} = Wx::Button->new($self, -1, "Resume", wxDefaultPosition, wxDefaultSize,
|
||||
$button_style);
|
||||
$btn->SetFont($Slic3r::GUI::small_font);
|
||||
if (!$job->printing || !$job->paused) {
|
||||
$btn->Hide;
|
||||
}
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/control_play.png", wxBITMAP_TYPE_PNG));
|
||||
$btn->SetBitmapCurrent(Wx::Bitmap->new("$Slic3r::var/control_play_blue.png", wxBITMAP_TYPE_PNG));
|
||||
}
|
||||
$buttons_sizer->Add($btn, 0, wxBOTTOM, 2);
|
||||
|
||||
EVT_BUTTON($self, $btn, sub {
|
||||
wxTheApp->CallAfter(sub {
|
||||
$self->on_resume_print->($job);
|
||||
});
|
||||
});
|
||||
}
|
||||
{
|
||||
my $btn = $self->{btn_abort} = Wx::Button->new($self, -1, "Abort", wxDefaultPosition, wxDefaultSize,
|
||||
$button_style);
|
||||
$btn->SetFont($Slic3r::GUI::small_font);
|
||||
if (!$job->printing) {
|
||||
$btn->Hide;
|
||||
}
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/control_stop.png", wxBITMAP_TYPE_PNG));
|
||||
$btn->SetBitmapCurrent(Wx::Bitmap->new("$Slic3r::var/control_stop_blue.png", wxBITMAP_TYPE_PNG));
|
||||
}
|
||||
$buttons_sizer->Add($btn, 0, wxBOTTOM, 2);
|
||||
|
||||
EVT_BUTTON($self, $btn, sub {
|
||||
wxTheApp->CallAfter(sub {
|
||||
$self->on_abort_print->($job);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
my $sizer = Wx::BoxSizer->new(wxHORIZONTAL);
|
||||
$sizer->Add($left_sizer, 1, wxEXPAND | wxALL, 6);
|
||||
$sizer->Add($buttons_sizer, 0, wxEXPAND | wxALL, 6);
|
||||
$self->SetSizer($sizer);
|
||||
|
||||
# set-up the timer that changes the job name color while printing
|
||||
if ($self->job->printing && !$self->job->paused) {
|
||||
my $timer_id = &Wx::NewId();
|
||||
$self->blink_timer(Wx::Timer->new($self, $timer_id));
|
||||
my $blink = 0; # closure
|
||||
my $colour = Wx::Colour->new(0, 190, 0);
|
||||
EVT_TIMER($self, $timer_id, sub {
|
||||
my ($self, $event) = @_;
|
||||
|
||||
$self->{job_name_textctrl}->SetForegroundColour($blink ? Wx::wxBLACK : $colour);
|
||||
$blink = !$blink;
|
||||
});
|
||||
$self->blink_timer->Start(1000, wxTIMER_CONTINUOUS);
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub enable_print {
|
||||
my ($self) = @_;
|
||||
|
||||
if (!$self->job->printing) {
|
||||
$self->{btn_print}->Show;
|
||||
}
|
||||
$self->Layout;
|
||||
}
|
||||
|
||||
sub Destroy {
|
||||
my ($self) = @_;
|
||||
|
||||
# There's a gap between the time Perl destroys the wxPanel object and
|
||||
# the blink_timer member, so the wxTimer might still fire an event which
|
||||
# isn't handled properly, causing a crash. So we ensure that blink_timer
|
||||
# is stopped before we destroy the wxPanel.
|
||||
$self->blink_timer->Stop if $self->blink_timer;
|
||||
return $self->SUPER::Destroy;
|
||||
}
|
||||
|
||||
1;
|
|
@ -8,7 +8,7 @@ use List::Util qw(min);
|
|||
use Slic3r::Geometry qw(X Y Z);
|
||||
use Wx qw(:frame :bitmap :id :misc :notebook :panel :sizer :menu :dialog :filedialog
|
||||
:font :icon wxTheApp);
|
||||
use Wx::Event qw(EVT_CLOSE EVT_MENU);
|
||||
use Wx::Event qw(EVT_CLOSE EVT_MENU EVT_NOTEBOOK_PAGE_CHANGED);
|
||||
use base 'Wx::Frame';
|
||||
|
||||
our $qs_last_input_file;
|
||||
|
@ -89,9 +89,14 @@ sub _init_tabpanel {
|
|||
my ($self) = @_;
|
||||
|
||||
$self->{tabpanel} = my $panel = Wx::Notebook->new($self, -1, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL);
|
||||
EVT_NOTEBOOK_PAGE_CHANGED($self, $self->{tabpanel}, sub {
|
||||
my $panel = $self->{tabpanel}->GetCurrentPage;
|
||||
$panel->OnActivate if $panel->can('OnActivate');
|
||||
});
|
||||
|
||||
if (!$self->{no_plater}) {
|
||||
$panel->AddPage($self->{plater} = Slic3r::GUI::Plater->new($panel), "Plater");
|
||||
$panel->AddPage($self->{controller} = Slic3r::GUI::Controller->new($panel), "Controller");
|
||||
}
|
||||
$self->{options_tabs} = {};
|
||||
|
||||
|
@ -131,6 +136,7 @@ sub _init_tabpanel {
|
|||
if ($self->{plater}) {
|
||||
$self->{plater}->update_presets($tab_name, @_);
|
||||
$self->{plater}->on_config_change($tab->config);
|
||||
$self->{controller}->update_presets($tab_name, @_);
|
||||
}
|
||||
});
|
||||
$tab->load_presets;
|
||||
|
@ -228,18 +234,25 @@ sub _init_menubar {
|
|||
# Window menu
|
||||
my $windowMenu = Wx::Menu->new;
|
||||
{
|
||||
my $tab_count = $self->{no_plater} ? 3 : 4;
|
||||
$self->_append_menu_item($windowMenu, "Select &Plater Tab\tCtrl+1", 'Show the plater', sub {
|
||||
$self->select_tab(0);
|
||||
}, undef, 'application_view_tile.png') unless $self->{no_plater};
|
||||
my $tab_offset = 0;
|
||||
if (!$self->{no_plater}) {
|
||||
$self->_append_menu_item($windowMenu, "Select &Plater Tab\tCtrl+1", 'Show the plater', sub {
|
||||
$self->select_tab(0);
|
||||
}, undef, 'application_view_tile.png');
|
||||
$self->_append_menu_item($windowMenu, "Select &Controller Tab\tCtrl+T", 'Show the printer controller', sub {
|
||||
$self->select_tab(1);
|
||||
}, undef, 'printer_empty.png');
|
||||
$windowMenu->AppendSeparator();
|
||||
$tab_offset += 2;
|
||||
}
|
||||
$self->_append_menu_item($windowMenu, "Select P&rint Settings Tab\tCtrl+2", 'Show the print settings', sub {
|
||||
$self->select_tab($tab_count-3);
|
||||
$self->select_tab($tab_offset+0);
|
||||
}, undef, 'cog.png');
|
||||
$self->_append_menu_item($windowMenu, "Select &Filament Settings Tab\tCtrl+3", 'Show the filament settings', sub {
|
||||
$self->select_tab($tab_count-2);
|
||||
$self->select_tab($tab_offset+1);
|
||||
}, undef, 'spool.png');
|
||||
$self->_append_menu_item($windowMenu, "Select Print&er Settings Tab\tCtrl+4", 'Show the printer settings', sub {
|
||||
$self->select_tab($tab_count-1);
|
||||
$self->select_tab($tab_offset+2);
|
||||
}, undef, 'printer_empty.png');
|
||||
}
|
||||
|
||||
|
@ -692,6 +705,17 @@ sub config {
|
|||
return $config;
|
||||
}
|
||||
|
||||
sub filament_preset_names {
|
||||
my ($self) = @_;
|
||||
|
||||
if ($self->{mode} eq 'simple') {
|
||||
return '';
|
||||
}
|
||||
|
||||
return map $self->{options_tabs}{filament}->get_preset($_)->name,
|
||||
$self->{plater}->filament_presets;
|
||||
}
|
||||
|
||||
sub check_unsaved_changes {
|
||||
my $self = shift;
|
||||
|
||||
|
@ -712,7 +736,7 @@ sub check_unsaved_changes {
|
|||
|
||||
sub select_tab {
|
||||
my ($self, $tab) = @_;
|
||||
$self->{tabpanel}->ChangeSelection($tab);
|
||||
$self->{tabpanel}->SetSelection($tab);
|
||||
}
|
||||
|
||||
sub _append_menu_item {
|
||||
|
|
|
@ -83,7 +83,7 @@ sub append_line {
|
|||
# if we have a single option with no sidetext just add it directly to the grid sizer
|
||||
my @options = @{$line->get_options};
|
||||
$self->_options->{$_->opt_id} = $_ for @options;
|
||||
if (@options == 1 && !$options[0]->sidetext && !@{$line->get_extra_widgets}) {
|
||||
if (@options == 1 && !$options[0]->sidetext && !$options[0]->side_widget && !@{$line->get_extra_widgets}) {
|
||||
my $option = $options[0];
|
||||
my $field = $self->_build_field($option);
|
||||
$grid_sizer->Add($field, 0, ($option->full_width ? wxEXPAND : 0) | wxALIGN_CENTER_VERTICAL, 0);
|
||||
|
@ -95,7 +95,9 @@ sub append_line {
|
|||
my $sizer = Wx::BoxSizer->new(wxHORIZONTAL);
|
||||
$grid_sizer->Add($sizer, 0, 0, 0);
|
||||
|
||||
foreach my $option (@options) {
|
||||
foreach my $i (0..$#options) {
|
||||
my $option = $options[$i];
|
||||
|
||||
# add label if any
|
||||
if ($option->label) {
|
||||
my $field_label = Wx::StaticText->new($self->parent, -1, $option->label . ":", wxDefaultPosition, wxDefaultSize);
|
||||
|
@ -111,7 +113,16 @@ sub append_line {
|
|||
if ($option->sidetext) {
|
||||
my $sidetext = Wx::StaticText->new($self->parent, -1, $option->sidetext, wxDefaultPosition, wxDefaultSize);
|
||||
$sidetext->SetFont($self->sidetext_font);
|
||||
$sizer->Add($sidetext, 0, wxLEFT | wxALIGN_CENTER_VERTICAL , 4);
|
||||
$sizer->Add($sidetext, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 4);
|
||||
}
|
||||
|
||||
# add side widget if any
|
||||
if ($option->side_widget) {
|
||||
$sizer->Add($option->side_widget->($self->parent), 0, wxLEFT | wxALIGN_CENTER_VERTICAL, 1);
|
||||
}
|
||||
|
||||
if ($option != $#options) {
|
||||
$sizer->AddSpacer(4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +188,7 @@ sub _build_field {
|
|||
parent => $self->parent,
|
||||
option => $opt,
|
||||
);
|
||||
} elsif ($type eq 'select') {
|
||||
} elsif ($type eq 'select' || $type eq 'select_open') {
|
||||
$field = Slic3r::GUI::OptionsGroup::Field::Choice->new(
|
||||
parent => $self->parent,
|
||||
option => $opt,
|
||||
|
@ -299,6 +310,7 @@ has 'max' => (is => 'rw', default => sub { undef });
|
|||
has 'labels' => (is => 'rw', default => sub { [] });
|
||||
has 'values' => (is => 'rw', default => sub { [] });
|
||||
has 'readonly' => (is => 'rw', default => sub { 0 });
|
||||
has 'side_widget' => (is => 'rw', default => sub { undef });
|
||||
|
||||
|
||||
package Slic3r::GUI::ConfigOptionsGroup;
|
||||
|
|
|
@ -213,13 +213,15 @@ extends 'Slic3r::GUI::OptionsGroup::Field::wxWindow';
|
|||
|
||||
use List::Util qw(first);
|
||||
use Wx qw(:misc :combobox);
|
||||
use Wx::Event qw(EVT_COMBOBOX);
|
||||
use Wx::Event qw(EVT_COMBOBOX EVT_TEXT);
|
||||
|
||||
sub BUILD {
|
||||
my ($self) = @_;
|
||||
|
||||
my $style = 0;
|
||||
$style |= wxCB_READONLY if $self->option->gui_type ne 'select_open';
|
||||
my $field = Wx::ComboBox->new($self->parent, -1, "", wxDefaultPosition, $self->_default_size,
|
||||
$self->option->labels || $self->option->values, wxCB_READONLY);
|
||||
$self->option->labels || $self->option->values || [], $style);
|
||||
$self->wxWindow($field);
|
||||
|
||||
$self->set_value($self->option->default);
|
||||
|
@ -227,24 +229,54 @@ sub BUILD {
|
|||
EVT_COMBOBOX($self->parent, $field, sub {
|
||||
$self->_on_change($self->option->opt_id);
|
||||
});
|
||||
EVT_TEXT($self->parent, $field, sub {
|
||||
$self->_on_change($self->option->opt_id);
|
||||
});
|
||||
}
|
||||
|
||||
sub set_value {
|
||||
my ($self, $value) = @_;
|
||||
|
||||
my $idx = first { $self->option->values->[$_] eq $value } 0..$#{$self->option->values};
|
||||
$self->disable_change_event(1);
|
||||
|
||||
if ($self->option->values) {
|
||||
my $idx = first { $self->option->values->[$_] eq $value } 0..$#{$self->option->values};
|
||||
$self->wxWindow->SetSelection($idx);
|
||||
} else {
|
||||
$self->wxWindow->SetValue($value);
|
||||
}
|
||||
|
||||
$self->disable_change_event(0);
|
||||
}
|
||||
|
||||
sub set_values {
|
||||
my ($self, $values) = @_;
|
||||
|
||||
$self->disable_change_event(1);
|
||||
$self->wxWindow->SetSelection($idx);
|
||||
|
||||
# it looks that Clear() also clears the text field in recent wxWidgets versions,
|
||||
# but we want to preserve it
|
||||
my $ww = $self->wxWindow;
|
||||
my $value = $ww->GetValue;
|
||||
$ww->Clear;
|
||||
$ww->Append($_) for @$values;
|
||||
$ww->SetValue($value);
|
||||
|
||||
$self->disable_change_event(0);
|
||||
}
|
||||
|
||||
sub get_value {
|
||||
my ($self) = @_;
|
||||
return $self->option->values->[$self->wxWindow->GetSelection];
|
||||
|
||||
if ($self->option->values) {
|
||||
my $idx = $self->wxWindow->GetSelection;
|
||||
if ($idx != &Wx::wxNOT_FOUND) {
|
||||
return $self->option->values->[$idx];
|
||||
}
|
||||
}
|
||||
return $self->wxWindow->GetValue;
|
||||
}
|
||||
|
||||
|
||||
package Slic3r::GUI::OptionsGroup::Field::NumericChoice;
|
||||
use Moo;
|
||||
extends 'Slic3r::GUI::OptionsGroup::Field::wxWindow';
|
||||
|
@ -333,12 +365,14 @@ sub get_value {
|
|||
my ($self) = @_;
|
||||
|
||||
my $label = $self->wxWindow->GetValue;
|
||||
my $value_idx = first { $self->option->labels->[$_] eq $label } 0..$#{$self->option->labels};
|
||||
if (defined $value_idx) {
|
||||
if ($self->option->values) {
|
||||
return $self->option->values->[$value_idx];
|
||||
if ($self->option->labels) {
|
||||
my $value_idx = first { $self->option->labels->[$_] eq $label } 0..$#{$self->option->labels};
|
||||
if (defined $value_idx) {
|
||||
if ($self->option->values) {
|
||||
return $self->option->values->[$value_idx];
|
||||
}
|
||||
return $value_idx;
|
||||
}
|
||||
return $value_idx;
|
||||
}
|
||||
return $label;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ sub new {
|
|||
my $self = $class->SUPER::new($parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
||||
$self->{config} = Slic3r::Config->new_from_defaults(qw(
|
||||
bed_shape complete_objects extruder_clearance_radius skirts skirt_distance brim_width
|
||||
octoprint_host octoprint_apikey
|
||||
serial_port serial_speed octoprint_host octoprint_apikey
|
||||
));
|
||||
$self->{model} = Slic3r::Model->new;
|
||||
$self->{print} = Slic3r::Print->new;
|
||||
|
@ -191,10 +191,12 @@ sub new {
|
|||
|
||||
# right pane buttons
|
||||
$self->{btn_export_gcode} = Wx::Button->new($self, -1, "Export G-code…", wxDefaultPosition, [-1, 30], wxBU_LEFT);
|
||||
$self->{btn_print} = Wx::Button->new($self, -1, "Print…", wxDefaultPosition, [-1, 30], wxBU_LEFT);
|
||||
$self->{btn_send_gcode} = Wx::Button->new($self, -1, "Send to printer", wxDefaultPosition, [-1, 30], wxBU_LEFT);
|
||||
$self->{btn_export_stl} = Wx::Button->new($self, -1, "Export STL…", wxDefaultPosition, [-1, 30], wxBU_LEFT);
|
||||
#$self->{btn_export_gcode}->SetFont($Slic3r::GUI::small_font);
|
||||
#$self->{btn_export_stl}->SetFont($Slic3r::GUI::small_font);
|
||||
$self->{btn_print}->Hide;
|
||||
$self->{btn_send_gcode}->Hide;
|
||||
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
|
@ -204,6 +206,7 @@ sub new {
|
|||
reset cross.png
|
||||
arrange bricks.png
|
||||
export_gcode cog_go.png
|
||||
print arrow_up.png
|
||||
send_gcode arrow_up.png
|
||||
export_stl brick_go.png
|
||||
|
||||
|
@ -225,6 +228,9 @@ sub new {
|
|||
EVT_BUTTON($self, $self->{btn_export_gcode}, sub {
|
||||
$self->export_gcode;
|
||||
});
|
||||
EVT_BUTTON($self, $self->{btn_print}, sub {
|
||||
$self->{print_file} = $self->export_gcode(Wx::StandardPaths::Get->GetTempDir());
|
||||
});
|
||||
EVT_BUTTON($self, $self->{btn_send_gcode}, sub {
|
||||
$self->{send_gcode_file} = $self->export_gcode(Wx::StandardPaths::Get->GetTempDir());
|
||||
});
|
||||
|
@ -382,6 +388,7 @@ sub new {
|
|||
my $buttons_sizer = Wx::BoxSizer->new(wxHORIZONTAL);
|
||||
$buttons_sizer->AddStretchSpacer(1);
|
||||
$buttons_sizer->Add($self->{btn_export_stl}, 0, wxALIGN_RIGHT, 0);
|
||||
$buttons_sizer->Add($self->{btn_print}, 0, wxALIGN_RIGHT, 0);
|
||||
$buttons_sizer->Add($self->{btn_send_gcode}, 0, wxALIGN_RIGHT, 0);
|
||||
$buttons_sizer->Add($self->{btn_export_gcode}, 0, wxALIGN_RIGHT, 0);
|
||||
|
||||
|
@ -1204,8 +1211,12 @@ sub on_export_completed {
|
|||
|
||||
my $message;
|
||||
my $send_gcode = 0;
|
||||
my $do_print = 0;
|
||||
if ($result) {
|
||||
if ($self->{send_gcode_file}) {
|
||||
if ($self->{print_file}) {
|
||||
$message = "File added to print queue";
|
||||
$do_print = 1;
|
||||
} elsif ($self->{send_gcode_file}) {
|
||||
$message = "Sending G-code file to the OctoPrint server...";
|
||||
$send_gcode = 1;
|
||||
} else {
|
||||
|
@ -1218,13 +1229,32 @@ sub on_export_completed {
|
|||
$self->statusbar->SetStatusText($message);
|
||||
wxTheApp->notify($message);
|
||||
|
||||
$self->do_print if $do_print;
|
||||
$self->send_gcode if $send_gcode;
|
||||
$self->{print_file} = undef;
|
||||
$self->{send_gcode_file} = undef;
|
||||
|
||||
# this updates buttons status
|
||||
$self->object_list_changed;
|
||||
}
|
||||
|
||||
sub do_print {
|
||||
my ($self) = @_;
|
||||
|
||||
my $printer_tab = $self->GetFrame->{options_tabs}{printer};
|
||||
my $printer_name = $printer_tab->get_current_preset->name;
|
||||
|
||||
my $controller = $self->GetFrame->{controller};
|
||||
my $printer_panel = $controller->add_printer($printer_name, $printer_tab->config);
|
||||
|
||||
my $filament_stats = $self->{print}->filament_stats;
|
||||
my @filament_names = $self->GetFrame->filament_preset_names;
|
||||
$filament_stats = { map { $filament_names[$_] => $filament_stats->{$_} } keys %$filament_stats };
|
||||
$printer_panel->load_print_job($self->{print_file}, $filament_stats);
|
||||
|
||||
$self->GetFrame->select_tab(1);
|
||||
}
|
||||
|
||||
sub send_gcode {
|
||||
my ($self) = @_;
|
||||
|
||||
|
@ -1422,6 +1452,13 @@ sub on_config_change {
|
|||
$self->{preview3D}->set_bed_shape($self->{config}->bed_shape)
|
||||
if $self->{preview3D};
|
||||
$self->update;
|
||||
} elsif ($opt_key eq 'serial_port') {
|
||||
if ($config->get('serial_port')) {
|
||||
$self->{btn_print}->Show;
|
||||
} else {
|
||||
$self->{btn_print}->Hide;
|
||||
}
|
||||
$self->Layout;
|
||||
} elsif ($opt_key eq 'octoprint_host') {
|
||||
if ($config->get('octoprint_host')) {
|
||||
$self->{btn_send_gcode}->Show;
|
||||
|
@ -1534,10 +1571,11 @@ sub object_list_changed {
|
|||
my $have_objects = @{$self->{objects}} ? 1 : 0;
|
||||
my $method = $have_objects ? 'Enable' : 'Disable';
|
||||
$self->{"btn_$_"}->$method
|
||||
for grep $self->{"btn_$_"}, qw(reset arrange export_gcode export_stl send_gcode);
|
||||
for grep $self->{"btn_$_"}, qw(reset arrange export_gcode export_stl print send_gcode);
|
||||
|
||||
if ($self->{export_gcode_output_file} || $self->{send_gcode_file}) {
|
||||
$self->{btn_export_gcode}->Disable;
|
||||
$self->{btn_print}->Disable;
|
||||
$self->{btn_send_gcode}->Disable;
|
||||
}
|
||||
|
||||
|
|
|
@ -987,6 +987,7 @@ sub build {
|
|||
$self->init_config_options(qw(
|
||||
bed_shape z_offset
|
||||
gcode_flavor use_relative_e_distances
|
||||
serial_port serial_speed
|
||||
octoprint_host octoprint_apikey
|
||||
use_firmware_retraction pressure_advance vibration_limit
|
||||
use_volumetric_e
|
||||
|
@ -999,7 +1000,8 @@ sub build {
|
|||
my $bed_shape_widget = sub {
|
||||
my ($parent) = @_;
|
||||
|
||||
my $btn = Wx::Button->new($parent, -1, "Set…", wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||
my $btn = Wx::Button->new($parent, -1, "Set…", wxDefaultPosition, wxDefaultSize,
|
||||
wxBU_LEFT | wxBU_EXACTFIT);
|
||||
$btn->SetFont($Slic3r::GUI::small_font);
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/cog.png", wxBITMAP_TYPE_PNG));
|
||||
|
@ -1059,6 +1061,52 @@ sub build {
|
|||
}
|
||||
});
|
||||
}
|
||||
{
|
||||
my $optgroup = $page->new_optgroup('USB/Serial connection');
|
||||
my $line = Slic3r::GUI::OptionsGroup::Line->new(
|
||||
label => 'Serial port',
|
||||
);
|
||||
my $serial_port = $optgroup->get_option('serial_port');
|
||||
$serial_port->side_widget(sub {
|
||||
my ($parent) = @_;
|
||||
|
||||
my $btn = Wx::BitmapButton->new($parent, -1, Wx::Bitmap->new("$Slic3r::var/arrow_rotate_clockwise.png", wxBITMAP_TYPE_PNG),
|
||||
wxDefaultPosition, wxDefaultSize, &Wx::wxBORDER_NONE);
|
||||
$btn->SetToolTipString("Rescan serial ports")
|
||||
if $btn->can('SetToolTipString');
|
||||
EVT_BUTTON($self, $btn, \&_update_serial_ports);
|
||||
|
||||
return $btn;
|
||||
});
|
||||
my $serial_test = sub {
|
||||
my ($parent) = @_;
|
||||
|
||||
my $btn = $self->{serial_test_btn} = Wx::Button->new($parent, -1,
|
||||
"Test", wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
$btn->SetFont($Slic3r::GUI::small_font);
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/wrench.png", wxBITMAP_TYPE_PNG));
|
||||
}
|
||||
|
||||
EVT_BUTTON($self, $btn, sub {
|
||||
my $sender = Slic3r::GCode::Sender->new;
|
||||
my $res = $sender->connect(
|
||||
$self->{config}->serial_port,
|
||||
$self->{config}->serial_speed,
|
||||
);
|
||||
if ($res && $sender->wait_connected) {
|
||||
Slic3r::GUI::show_info($self, "Connection to printer works correctly.", "Success!");
|
||||
} else {
|
||||
Slic3r::GUI::show_error($self, "Connection failed.");
|
||||
}
|
||||
});
|
||||
return $btn;
|
||||
};
|
||||
$line->append_option($serial_port);
|
||||
$line->append_option($optgroup->get_option('serial_speed'));
|
||||
$line->append_widget($serial_test);
|
||||
$optgroup->append_line($line);
|
||||
}
|
||||
{
|
||||
my $optgroup = $page->new_optgroup('OctoPrint upload');
|
||||
|
||||
|
@ -1092,7 +1140,8 @@ sub build {
|
|||
my $octoprint_host_test = sub {
|
||||
my ($parent) = @_;
|
||||
|
||||
my $btn = $self->{octoprint_host_test_btn} = Wx::Button->new($parent, -1, "Test", wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
|
||||
my $btn = $self->{octoprint_host_test_btn} = Wx::Button->new($parent, -1,
|
||||
"Test", wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
$btn->SetFont($Slic3r::GUI::small_font);
|
||||
if ($Slic3r::GUI::have_button_icons) {
|
||||
$btn->SetBitmap(Wx::Bitmap->new("$Slic3r::var/wrench.png", wxBITMAP_TYPE_PNG));
|
||||
|
@ -1187,6 +1236,13 @@ sub build {
|
|||
|
||||
$self->{extruder_pages} = [];
|
||||
$self->_build_extruder_pages;
|
||||
$self->_update_serial_ports;
|
||||
}
|
||||
|
||||
sub _update_serial_ports {
|
||||
my ($self) = @_;
|
||||
|
||||
$self->get_field('serial_port')->set_values([ wxTheApp->scan_serial_ports ]);
|
||||
}
|
||||
|
||||
sub _extruders_count_changed {
|
||||
|
@ -1270,6 +1326,12 @@ sub _update {
|
|||
|
||||
my $config = $self->{config};
|
||||
|
||||
$self->get_field('serial_speed')->toggle($config->get('serial_port'));
|
||||
if ($config->get('serial_speed') && $config->get('serial_port')) {
|
||||
$self->{serial_test_btn}->Enable;
|
||||
} else {
|
||||
$self->{serial_test_btn}->Disable;
|
||||
}
|
||||
if ($config->get('octoprint_host') && eval "use LWP::UserAgent; 1") {
|
||||
$self->{octoprint_host_test_btn}->Enable;
|
||||
} else {
|
||||
|
|
|
@ -310,11 +310,14 @@ sub export {
|
|||
print $fh $gcodegen->writer->update_progress($gcodegen->layer_count, $gcodegen->layer_count, 1); # 100%
|
||||
print $fh $gcodegen->writer->postamble;
|
||||
|
||||
# get filament stats
|
||||
$self->print->clear_filament_stats;
|
||||
$self->print->total_used_filament(0);
|
||||
$self->print->total_extruded_volume(0);
|
||||
foreach my $extruder (@{$gcodegen->writer->extruders}) {
|
||||
my $used_filament = $extruder->used_filament;
|
||||
my $extruded_volume = $extruder->extruded_volume;
|
||||
$self->print->set_filament_stats($extruder->id, $used_filament);
|
||||
|
||||
printf $fh "; filament used = %.1fmm (%.1fcm3)\n",
|
||||
$used_filament, $extruded_volume/1000;
|
||||
|
|
36
utils/send-gcode.pl
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
BEGIN {
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin/../lib";
|
||||
}
|
||||
|
||||
use Slic3r;
|
||||
|
||||
die "Usage: send-gcode.pl SERIALPORT BAUDRATE GCODE_FILE\n"
|
||||
if @ARGV != 3;
|
||||
|
||||
my $serial = Slic3r::GCode::Sender->new($ARGV[0], $ARGV[1]);
|
||||
1 until $serial->is_connected;
|
||||
print "Connected to printer\n";
|
||||
|
||||
{
|
||||
local $/ = "\n";
|
||||
Slic3r::open(\my $fh, '<', $ARGV[2])
|
||||
or die "Unable to open $ARGV[2]: $!\n";
|
||||
binmode $fh, ':utf8';
|
||||
while (<$fh>) {
|
||||
$serial->send($_);
|
||||
}
|
||||
close $fh;
|
||||
}
|
||||
|
||||
while ((my $queue_size = $serial->queue_size) > 0) {
|
||||
printf "Queue size: %d\n", $queue_size;
|
||||
}
|
||||
$serial->disconnect;
|
||||
|
||||
__END__
|
BIN
var/arrow_down.png
Normal file
After Width: | Height: | Size: 379 B |
BIN
var/arrow_left.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
var/arrow_right.png
Normal file
After Width: | Height: | Size: 349 B |
BIN
var/control_pause.png
Normal file
After Width: | Height: | Size: 598 B |
BIN
var/control_pause_blue.png
Normal file
After Width: | Height: | Size: 721 B |
BIN
var/control_play.png
Normal file
After Width: | Height: | Size: 592 B |
BIN
var/control_play_blue.png
Normal file
After Width: | Height: | Size: 717 B |
BIN
var/control_stop.png
Normal file
After Width: | Height: | Size: 403 B |
BIN
var/control_stop_blue.png
Normal file
After Width: | Height: | Size: 695 B |
BIN
var/house.png
Normal file
After Width: | Height: | Size: 806 B |
71
xs/Build.PL
|
@ -3,13 +3,76 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Devel::CheckLib;
|
||||
use ExtUtils::CppGuess;
|
||||
use Module::Build::WithXSpp;
|
||||
|
||||
# _GLIBCXX_USE_C99 : to get the long long type for g++
|
||||
# HAS_BOOL : stops Perl/lib/CORE/handy.h from doing "# define bool char" for MSVC
|
||||
# NOGDI : prevents inclusion of wingdi.h which defines functions Polygon() and Polyline() in global namespace
|
||||
my @cflags = qw(-D_GLIBCXX_USE_C99 -DHAS_BOOL -DNOGDI -DSLIC3RXS);
|
||||
# BOOST_ASIO_DISABLE_KQUEUE : prevents a Boost ASIO bug on OS X: https://svn.boost.org/trac/boost/ticket/5339
|
||||
my @cflags = qw(-D_GLIBCXX_USE_C99 -DHAS_BOOL -DNOGDI -DSLIC3RXS -DBOOST_ASIO_DISABLE_KQUEUE);
|
||||
|
||||
my @INC = qw();
|
||||
my @LIBS = qw();
|
||||
|
||||
# search for Boost in a number of places
|
||||
my @boost_include = my @boost_libs = ();
|
||||
if (defined $ENV{BOOST_DIR}) {
|
||||
if (-d "$ENV{BOOST_DIR}/include") {
|
||||
push @boost_include, $ENV{BOOST_DIR} . '/include';
|
||||
} else {
|
||||
push @boost_include, $ENV{BOOST_DIR};
|
||||
}
|
||||
push @boost_libs, $ENV{BOOST_DIR};
|
||||
} else {
|
||||
push @boost_include, grep { -d $_ }
|
||||
qw(/opt/local/include /usr/local/include /opt/include),
|
||||
qw(/usr/include C:\Boost\include);
|
||||
push @boost_libs, grep { -d $_ }
|
||||
qw(/opt/local/lib /usr/local/lib /opt/lib /usr/lib),
|
||||
qw(C:\Boost\lib /lib);
|
||||
|
||||
if ($^O eq 'MSWin32') {
|
||||
for my $path (glob('C:\dev\boost*'), glob ('C:\boost*')) {
|
||||
push @boost_include, $path;
|
||||
push @boost_libs, $path . "/stage/lib";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# In order to generate the -l switches we need to know how Boost libraries are named
|
||||
my $have_boost = 0;
|
||||
foreach my $path (@boost_libs) {
|
||||
my @files = glob "$path/libboost_system*";
|
||||
next if !@files;
|
||||
|
||||
if ($files[0] =~ /libboost_system([^.]+)/) {
|
||||
my $suffix = $1;
|
||||
check_lib(
|
||||
lib => "boost_system$suffix",
|
||||
INC => join(' ', map "-I$_", @INC, @boost_include),
|
||||
LIBS => "-L$path",
|
||||
) or next;
|
||||
|
||||
push @INC, (map " -I$_", @boost_include); # TODO: only use the one related to the chosen lib path
|
||||
push @LIBS, " -L$path", (map " -lboost_$_$suffix", qw(thread system)); # we need these
|
||||
push @cflags, '-DBOOST_LIBS';
|
||||
$have_boost = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
die <<'EOF' if !$have_boost;
|
||||
Slic3r requires the Boost libraries. Please make sure they are installed.
|
||||
|
||||
If they are installed, this script should be able to locate them in several
|
||||
standard locations. If this is not the case, you might want to supply their
|
||||
path through the BOOST_DIR environment variable:
|
||||
|
||||
BOOST_DIR=/path/to/boost perl Build.PL
|
||||
|
||||
EOF
|
||||
|
||||
if ($ENV{SLIC3R_DEBUG}) {
|
||||
# only on newer GCCs: -ftemplate-backtrace-limit=0
|
||||
push @cflags, qw(-DSLIC3R_DEBUG -g);
|
||||
|
@ -40,7 +103,8 @@ my $build = Module::Build::WithXSpp->new(
|
|||
Module::Build 0.38
|
||||
Module::Build::WithXSpp 0.13
|
||||
)},
|
||||
extra_compiler_flags => \@cflags,
|
||||
extra_compiler_flags => [ @INC, @cflags ],
|
||||
extra_linker_flags => \@LIBS,
|
||||
|
||||
# Provides extra C typemaps that are auto-merged
|
||||
extra_typemap_modules => {
|
||||
|
@ -52,7 +116,8 @@ my $build = Module::Build::WithXSpp->new(
|
|||
cstring
|
||||
cstdlib
|
||||
ostream
|
||||
sstream
|
||||
sstream
|
||||
libslic3r/GCodeSender.hpp
|
||||
)]
|
||||
);
|
||||
|
||||
|
|
1645
xs/MANIFEST
|
@ -71,3 +71,5 @@
|
|||
|
||||
# Avoid archives of this distribution
|
||||
\bSlic3r-XS-[\d\.\_]+
|
||||
|
||||
^assertlib
|
||||
|
|
|
@ -1,181 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost aligned_storage.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003
|
||||
// Eric Friedman, Itay Maman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_ALIGNED_STORAGE_HPP
|
||||
#define BOOST_ALIGNED_STORAGE_HPP
|
||||
|
||||
#include <cstddef> // for std::size_t
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/detail/workaround.hpp"
|
||||
#include "boost/type_traits/alignment_of.hpp"
|
||||
#include "boost/type_traits/type_with_alignment.hpp"
|
||||
#include "boost/type_traits/is_pod.hpp"
|
||||
|
||||
#include "boost/mpl/eval_if.hpp"
|
||||
#include "boost/mpl/identity.hpp"
|
||||
|
||||
#include "boost/type_traits/detail/bool_trait_def.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail { namespace aligned_storage {
|
||||
|
||||
BOOST_STATIC_CONSTANT(
|
||||
std::size_t
|
||||
, alignment_of_max_align = ::boost::alignment_of<max_align>::value
|
||||
);
|
||||
|
||||
//
|
||||
// To be TR1 conforming this must be a POD type:
|
||||
//
|
||||
template <
|
||||
std::size_t size_
|
||||
, std::size_t alignment_
|
||||
>
|
||||
struct aligned_storage_imp
|
||||
{
|
||||
union data_t
|
||||
{
|
||||
char buf[size_];
|
||||
|
||||
typename mpl::eval_if_c<
|
||||
alignment_ == std::size_t(-1)
|
||||
, mpl::identity<detail::max_align>
|
||||
, type_with_alignment<alignment_>
|
||||
>::type align_;
|
||||
} data_;
|
||||
void* address() const { return const_cast<aligned_storage_imp*>(this); }
|
||||
};
|
||||
|
||||
template< std::size_t alignment_ >
|
||||
struct aligned_storage_imp<0u,alignment_>
|
||||
{
|
||||
/* intentionally empty */
|
||||
void* address() const { return 0; }
|
||||
};
|
||||
|
||||
}} // namespace detail::aligned_storage
|
||||
|
||||
template <
|
||||
std::size_t size_
|
||||
, std::size_t alignment_ = std::size_t(-1)
|
||||
>
|
||||
class aligned_storage :
|
||||
#ifndef __BORLANDC__
|
||||
private
|
||||
#else
|
||||
public
|
||||
#endif
|
||||
detail::aligned_storage::aligned_storage_imp<size_, alignment_>
|
||||
{
|
||||
|
||||
public: // constants
|
||||
|
||||
typedef detail::aligned_storage::aligned_storage_imp<size_, alignment_> type;
|
||||
|
||||
BOOST_STATIC_CONSTANT(
|
||||
std::size_t
|
||||
, size = size_
|
||||
);
|
||||
BOOST_STATIC_CONSTANT(
|
||||
std::size_t
|
||||
, alignment = (
|
||||
alignment_ == std::size_t(-1)
|
||||
? ::boost::detail::aligned_storage::alignment_of_max_align
|
||||
: alignment_
|
||||
)
|
||||
);
|
||||
|
||||
#if defined(__GNUC__) &&\
|
||||
(__GNUC__ > 3) ||\
|
||||
(__GNUC__ == 3 && (__GNUC_MINOR__ > 2 ||\
|
||||
(__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >=3)))
|
||||
|
||||
private: // noncopyable
|
||||
|
||||
aligned_storage(const aligned_storage&);
|
||||
aligned_storage& operator=(const aligned_storage&);
|
||||
|
||||
#else // gcc less than 3.2.3
|
||||
|
||||
public: // _should_ be noncopyable, but GCC compiler emits error
|
||||
|
||||
aligned_storage(const aligned_storage&);
|
||||
aligned_storage& operator=(const aligned_storage&);
|
||||
|
||||
#endif // gcc < 3.2.3 workaround
|
||||
|
||||
public: // structors
|
||||
|
||||
aligned_storage()
|
||||
{
|
||||
}
|
||||
|
||||
~aligned_storage()
|
||||
{
|
||||
}
|
||||
|
||||
public: // accessors
|
||||
|
||||
void* address()
|
||||
{
|
||||
return static_cast<type*>(this)->address();
|
||||
}
|
||||
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
|
||||
const void* address() const
|
||||
{
|
||||
return static_cast<const type*>(this)->address();
|
||||
}
|
||||
|
||||
#else // MSVC6
|
||||
|
||||
const void* address() const;
|
||||
|
||||
#endif // MSVC6 workaround
|
||||
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
|
||||
// MSVC6 seems not to like inline functions with const void* returns, so we
|
||||
// declare the following here:
|
||||
|
||||
template <std::size_t S, std::size_t A>
|
||||
const void* aligned_storage<S,A>::address() const
|
||||
{
|
||||
return const_cast< aligned_storage<S,A>* >(this)->address();
|
||||
}
|
||||
|
||||
#endif // MSVC6 workaround
|
||||
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
//
|
||||
// Make sure that is_pod recognises aligned_storage<>::type
|
||||
// as a POD (Note that aligned_storage<> itself is not a POD):
|
||||
//
|
||||
template <std::size_t size_, std::size_t alignment_>
|
||||
struct is_pod<boost::detail::aligned_storage::aligned_storage_imp<size_,alignment_> >
|
||||
BOOST_TT_AUX_BOOL_C_BASE(true)
|
||||
{
|
||||
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true)
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include "boost/type_traits/detail/bool_trait_undef.hpp"
|
||||
|
||||
#endif // BOOST_ALIGNED_STORAGE_HPP
|
|
@ -1,446 +0,0 @@
|
|||
/* The following code declares class array,
|
||||
* an STL container (as wrapper) for arrays of constant size.
|
||||
*
|
||||
* See
|
||||
* http://www.boost.org/libs/array/
|
||||
* for documentation.
|
||||
*
|
||||
* The original author site is at: http://www.josuttis.com/
|
||||
*
|
||||
* (C) Copyright Nicolai M. Josuttis 2001.
|
||||
*
|
||||
* 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)
|
||||
*
|
||||
* 14 Apr 2012 - (mtc) Added support for boost::hash
|
||||
* 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility.
|
||||
* 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
|
||||
* See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
|
||||
* Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
|
||||
* 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow)
|
||||
* 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis)
|
||||
* 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
|
||||
* 05 Aug 2001 - minor update (Nico Josuttis)
|
||||
* 20 Jan 2001 - STLport fix (Beman Dawes)
|
||||
* 29 Sep 2000 - Initial Revision (Nico Josuttis)
|
||||
*
|
||||
* Jan 29, 2004
|
||||
*/
|
||||
#ifndef BOOST_ARRAY_HPP
|
||||
#define BOOST_ARRAY_HPP
|
||||
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe
|
||||
# pragma warning(disable:4510) // boost::array<T,N>' : default constructor could not be generated
|
||||
# pragma warning(disable:4610) // warning C4610: class 'boost::array<T,N>' can never be instantiated - user defined constructor required
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <stdexcept>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/swap.hpp>
|
||||
|
||||
// Handles broken standard libraries better than <iterator>
|
||||
#include <boost/detail/iterator.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/functional/hash_fwd.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
// FIXES for broken compilers
|
||||
#include <boost/config.hpp>
|
||||
|
||||
|
||||
namespace boost {
|
||||
|
||||
template<class T, std::size_t N>
|
||||
class array {
|
||||
public:
|
||||
T elems[N]; // fixed-size array of elements of type T
|
||||
|
||||
public:
|
||||
// type definitions
|
||||
typedef T value_type;
|
||||
typedef T* iterator;
|
||||
typedef const T* const_iterator;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
// iterator support
|
||||
iterator begin() { return elems; }
|
||||
const_iterator begin() const { return elems; }
|
||||
const_iterator cbegin() const { return elems; }
|
||||
|
||||
iterator end() { return elems+N; }
|
||||
const_iterator end() const { return elems+N; }
|
||||
const_iterator cend() const { return elems+N; }
|
||||
|
||||
// reverse iterator support
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
|
||||
// workaround for broken reverse_iterator in VC7
|
||||
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
|
||||
reference, iterator, reference> > reverse_iterator;
|
||||
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
|
||||
const_reference, iterator, reference> > const_reverse_iterator;
|
||||
#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
|
||||
typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
|
||||
value_type, reference, iterator, difference_type> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
|
||||
value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
|
||||
#else
|
||||
// workaround for broken reverse_iterator implementations
|
||||
typedef std::reverse_iterator<iterator,T> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
|
||||
#endif
|
||||
|
||||
reverse_iterator rbegin() { return reverse_iterator(end()); }
|
||||
const_reverse_iterator rbegin() const {
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
const_reverse_iterator crbegin() const {
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
|
||||
reverse_iterator rend() { return reverse_iterator(begin()); }
|
||||
const_reverse_iterator rend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
const_reverse_iterator crend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
|
||||
// operator[]
|
||||
reference operator[](size_type i)
|
||||
{
|
||||
BOOST_ASSERT_MSG( i < N, "out of range" );
|
||||
return elems[i];
|
||||
}
|
||||
|
||||
const_reference operator[](size_type i) const
|
||||
{
|
||||
BOOST_ASSERT_MSG( i < N, "out of range" );
|
||||
return elems[i];
|
||||
}
|
||||
|
||||
// at() with range check
|
||||
reference at(size_type i) { rangecheck(i); return elems[i]; }
|
||||
const_reference at(size_type i) const { rangecheck(i); return elems[i]; }
|
||||
|
||||
// front() and back()
|
||||
reference front()
|
||||
{
|
||||
return elems[0];
|
||||
}
|
||||
|
||||
const_reference front() const
|
||||
{
|
||||
return elems[0];
|
||||
}
|
||||
|
||||
reference back()
|
||||
{
|
||||
return elems[N-1];
|
||||
}
|
||||
|
||||
const_reference back() const
|
||||
{
|
||||
return elems[N-1];
|
||||
}
|
||||
|
||||
// size is constant
|
||||
static size_type size() { return N; }
|
||||
static bool empty() { return false; }
|
||||
static size_type max_size() { return N; }
|
||||
enum { static_size = N };
|
||||
|
||||
// swap (note: linear complexity)
|
||||
void swap (array<T,N>& y) {
|
||||
for (size_type i = 0; i < N; ++i)
|
||||
boost::swap(elems[i],y.elems[i]);
|
||||
}
|
||||
|
||||
// direct access to data (read-only)
|
||||
const T* data() const { return elems; }
|
||||
T* data() { return elems; }
|
||||
|
||||
// use array as C array (direct read/write access to data)
|
||||
T* c_array() { return elems; }
|
||||
|
||||
// assignment with type conversion
|
||||
template <typename T2>
|
||||
array<T,N>& operator= (const array<T2,N>& rhs) {
|
||||
std::copy(rhs.begin(),rhs.end(), begin());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// assign one value to all elements
|
||||
void assign (const T& value) { fill ( value ); } // A synonym for fill
|
||||
void fill (const T& value)
|
||||
{
|
||||
std::fill_n(begin(),size(),value);
|
||||
}
|
||||
|
||||
// check range (may be private because it is static)
|
||||
static void rangecheck (size_type i) {
|
||||
if (i >= size()) {
|
||||
std::out_of_range e("array<>: index out of range");
|
||||
boost::throw_exception(e);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
template< class T >
|
||||
class array< T, 0 > {
|
||||
|
||||
public:
|
||||
// type definitions
|
||||
typedef T value_type;
|
||||
typedef T* iterator;
|
||||
typedef const T* const_iterator;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
// iterator support
|
||||
iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); }
|
||||
const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
|
||||
const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
|
||||
|
||||
iterator end() { return begin(); }
|
||||
const_iterator end() const { return begin(); }
|
||||
const_iterator cend() const { return cbegin(); }
|
||||
|
||||
// reverse iterator support
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
|
||||
// workaround for broken reverse_iterator in VC7
|
||||
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
|
||||
reference, iterator, reference> > reverse_iterator;
|
||||
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
|
||||
const_reference, iterator, reference> > const_reverse_iterator;
|
||||
#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
|
||||
typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
|
||||
value_type, reference, iterator, difference_type> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
|
||||
value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
|
||||
#else
|
||||
// workaround for broken reverse_iterator implementations
|
||||
typedef std::reverse_iterator<iterator,T> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
|
||||
#endif
|
||||
|
||||
reverse_iterator rbegin() { return reverse_iterator(end()); }
|
||||
const_reverse_iterator rbegin() const {
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
const_reverse_iterator crbegin() const {
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
|
||||
reverse_iterator rend() { return reverse_iterator(begin()); }
|
||||
const_reverse_iterator rend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
const_reverse_iterator crend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
|
||||
// operator[]
|
||||
reference operator[](size_type /*i*/)
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
const_reference operator[](size_type /*i*/) const
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
// at() with range check
|
||||
reference at(size_type /*i*/) { return failed_rangecheck(); }
|
||||
const_reference at(size_type /*i*/) const { return failed_rangecheck(); }
|
||||
|
||||
// front() and back()
|
||||
reference front()
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
const_reference front() const
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
reference back()
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
const_reference back() const
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
// size is constant
|
||||
static size_type size() { return 0; }
|
||||
static bool empty() { return true; }
|
||||
static size_type max_size() { return 0; }
|
||||
enum { static_size = 0 };
|
||||
|
||||
void swap (array<T,0>& /*y*/) {
|
||||
}
|
||||
|
||||
// direct access to data (read-only)
|
||||
const T* data() const { return 0; }
|
||||
T* data() { return 0; }
|
||||
|
||||
// use array as C array (direct read/write access to data)
|
||||
T* c_array() { return 0; }
|
||||
|
||||
// assignment with type conversion
|
||||
template <typename T2>
|
||||
array<T,0>& operator= (const array<T2,0>& ) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
// assign one value to all elements
|
||||
void assign (const T& value) { fill ( value ); }
|
||||
void fill (const T& ) {}
|
||||
|
||||
// check range (may be private because it is static)
|
||||
static reference failed_rangecheck () {
|
||||
std::out_of_range e("attempt to access element of an empty array");
|
||||
boost::throw_exception(e);
|
||||
#if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__))
|
||||
//
|
||||
// We need to return something here to keep
|
||||
// some compilers happy: however we will never
|
||||
// actually get here....
|
||||
//
|
||||
static T placeholder;
|
||||
return placeholder;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
// comparisons
|
||||
template<class T, std::size_t N>
|
||||
bool operator== (const array<T,N>& x, const array<T,N>& y) {
|
||||
return std::equal(x.begin(), x.end(), y.begin());
|
||||
}
|
||||
template<class T, std::size_t N>
|
||||
bool operator< (const array<T,N>& x, const array<T,N>& y) {
|
||||
return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
|
||||
}
|
||||
template<class T, std::size_t N>
|
||||
bool operator!= (const array<T,N>& x, const array<T,N>& y) {
|
||||
return !(x==y);
|
||||
}
|
||||
template<class T, std::size_t N>
|
||||
bool operator> (const array<T,N>& x, const array<T,N>& y) {
|
||||
return y<x;
|
||||
}
|
||||
template<class T, std::size_t N>
|
||||
bool operator<= (const array<T,N>& x, const array<T,N>& y) {
|
||||
return !(y<x);
|
||||
}
|
||||
template<class T, std::size_t N>
|
||||
bool operator>= (const array<T,N>& x, const array<T,N>& y) {
|
||||
return !(x<y);
|
||||
}
|
||||
|
||||
// global swap()
|
||||
template<class T, std::size_t N>
|
||||
inline void swap (array<T,N>& x, array<T,N>& y) {
|
||||
x.swap(y);
|
||||
}
|
||||
|
||||
#if defined(__SUNPRO_CC)
|
||||
// Trac ticket #4757; the Sun Solaris compiler can't handle
|
||||
// syntax like 'T(&get_c_array(boost::array<T,N>& arg))[N]'
|
||||
//
|
||||
// We can't just use this for all compilers, because the
|
||||
// borland compilers can't handle this form.
|
||||
namespace detail {
|
||||
template <typename T, std::size_t N> struct c_array
|
||||
{
|
||||
typedef T type[N];
|
||||
};
|
||||
}
|
||||
|
||||
// Specific for boost::array: simply returns its elems data member.
|
||||
template <typename T, std::size_t N>
|
||||
typename detail::c_array<T,N>::type& get_c_array(boost::array<T,N>& arg)
|
||||
{
|
||||
return arg.elems;
|
||||
}
|
||||
|
||||
// Specific for boost::array: simply returns its elems data member.
|
||||
template <typename T, std::size_t N>
|
||||
typename const detail::c_array<T,N>::type& get_c_array(const boost::array<T,N>& arg)
|
||||
{
|
||||
return arg.elems;
|
||||
}
|
||||
#else
|
||||
// Specific for boost::array: simply returns its elems data member.
|
||||
template <typename T, std::size_t N>
|
||||
T(&get_c_array(boost::array<T,N>& arg))[N]
|
||||
{
|
||||
return arg.elems;
|
||||
}
|
||||
|
||||
// Const version.
|
||||
template <typename T, std::size_t N>
|
||||
const T(&get_c_array(const boost::array<T,N>& arg))[N]
|
||||
{
|
||||
return arg.elems;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
// Overload for std::array, assuming that std::array will have
|
||||
// explicit conversion functions as discussed at the WG21 meeting
|
||||
// in Summit, March 2009.
|
||||
template <typename T, std::size_t N>
|
||||
T(&get_c_array(std::array<T,N>& arg))[N]
|
||||
{
|
||||
return static_cast<T(&)[N]>(arg);
|
||||
}
|
||||
|
||||
// Const version.
|
||||
template <typename T, std::size_t N>
|
||||
const T(&get_c_array(const std::array<T,N>& arg))[N]
|
||||
{
|
||||
return static_cast<T(&)[N]>(arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
template<class T, std::size_t N>
|
||||
std::size_t hash_value(const array<T,N>& arr)
|
||||
{
|
||||
return boost::hash_range(arr.begin(), arr.end());
|
||||
}
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif /*BOOST_ARRAY_HPP*/
|
|
@ -1,141 +0,0 @@
|
|||
//
|
||||
// boost/assert.hpp - BOOST_ASSERT(expr)
|
||||
// BOOST_ASSERT_MSG(expr, msg)
|
||||
// BOOST_VERIFY(expr)
|
||||
//
|
||||
// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
|
||||
// Copyright (c) 2007 Peter Dimov
|
||||
// Copyright (c) Beman Dawes 2011
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// Note: There are no include guards. This is intentional.
|
||||
//
|
||||
// See http://www.boost.org/libs/utility/assert.html for documentation.
|
||||
//
|
||||
|
||||
//
|
||||
// Stop inspect complaining about use of 'assert':
|
||||
//
|
||||
// boostinspect:naassert_macro
|
||||
//
|
||||
|
||||
//--------------------------------------------------------------------------------------//
|
||||
// BOOST_ASSERT //
|
||||
//--------------------------------------------------------------------------------------//
|
||||
|
||||
#undef BOOST_ASSERT
|
||||
|
||||
#if defined(BOOST_DISABLE_ASSERTS)
|
||||
|
||||
# define BOOST_ASSERT(expr) ((void)0)
|
||||
|
||||
#elif defined(BOOST_ENABLE_ASSERT_HANDLER)
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/current_function.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
void assertion_failed(char const * expr,
|
||||
char const * function, char const * file, long line); // user defined
|
||||
} // namespace boost
|
||||
|
||||
#define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr)) \
|
||||
? ((void)0) \
|
||||
: ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
|
||||
|
||||
#else
|
||||
# include <assert.h> // .h to support old libraries w/o <cassert> - effect is the same
|
||||
# define BOOST_ASSERT(expr) assert(expr)
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------------------//
|
||||
// BOOST_ASSERT_MSG //
|
||||
//--------------------------------------------------------------------------------------//
|
||||
|
||||
# undef BOOST_ASSERT_MSG
|
||||
|
||||
#if defined(BOOST_DISABLE_ASSERTS) || defined(NDEBUG)
|
||||
|
||||
#define BOOST_ASSERT_MSG(expr, msg) ((void)0)
|
||||
|
||||
#elif defined(BOOST_ENABLE_ASSERT_HANDLER)
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/current_function.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
void assertion_failed_msg(char const * expr, char const * msg,
|
||||
char const * function, char const * file, long line); // user defined
|
||||
} // namespace boost
|
||||
|
||||
#define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr)) \
|
||||
? ((void)0) \
|
||||
: ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
|
||||
|
||||
#else
|
||||
#ifndef BOOST_ASSERT_HPP
|
||||
#define BOOST_ASSERT_HPP
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/current_function.hpp>
|
||||
|
||||
// IDE's like Visual Studio perform better if output goes to std::cout or
|
||||
// some other stream, so allow user to configure output stream:
|
||||
#ifndef BOOST_ASSERT_MSG_OSTREAM
|
||||
# define BOOST_ASSERT_MSG_OSTREAM std::cerr
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace assertion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
// Note: The template is needed to make the function non-inline and avoid linking errors
|
||||
template< typename CharT >
|
||||
BOOST_NOINLINE void assertion_failed_msg(CharT const * expr, char const * msg, char const * function,
|
||||
char const * file, long line)
|
||||
{
|
||||
BOOST_ASSERT_MSG_OSTREAM
|
||||
<< "***** Internal Program Error - assertion (" << expr << ") failed in "
|
||||
<< function << ":\n"
|
||||
<< file << '(' << line << "): " << msg << std::endl;
|
||||
#ifdef UNDER_CE
|
||||
// The Windows CE CRT library does not have abort() so use exit(-1) instead.
|
||||
std::exit(-1);
|
||||
#else
|
||||
std::abort();
|
||||
#endif
|
||||
}
|
||||
} // detail
|
||||
} // assertion
|
||||
} // detail
|
||||
#endif
|
||||
|
||||
#define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr)) \
|
||||
? ((void)0) \
|
||||
: ::boost::assertion::detail::assertion_failed_msg(#expr, msg, \
|
||||
BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------------------//
|
||||
// BOOST_VERIFY //
|
||||
//--------------------------------------------------------------------------------------//
|
||||
|
||||
#undef BOOST_VERIFY
|
||||
|
||||
#if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) )
|
||||
|
||||
# define BOOST_VERIFY(expr) ((void)(expr))
|
||||
|
||||
#else
|
||||
|
||||
# define BOOST_VERIFY(expr) BOOST_ASSERT(expr)
|
||||
|
||||
#endif
|
|
@ -1,24 +0,0 @@
|
|||
#ifndef BOOST_BIND_HPP_INCLUDED
|
||||
#define BOOST_BIND_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//
|
||||
// bind.hpp - binds function objects to arguments
|
||||
//
|
||||
// Copyright (c) 2009 Peter Dimov
|
||||
//
|
||||
// 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/bind/bind.html for documentation.
|
||||
//
|
||||
|
||||
#include <boost/bind/bind.hpp>
|
||||
|
||||
#endif // #ifndef BOOST_BIND_HPP_INCLUDED
|
|
@ -1,62 +0,0 @@
|
|||
#ifndef BOOST_BIND_ARG_HPP_INCLUDED
|
||||
#define BOOST_BIND_ARG_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//
|
||||
// bind/arg.hpp
|
||||
//
|
||||
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
|
||||
//
|
||||
// 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/bind/bind.html for documentation.
|
||||
//
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/is_placeholder.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
template< int I > struct arg
|
||||
{
|
||||
arg()
|
||||
{
|
||||
}
|
||||
|
||||
template< class T > arg( T const & /* t */ )
|
||||
{
|
||||
// static assert I == is_placeholder<T>::value
|
||||
typedef char T_must_be_placeholder[ I == is_placeholder<T>::value? 1: -1 ];
|
||||
}
|
||||
};
|
||||
|
||||
template< int I > bool operator==( arg<I> const &, arg<I> const & )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template< int I > struct is_placeholder< arg<I> >
|
||||
{
|
||||
enum _vt { value = I };
|
||||
};
|
||||
|
||||
template< int I > struct is_placeholder< arg<I> (*) () >
|
||||
{
|
||||
enum _vt { value = I };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED
|
|
@ -1,117 +0,0 @@
|
|||
//
|
||||
// bind/bind_cc.hpp - support for different calling conventions
|
||||
//
|
||||
// Do not include this header directly.
|
||||
//
|
||||
// Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
|
||||
//
|
||||
// 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/bind/bind.html for documentation.
|
||||
//
|
||||
|
||||
template<class R>
|
||||
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (), _bi::list0>
|
||||
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ())
|
||||
{
|
||||
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) ();
|
||||
typedef _bi::list0 list_type;
|
||||
return _bi::bind_t<R, F, list_type> (f, list_type());
|
||||
}
|
||||
|
||||
template<class R, class B1, class A1>
|
||||
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1), typename _bi::list_av_1<A1>::type>
|
||||
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1)
|
||||
{
|
||||
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1);
|
||||
typedef typename _bi::list_av_1<A1>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type> (f, list_type(a1));
|
||||
}
|
||||
|
||||
template<class R, class B1, class B2, class A1, class A2>
|
||||
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2), typename _bi::list_av_2<A1, A2>::type>
|
||||
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2)
|
||||
{
|
||||
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2);
|
||||
typedef typename _bi::list_av_2<A1, A2>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
|
||||
}
|
||||
|
||||
template<class R,
|
||||
class B1, class B2, class B3,
|
||||
class A1, class A2, class A3>
|
||||
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3), typename _bi::list_av_3<A1, A2, A3>::type>
|
||||
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3)
|
||||
{
|
||||
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3);
|
||||
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
|
||||
}
|
||||
|
||||
template<class R,
|
||||
class B1, class B2, class B3, class B4,
|
||||
class A1, class A2, class A3, class A4>
|
||||
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4), typename _bi::list_av_4<A1, A2, A3, A4>::type>
|
||||
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4)
|
||||
{
|
||||
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4);
|
||||
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
|
||||
}
|
||||
|
||||
template<class R,
|
||||
class B1, class B2, class B3, class B4, class B5,
|
||||
class A1, class A2, class A3, class A4, class A5>
|
||||
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5), typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
|
||||
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
|
||||
{
|
||||
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5);
|
||||
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
|
||||
}
|
||||
|
||||
template<class R,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6>
|
||||
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6), typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
|
||||
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
|
||||
{
|
||||
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6);
|
||||
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
|
||||
}
|
||||
|
||||
template<class R,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
|
||||
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7), typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
|
||||
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
|
||||
{
|
||||
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7);
|
||||
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
|
||||
}
|
||||
|
||||
template<class R,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
|
||||
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8), typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
|
||||
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
|
||||
{
|
||||
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8);
|
||||
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
|
||||
}
|
||||
|
||||
template<class R,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B9,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
|
||||
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8, B9), typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
|
||||
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
|
||||
{
|
||||
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9);
|
||||
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
||||
}
|
|
@ -1,228 +0,0 @@
|
|||
//
|
||||
// bind/bind_mf2_cc.hpp - member functions, type<> syntax
|
||||
//
|
||||
// Do not include this header directly.
|
||||
//
|
||||
// Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
|
||||
// Copyright (c) 2008 Peter Dimov
|
||||
//
|
||||
// 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/bind/bind.html for documentation.
|
||||
//
|
||||
|
||||
// 0
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class A1>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
|
||||
typedef typename _bi::list_av_1<A1>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class A1>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
|
||||
typedef typename _bi::list_av_1<A1>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
|
||||
}
|
||||
|
||||
// 1
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1,
|
||||
class A1, class A2>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
|
||||
typedef typename _bi::list_av_2<A1, A2>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1,
|
||||
class A1, class A2>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
|
||||
typedef typename _bi::list_av_2<A1, A2>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
|
||||
}
|
||||
|
||||
// 2
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2,
|
||||
class A1, class A2, class A3>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
|
||||
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2,
|
||||
class A1, class A2, class A3>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
|
||||
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
|
||||
}
|
||||
|
||||
// 3
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3,
|
||||
class A1, class A2, class A3, class A4>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
|
||||
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3,
|
||||
class A1, class A2, class A3, class A4>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
|
||||
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
|
||||
}
|
||||
|
||||
// 4
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4,
|
||||
class A1, class A2, class A3, class A4, class A5>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
|
||||
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4,
|
||||
class A1, class A2, class A3, class A4, class A5>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
|
||||
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
|
||||
}
|
||||
|
||||
// 5
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
|
||||
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
|
||||
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
|
||||
}
|
||||
|
||||
// 6
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
|
||||
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
|
||||
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
|
||||
}
|
||||
|
||||
// 7
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
|
||||
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
|
||||
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
|
||||
}
|
||||
|
||||
// 8
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
|
||||
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
||||
}
|
||||
|
||||
template<class Rt2, class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
|
||||
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
|
||||
BOOST_BIND(boost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
|
||||
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
|
||||
return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
||||
}
|
|
@ -1,227 +0,0 @@
|
|||
//
|
||||
// bind/bind_mf_cc.hpp - support for different calling conventions
|
||||
//
|
||||
// Do not include this header directly.
|
||||
//
|
||||
// Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
|
||||
//
|
||||
// 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/bind/bind.html for documentation.
|
||||
//
|
||||
|
||||
// 0
|
||||
|
||||
template<class R, class T,
|
||||
class A1>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
|
||||
typedef typename _bi::list_av_1<A1>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1));
|
||||
}
|
||||
|
||||
template<class R, class T,
|
||||
class A1>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
|
||||
typedef typename _bi::list_av_1<A1>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1));
|
||||
}
|
||||
|
||||
// 1
|
||||
|
||||
template<class R, class T,
|
||||
class B1,
|
||||
class A1, class A2>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
|
||||
typedef typename _bi::list_av_2<A1, A2>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2));
|
||||
}
|
||||
|
||||
template<class R, class T,
|
||||
class B1,
|
||||
class A1, class A2>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
|
||||
typedef typename _bi::list_av_2<A1, A2>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2));
|
||||
}
|
||||
|
||||
// 2
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2,
|
||||
class A1, class A2, class A3>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
|
||||
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3));
|
||||
}
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2,
|
||||
class A1, class A2, class A3>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
|
||||
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3));
|
||||
}
|
||||
|
||||
// 3
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3,
|
||||
class A1, class A2, class A3, class A4>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
|
||||
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4));
|
||||
}
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3,
|
||||
class A1, class A2, class A3, class A4>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
|
||||
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4));
|
||||
}
|
||||
|
||||
// 4
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3, class B4,
|
||||
class A1, class A2, class A3, class A4, class A5>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
|
||||
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
|
||||
}
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3, class B4,
|
||||
class A1, class A2, class A3, class A4, class A5>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
|
||||
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
|
||||
}
|
||||
|
||||
// 5
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
|
||||
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
|
||||
}
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
|
||||
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
|
||||
}
|
||||
|
||||
// 6
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
|
||||
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
|
||||
}
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
|
||||
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
|
||||
}
|
||||
|
||||
// 7
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
|
||||
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
|
||||
}
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
|
||||
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
|
||||
}
|
||||
|
||||
// 8
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
|
||||
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
||||
}
|
||||
|
||||
template<class R, class T,
|
||||
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
|
||||
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
|
||||
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
|
||||
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
|
||||
{
|
||||
typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
|
||||
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
|
||||
return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
||||
}
|
|
@ -1,345 +0,0 @@
|
|||
//
|
||||
// bind/bind_template.hpp
|
||||
//
|
||||
// Do not include this header directly.
|
||||
//
|
||||
// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd.
|
||||
//
|
||||
// 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/bind/bind.html for documentation.
|
||||
//
|
||||
|
||||
typedef typename result_traits<R, F>::type result_type;
|
||||
|
||||
result_type operator()()
|
||||
{
|
||||
list0 a;
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
result_type operator()() const
|
||||
{
|
||||
list0 a;
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1> result_type operator()(A1 & a1)
|
||||
{
|
||||
list1<A1 &> a(a1);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1> result_type operator()(A1 & a1) const
|
||||
{
|
||||
list1<A1 &> a(a1);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
|
||||
&& !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
template<class A1> result_type operator()(A1 const & a1)
|
||||
{
|
||||
list1<A1 const &> a(a1);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1> result_type operator()(A1 const & a1) const
|
||||
{
|
||||
list1<A1 const &> a(a1);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class A1, class A2> result_type operator()(A1 & a1, A2 & a2)
|
||||
{
|
||||
list2<A1 &, A2 &> a(a1, a2);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2> result_type operator()(A1 & a1, A2 & a2) const
|
||||
{
|
||||
list2<A1 &, A2 &> a(a1, a2);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
|
||||
&& !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
template<class A1, class A2> result_type operator()(A1 const & a1, A2 & a2)
|
||||
{
|
||||
list2<A1 const &, A2 &> a(a1, a2);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2> result_type operator()(A1 const & a1, A2 & a2) const
|
||||
{
|
||||
list2<A1 const &, A2 &> a(a1, a2);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
|
||||
template<class A1, class A2> result_type operator()(A1 & a1, A2 const & a2)
|
||||
{
|
||||
list2<A1 &, A2 const &> a(a1, a2);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2> result_type operator()(A1 & a1, A2 const & a2) const
|
||||
{
|
||||
list2<A1 &, A2 const &> a(a1, a2);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
|
||||
template<class A1, class A2> result_type operator()(A1 const & a1, A2 const & a2)
|
||||
{
|
||||
list2<A1 const &, A2 const &> a(a1, a2);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2> result_type operator()(A1 const & a1, A2 const & a2) const
|
||||
{
|
||||
list2<A1 const &, A2 const &> a(a1, a2);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class A1, class A2, class A3> result_type operator()(A1 & a1, A2 & a2, A3 & a3)
|
||||
{
|
||||
list3<A1 &, A2 &, A3 &> a(a1, a2, a3);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3> result_type operator()(A1 & a1, A2 & a2, A3 & a3) const
|
||||
{
|
||||
list3<A1 &, A2 &, A3 &> a(a1, a2, a3);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
|
||||
&& !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
template<class A1, class A2, class A3> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3)
|
||||
{
|
||||
list3<A1 const &, A2 const &, A3 const &> a(a1, a2, a3);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const
|
||||
{
|
||||
list3<A1 const &, A2 const &, A3 const &> a(a1, a2, a3);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class A1, class A2, class A3, class A4> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4)
|
||||
{
|
||||
list4<A1 &, A2 &, A3 &, A4 &> a(a1, a2, a3, a4);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const
|
||||
{
|
||||
list4<A1 &, A2 &, A3 &, A4 &> a(a1, a2, a3, a4);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
|
||||
&& !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
template<class A1, class A2, class A3, class A4> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4)
|
||||
{
|
||||
list4<A1 const &, A2 const &, A3 const &, A4 const &> a(a1, a2, a3, a4);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const
|
||||
{
|
||||
list4<A1 const &, A2 const &, A3 const &, A4 const &> a(a1, a2, a3, a4);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5)
|
||||
{
|
||||
list5<A1 &, A2 &, A3 &, A4 &, A5 &> a(a1, a2, a3, a4, a5);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const
|
||||
{
|
||||
list5<A1 &, A2 &, A3 &, A4 &, A5 &> a(a1, a2, a3, a4, a5);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
|
||||
&& !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5)
|
||||
{
|
||||
list5<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &> a(a1, a2, a3, a4, a5);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const
|
||||
{
|
||||
list5<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &> a(a1, a2, a3, a4, a5);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6)
|
||||
{
|
||||
list6<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &> a(a1, a2, a3, a4, a5, a6);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const
|
||||
{
|
||||
list6<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &> a(a1, a2, a3, a4, a5, a6);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
|
||||
&& !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6)
|
||||
{
|
||||
list6<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &> a(a1, a2, a3, a4, a5, a6);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const
|
||||
{
|
||||
list6<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &> a(a1, a2, a3, a4, a5, a6);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7)
|
||||
{
|
||||
list7<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &> a(a1, a2, a3, a4, a5, a6, a7);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const
|
||||
{
|
||||
list7<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &> a(a1, a2, a3, a4, a5, a6, a7);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
|
||||
&& !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7)
|
||||
{
|
||||
list7<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &> a(a1, a2, a3, a4, a5, a6, a7);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const
|
||||
{
|
||||
list7<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &> a(a1, a2, a3, a4, a5, a6, a7);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8)
|
||||
{
|
||||
list8<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &> a(a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const
|
||||
{
|
||||
list8<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &> a(a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
|
||||
&& !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8)
|
||||
{
|
||||
list8<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &> a(a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const
|
||||
{
|
||||
list8<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &> a(a1, a2, a3, a4, a5, a6, a7, a8);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9)
|
||||
{
|
||||
list9<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &, A9 &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const
|
||||
{
|
||||
list9<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &, A9 &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
|
||||
&& !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9)
|
||||
{
|
||||
list9<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &, A9 const &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const
|
||||
{
|
||||
list9<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &, A9 const &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class A> result_type eval(A & a)
|
||||
{
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class A> result_type eval(A & a) const
|
||||
{
|
||||
BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
|
||||
}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ )
|
||||
|
||||
using boost::visit_each;
|
||||
|
||||
#endif
|
||||
BOOST_BIND_VISIT_EACH(v, f_, 0);
|
||||
l_.accept(v);
|
||||
}
|
||||
|
||||
bool compare(this_type const & rhs) const
|
||||
{
|
||||
return ref_compare(f_, rhs.f_, 0) && l_ == rhs.l_;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
F f_;
|
||||
L l_;
|
|
@ -1,389 +0,0 @@
|
|||
#ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED
|
||||
#define BOOST_BIND_MEM_FN_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//
|
||||
// mem_fn.hpp - a generalization of std::mem_fun[_ref]
|
||||
//
|
||||
// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
|
||||
// Copyright (c) 2001 David Abrahams
|
||||
// Copyright (c) 2003-2005 Peter Dimov
|
||||
//
|
||||
// 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/bind/mem_fn.html for documentation.
|
||||
//
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/get_pointer.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#if defined(BOOST_NO_VOID_RETURNS)
|
||||
|
||||
#define BOOST_MEM_FN_CLASS_F , class F
|
||||
#define BOOST_MEM_FN_TYPEDEF(X)
|
||||
|
||||
namespace _mfi // mem_fun_impl
|
||||
{
|
||||
|
||||
template<class V> struct mf
|
||||
{
|
||||
|
||||
#define BOOST_MEM_FN_RETURN return
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) inner_##X
|
||||
#define BOOST_MEM_FN_CC
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_CDECL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl
|
||||
#define BOOST_MEM_FN_CC __cdecl
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_STDCALL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall
|
||||
#define BOOST_MEM_FN_CC __stdcall
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_FASTCALL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall
|
||||
#define BOOST_MEM_FN_CC __fastcall
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#endif
|
||||
|
||||
#undef BOOST_MEM_FN_RETURN
|
||||
|
||||
}; // struct mf<V>
|
||||
|
||||
template<> struct mf<void>
|
||||
{
|
||||
|
||||
#define BOOST_MEM_FN_RETURN
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) inner_##X
|
||||
#define BOOST_MEM_FN_CC
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_CDECL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl
|
||||
#define BOOST_MEM_FN_CC __cdecl
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_STDCALL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall
|
||||
#define BOOST_MEM_FN_CC __stdcall
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_FASTCALL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall
|
||||
#define BOOST_MEM_FN_CC __fastcall
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#endif
|
||||
|
||||
#undef BOOST_MEM_FN_RETURN
|
||||
|
||||
}; // struct mf<void>
|
||||
|
||||
#undef BOOST_MEM_FN_CLASS_F
|
||||
#undef BOOST_MEM_FN_TYPEDEF_F
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X
|
||||
#define BOOST_MEM_FN_NAME2(X) inner_##X
|
||||
#define BOOST_MEM_FN_CC
|
||||
|
||||
#include <boost/bind/mem_fn_vw.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
#undef BOOST_MEM_FN_NAME2
|
||||
#undef BOOST_MEM_FN_CC
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_CDECL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X##_cdecl
|
||||
#define BOOST_MEM_FN_NAME2(X) inner_##X##_cdecl
|
||||
#define BOOST_MEM_FN_CC __cdecl
|
||||
|
||||
#include <boost/bind/mem_fn_vw.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
#undef BOOST_MEM_FN_NAME2
|
||||
#undef BOOST_MEM_FN_CC
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_STDCALL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X##_stdcall
|
||||
#define BOOST_MEM_FN_NAME2(X) inner_##X##_stdcall
|
||||
#define BOOST_MEM_FN_CC __stdcall
|
||||
|
||||
#include <boost/bind/mem_fn_vw.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
#undef BOOST_MEM_FN_NAME2
|
||||
#undef BOOST_MEM_FN_CC
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_FASTCALL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X##_fastcall
|
||||
#define BOOST_MEM_FN_NAME2(X) inner_##X##_fastcall
|
||||
#define BOOST_MEM_FN_CC __fastcall
|
||||
|
||||
#include <boost/bind/mem_fn_vw.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
#undef BOOST_MEM_FN_NAME2
|
||||
#undef BOOST_MEM_FN_CC
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace _mfi
|
||||
|
||||
#else // #ifdef BOOST_NO_VOID_RETURNS
|
||||
|
||||
#define BOOST_MEM_FN_CLASS_F
|
||||
#define BOOST_MEM_FN_TYPEDEF(X) typedef X;
|
||||
|
||||
namespace _mfi
|
||||
{
|
||||
|
||||
#define BOOST_MEM_FN_RETURN return
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X
|
||||
#define BOOST_MEM_FN_CC
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_CDECL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X##_cdecl
|
||||
#define BOOST_MEM_FN_CC __cdecl
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_STDCALL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X##_stdcall
|
||||
#define BOOST_MEM_FN_CC __stdcall
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_FASTCALL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X##_fastcall
|
||||
#define BOOST_MEM_FN_CC __fastcall
|
||||
|
||||
#include <boost/bind/mem_fn_template.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_CC
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
|
||||
#endif
|
||||
|
||||
#undef BOOST_MEM_FN_RETURN
|
||||
|
||||
} // namespace _mfi
|
||||
|
||||
#undef BOOST_MEM_FN_CLASS_F
|
||||
#undef BOOST_MEM_FN_TYPEDEF
|
||||
|
||||
#endif // #ifdef BOOST_NO_VOID_RETURNS
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X
|
||||
#define BOOST_MEM_FN_CC
|
||||
|
||||
#include <boost/bind/mem_fn_cc.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
#undef BOOST_MEM_FN_CC
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_CDECL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X##_cdecl
|
||||
#define BOOST_MEM_FN_CC __cdecl
|
||||
|
||||
#include <boost/bind/mem_fn_cc.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
#undef BOOST_MEM_FN_CC
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_STDCALL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X##_stdcall
|
||||
#define BOOST_MEM_FN_CC __stdcall
|
||||
|
||||
#include <boost/bind/mem_fn_cc.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
#undef BOOST_MEM_FN_CC
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MEM_FN_ENABLE_FASTCALL
|
||||
|
||||
#define BOOST_MEM_FN_NAME(X) X##_fastcall
|
||||
#define BOOST_MEM_FN_CC __fastcall
|
||||
|
||||
#include <boost/bind/mem_fn_cc.hpp>
|
||||
|
||||
#undef BOOST_MEM_FN_NAME
|
||||
#undef BOOST_MEM_FN_CC
|
||||
|
||||
#endif
|
||||
|
||||
// data member support
|
||||
|
||||
namespace _mfi
|
||||
{
|
||||
|
||||
template<class R, class T> class dm
|
||||
{
|
||||
public:
|
||||
|
||||
typedef R const & result_type;
|
||||
typedef T const * argument_type;
|
||||
|
||||
private:
|
||||
|
||||
typedef R (T::*F);
|
||||
F f_;
|
||||
|
||||
template<class U> R const & call(U & u, T const *) const
|
||||
{
|
||||
return (u.*f_);
|
||||
}
|
||||
|
||||
template<class U> R const & call(U & u, void const *) const
|
||||
{
|
||||
return (get_pointer(u)->*f_);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
explicit dm(F f): f_(f) {}
|
||||
|
||||
R & operator()(T * p) const
|
||||
{
|
||||
return (p->*f_);
|
||||
}
|
||||
|
||||
R const & operator()(T const * p) const
|
||||
{
|
||||
return (p->*f_);
|
||||
}
|
||||
|
||||
template<class U> R const & operator()(U const & u) const
|
||||
{
|
||||
return call(u, &u);
|
||||
}
|
||||
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__MWERKS__, < 0x3200)
|
||||
|
||||
R & operator()(T & t) const
|
||||
{
|
||||
return (t.*f_);
|
||||
}
|
||||
|
||||
R const & operator()(T const & t) const
|
||||
{
|
||||
return (t.*f_);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool operator==(dm const & rhs) const
|
||||
{
|
||||
return f_ == rhs.f_;
|
||||
}
|
||||
|
||||
bool operator!=(dm const & rhs) const
|
||||
{
|
||||
return f_ != rhs.f_;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace _mfi
|
||||
|
||||
template<class R, class T> _mfi::dm<R, T> mem_fn(R T::*f)
|
||||
{
|
||||
return _mfi::dm<R, T>(f);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED
|
|
@ -1,103 +0,0 @@
|
|||
//
|
||||
// bind/mem_fn_cc.hpp - support for different calling conventions
|
||||
//
|
||||
// Do not include this header directly.
|
||||
//
|
||||
// Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
|
||||
//
|
||||
// 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/bind/mem_fn.html for documentation.
|
||||
//
|
||||
|
||||
template<class R, class T> _mfi::BOOST_MEM_FN_NAME(mf0)<R, T> mem_fn(R (BOOST_MEM_FN_CC T::*f) ())
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(mf0)<R, T>(f);
|
||||
}
|
||||
|
||||
template<class R, class T> _mfi::BOOST_MEM_FN_NAME(cmf0)<R, T> mem_fn(R (BOOST_MEM_FN_CC T::*f) () const)
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(cmf0)<R, T>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1> _mfi::BOOST_MEM_FN_NAME(mf1)<R, T, A1> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1))
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(mf1)<R, T, A1>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1> _mfi::BOOST_MEM_FN_NAME(cmf1)<R, T, A1> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1) const)
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(cmf1)<R, T, A1>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2> _mfi::BOOST_MEM_FN_NAME(mf2)<R, T, A1, A2> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2))
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(mf2)<R, T, A1, A2>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2> _mfi::BOOST_MEM_FN_NAME(cmf2)<R, T, A1, A2> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2) const)
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(cmf2)<R, T, A1, A2>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3> _mfi::BOOST_MEM_FN_NAME(mf3)<R, T, A1, A2, A3> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3))
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(mf3)<R, T, A1, A2, A3>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3> _mfi::BOOST_MEM_FN_NAME(cmf3)<R, T, A1, A2, A3> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3) const)
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(cmf3)<R, T, A1, A2, A3>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4> _mfi::BOOST_MEM_FN_NAME(mf4)<R, T, A1, A2, A3, A4> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4))
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(mf4)<R, T, A1, A2, A3, A4>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4> _mfi::BOOST_MEM_FN_NAME(cmf4)<R, T, A1, A2, A3, A4> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4) const)
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(cmf4)<R, T, A1, A2, A3, A4>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5> _mfi::BOOST_MEM_FN_NAME(mf5)<R, T, A1, A2, A3, A4, A5> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5))
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(mf5)<R, T, A1, A2, A3, A4, A5>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5> _mfi::BOOST_MEM_FN_NAME(cmf5)<R, T, A1, A2, A3, A4, A5> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5) const)
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(cmf5)<R, T, A1, A2, A3, A4, A5>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6> _mfi::BOOST_MEM_FN_NAME(mf6)<R, T, A1, A2, A3, A4, A5, A6> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6))
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(mf6)<R, T, A1, A2, A3, A4, A5, A6>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6> _mfi::BOOST_MEM_FN_NAME(cmf6)<R, T, A1, A2, A3, A4, A5, A6> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6) const)
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(cmf6)<R, T, A1, A2, A3, A4, A5, A6>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7> _mfi::BOOST_MEM_FN_NAME(mf7)<R, T, A1, A2, A3, A4, A5, A6, A7> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7))
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(mf7)<R, T, A1, A2, A3, A4, A5, A6, A7>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7> _mfi::BOOST_MEM_FN_NAME(cmf7)<R, T, A1, A2, A3, A4, A5, A6, A7> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7) const)
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(cmf7)<R, T, A1, A2, A3, A4, A5, A6, A7>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> _mfi::BOOST_MEM_FN_NAME(mf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8))
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(mf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8>(f);
|
||||
}
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> _mfi::BOOST_MEM_FN_NAME(cmf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8> mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) const)
|
||||
{
|
||||
return _mfi::BOOST_MEM_FN_NAME(cmf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8>(f);
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
//
|
||||
// bind/mem_fn_vw.hpp - void return helper wrappers
|
||||
//
|
||||
// Do not include this header directly
|
||||
//
|
||||
// Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
|
||||
//
|
||||
// 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/bind/mem_fn.html for documentation.
|
||||
//
|
||||
|
||||
template<class R, class T> struct BOOST_MEM_FN_NAME(mf0): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0)<R, T, R (BOOST_MEM_FN_CC T::*) ()>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) ();
|
||||
explicit BOOST_MEM_FN_NAME(mf0)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0)<R, T, F>(f) {}
|
||||
};
|
||||
|
||||
template<class R, class T> struct BOOST_MEM_FN_NAME(cmf0): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0)<R, T, R (BOOST_MEM_FN_CC T::*) () const>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) () const;
|
||||
explicit BOOST_MEM_FN_NAME(cmf0)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0)<R, T, F>(f) {}
|
||||
};
|
||||
|
||||
|
||||
template<class R, class T, class A1> struct BOOST_MEM_FN_NAME(mf1): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1)<R, T, A1, R (BOOST_MEM_FN_CC T::*) (A1)>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1);
|
||||
explicit BOOST_MEM_FN_NAME(mf1)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1)<R, T, A1, F>(f) {}
|
||||
};
|
||||
|
||||
template<class R, class T, class A1> struct BOOST_MEM_FN_NAME(cmf1): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1)<R, T, A1, R (BOOST_MEM_FN_CC T::*) (A1) const>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1) const;
|
||||
explicit BOOST_MEM_FN_NAME(cmf1)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1)<R, T, A1, F>(f) {}
|
||||
};
|
||||
|
||||
|
||||
template<class R, class T, class A1, class A2> struct BOOST_MEM_FN_NAME(mf2): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2)<R, T, A1, A2, R (BOOST_MEM_FN_CC T::*) (A1, A2)>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2);
|
||||
explicit BOOST_MEM_FN_NAME(mf2)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2)<R, T, A1, A2, F>(f) {}
|
||||
};
|
||||
|
||||
template<class R, class T, class A1, class A2> struct BOOST_MEM_FN_NAME(cmf2): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2)<R, T, A1, A2, R (BOOST_MEM_FN_CC T::*) (A1, A2) const>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2) const;
|
||||
explicit BOOST_MEM_FN_NAME(cmf2)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2)<R, T, A1, A2, F>(f) {}
|
||||
};
|
||||
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3> struct BOOST_MEM_FN_NAME(mf3): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3)<R, T, A1, A2, A3, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3)>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3);
|
||||
explicit BOOST_MEM_FN_NAME(mf3)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3)<R, T, A1, A2, A3, F>(f) {}
|
||||
};
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3> struct BOOST_MEM_FN_NAME(cmf3): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3)<R, T, A1, A2, A3, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3) const>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const;
|
||||
explicit BOOST_MEM_FN_NAME(cmf3)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3)<R, T, A1, A2, A3, F>(f) {}
|
||||
};
|
||||
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4> struct BOOST_MEM_FN_NAME(mf4): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4)<R, T, A1, A2, A3, A4, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4)>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4);
|
||||
explicit BOOST_MEM_FN_NAME(mf4)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4)<R, T, A1, A2, A3, A4, F>(f) {}
|
||||
};
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4> struct BOOST_MEM_FN_NAME(cmf4): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4)<R, T, A1, A2, A3, A4, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4) const>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const;
|
||||
explicit BOOST_MEM_FN_NAME(cmf4)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4)<R, T, A1, A2, A3, A4, F>(f) {}
|
||||
};
|
||||
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5> struct BOOST_MEM_FN_NAME(mf5): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5)<R, T, A1, A2, A3, A4, A5, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5)>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5);
|
||||
explicit BOOST_MEM_FN_NAME(mf5)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5)<R, T, A1, A2, A3, A4, A5, F>(f) {}
|
||||
};
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5> struct BOOST_MEM_FN_NAME(cmf5): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5)<R, T, A1, A2, A3, A4, A5, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5) const>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const;
|
||||
explicit BOOST_MEM_FN_NAME(cmf5)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5)<R, T, A1, A2, A3, A4, A5, F>(f) {}
|
||||
};
|
||||
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6> struct BOOST_MEM_FN_NAME(mf6): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6)<R, T, A1, A2, A3, A4, A5, A6, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6)>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6);
|
||||
explicit BOOST_MEM_FN_NAME(mf6)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6)<R, T, A1, A2, A3, A4, A5, A6, F>(f) {}
|
||||
};
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6> struct BOOST_MEM_FN_NAME(cmf6): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6)<R, T, A1, A2, A3, A4, A5, A6, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6) const>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const;
|
||||
explicit BOOST_MEM_FN_NAME(cmf6)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6)<R, T, A1, A2, A3, A4, A5, A6, F>(f) {}
|
||||
};
|
||||
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct BOOST_MEM_FN_NAME(mf7): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7)<R, T, A1, A2, A3, A4, A5, A6, A7, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6, A7)>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7);
|
||||
explicit BOOST_MEM_FN_NAME(mf7)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7)<R, T, A1, A2, A3, A4, A5, A6, A7, F>(f) {}
|
||||
};
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct BOOST_MEM_FN_NAME(cmf7): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7)<R, T, A1, A2, A3, A4, A5, A6, A7, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6, A7) const>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const;
|
||||
explicit BOOST_MEM_FN_NAME(cmf7)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7)<R, T, A1, A2, A3, A4, A5, A6, A7, F>(f) {}
|
||||
};
|
||||
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct BOOST_MEM_FN_NAME(mf8): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6, A7, A8)>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8);
|
||||
explicit BOOST_MEM_FN_NAME(mf8)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8, F>(f) {}
|
||||
};
|
||||
|
||||
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct BOOST_MEM_FN_NAME(cmf8): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6, A7, A8) const>
|
||||
{
|
||||
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const;
|
||||
explicit BOOST_MEM_FN_NAME(cmf8)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8, F>(f) {}
|
||||
};
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
#ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
||||
#define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//
|
||||
// bind/placeholders.hpp - _N definitions
|
||||
//
|
||||
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
|
||||
//
|
||||
// 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/bind/bind.html for documentation.
|
||||
//
|
||||
|
||||
#include <boost/bind/arg.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
#if defined(__BORLANDC__) || defined(__GNUC__) && (__GNUC__ < 4)
|
||||
|
||||
static inline boost::arg<1> _1() { return boost::arg<1>(); }
|
||||
static inline boost::arg<2> _2() { return boost::arg<2>(); }
|
||||
static inline boost::arg<3> _3() { return boost::arg<3>(); }
|
||||
static inline boost::arg<4> _4() { return boost::arg<4>(); }
|
||||
static inline boost::arg<5> _5() { return boost::arg<5>(); }
|
||||
static inline boost::arg<6> _6() { return boost::arg<6>(); }
|
||||
static inline boost::arg<7> _7() { return boost::arg<7>(); }
|
||||
static inline boost::arg<8> _8() { return boost::arg<8>(); }
|
||||
static inline boost::arg<9> _9() { return boost::arg<9>(); }
|
||||
|
||||
#elif defined(BOOST_MSVC) || (defined(__DECCXX_VER) && __DECCXX_VER <= 60590031) || defined(__MWERKS__) || \
|
||||
defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
|
||||
|
||||
static boost::arg<1> _1;
|
||||
static boost::arg<2> _2;
|
||||
static boost::arg<3> _3;
|
||||
static boost::arg<4> _4;
|
||||
static boost::arg<5> _5;
|
||||
static boost::arg<6> _6;
|
||||
static boost::arg<7> _7;
|
||||
static boost::arg<8> _8;
|
||||
static boost::arg<9> _9;
|
||||
|
||||
#else
|
||||
|
||||
boost::arg<1> _1;
|
||||
boost::arg<2> _2;
|
||||
boost::arg<3> _3;
|
||||
boost::arg<4> _4;
|
||||
boost::arg<5> _5;
|
||||
boost::arg<6> _6;
|
||||
boost::arg<7> _7;
|
||||
boost::arg<8> _8;
|
||||
boost::arg<9> _9;
|
||||
|
||||
#endif
|
||||
|
||||
} // unnamed namespace
|
||||
|
||||
#endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
|
@ -1,475 +0,0 @@
|
|||
#ifndef BOOST_BIND_STORAGE_HPP_INCLUDED
|
||||
#define BOOST_BIND_STORAGE_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//
|
||||
// bind/storage.hpp
|
||||
//
|
||||
// boost/bind.hpp support header, optimized storage
|
||||
//
|
||||
// Copyright (c) 2006 Peter Dimov
|
||||
//
|
||||
// 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/bind/bind.html for documentation.
|
||||
//
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/bind/arg.hpp>
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4512) // assignment operator could not be generated
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace _bi
|
||||
{
|
||||
|
||||
// 1
|
||||
|
||||
template<class A1> struct storage1
|
||||
{
|
||||
explicit storage1( A1 a1 ): a1_( a1 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
BOOST_BIND_VISIT_EACH(v, a1_, 0);
|
||||
}
|
||||
|
||||
A1 a1_;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( __BORLANDC__ )
|
||||
|
||||
template<int I> struct storage1< boost::arg<I> >
|
||||
{
|
||||
explicit storage1( boost::arg<I> ) {}
|
||||
|
||||
template<class V> void accept(V &) const { }
|
||||
|
||||
static boost::arg<I> a1_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
template<int I> struct storage1< boost::arg<I> (*) () >
|
||||
{
|
||||
explicit storage1( boost::arg<I> (*) () ) {}
|
||||
|
||||
template<class V> void accept(V &) const { }
|
||||
|
||||
static boost::arg<I> a1_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// 2
|
||||
|
||||
template<class A1, class A2> struct storage2: public storage1<A1>
|
||||
{
|
||||
typedef storage1<A1> inherited;
|
||||
|
||||
storage2( A1 a1, A2 a2 ): storage1<A1>( a1 ), a2_( a2 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
BOOST_BIND_VISIT_EACH(v, a2_, 0);
|
||||
}
|
||||
|
||||
A2 a2_;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template<class A1, int I> struct storage2< A1, boost::arg<I> >: public storage1<A1>
|
||||
{
|
||||
typedef storage1<A1> inherited;
|
||||
|
||||
storage2( A1 a1, boost::arg<I> ): storage1<A1>( a1 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a2_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
template<class A1, int I> struct storage2< A1, boost::arg<I> (*) () >: public storage1<A1>
|
||||
{
|
||||
typedef storage1<A1> inherited;
|
||||
|
||||
storage2( A1 a1, boost::arg<I> (*) () ): storage1<A1>( a1 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a2_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// 3
|
||||
|
||||
template<class A1, class A2, class A3> struct storage3: public storage2< A1, A2 >
|
||||
{
|
||||
typedef storage2<A1, A2> inherited;
|
||||
|
||||
storage3( A1 a1, A2 a2, A3 a3 ): storage2<A1, A2>( a1, a2 ), a3_( a3 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
BOOST_BIND_VISIT_EACH(v, a3_, 0);
|
||||
}
|
||||
|
||||
A3 a3_;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template<class A1, class A2, int I> struct storage3< A1, A2, boost::arg<I> >: public storage2< A1, A2 >
|
||||
{
|
||||
typedef storage2<A1, A2> inherited;
|
||||
|
||||
storage3( A1 a1, A2 a2, boost::arg<I> ): storage2<A1, A2>( a1, a2 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a3_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
template<class A1, class A2, int I> struct storage3< A1, A2, boost::arg<I> (*) () >: public storage2< A1, A2 >
|
||||
{
|
||||
typedef storage2<A1, A2> inherited;
|
||||
|
||||
storage3( A1 a1, A2 a2, boost::arg<I> (*) () ): storage2<A1, A2>( a1, a2 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a3_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// 4
|
||||
|
||||
template<class A1, class A2, class A3, class A4> struct storage4: public storage3< A1, A2, A3 >
|
||||
{
|
||||
typedef storage3<A1, A2, A3> inherited;
|
||||
|
||||
storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3<A1, A2, A3>( a1, a2, a3 ), a4_( a4 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
BOOST_BIND_VISIT_EACH(v, a4_, 0);
|
||||
}
|
||||
|
||||
A4 a4_;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template<class A1, class A2, class A3, int I> struct storage4< A1, A2, A3, boost::arg<I> >: public storage3< A1, A2, A3 >
|
||||
{
|
||||
typedef storage3<A1, A2, A3> inherited;
|
||||
|
||||
storage4( A1 a1, A2 a2, A3 a3, boost::arg<I> ): storage3<A1, A2, A3>( a1, a2, a3 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a4_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
template<class A1, class A2, class A3, int I> struct storage4< A1, A2, A3, boost::arg<I> (*) () >: public storage3< A1, A2, A3 >
|
||||
{
|
||||
typedef storage3<A1, A2, A3> inherited;
|
||||
|
||||
storage4( A1 a1, A2 a2, A3 a3, boost::arg<I> (*) () ): storage3<A1, A2, A3>( a1, a2, a3 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a4_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// 5
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5> struct storage5: public storage4< A1, A2, A3, A4 >
|
||||
{
|
||||
typedef storage4<A1, A2, A3, A4> inherited;
|
||||
|
||||
storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ), a5_( a5 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
BOOST_BIND_VISIT_EACH(v, a5_, 0);
|
||||
}
|
||||
|
||||
A5 a5_;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template<class A1, class A2, class A3, class A4, int I> struct storage5< A1, A2, A3, A4, boost::arg<I> >: public storage4< A1, A2, A3, A4 >
|
||||
{
|
||||
typedef storage4<A1, A2, A3, A4> inherited;
|
||||
|
||||
storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg<I> ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a5_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
template<class A1, class A2, class A3, class A4, int I> struct storage5< A1, A2, A3, A4, boost::arg<I> (*) () >: public storage4< A1, A2, A3, A4 >
|
||||
{
|
||||
typedef storage4<A1, A2, A3, A4> inherited;
|
||||
|
||||
storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg<I> (*) () ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a5_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// 6
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6> struct storage6: public storage5< A1, A2, A3, A4, A5 >
|
||||
{
|
||||
typedef storage5<A1, A2, A3, A4, A5> inherited;
|
||||
|
||||
storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ), a6_( a6 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
BOOST_BIND_VISIT_EACH(v, a6_, 0);
|
||||
}
|
||||
|
||||
A6 a6_;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, int I> struct storage6< A1, A2, A3, A4, A5, boost::arg<I> >: public storage5< A1, A2, A3, A4, A5 >
|
||||
{
|
||||
typedef storage5<A1, A2, A3, A4, A5> inherited;
|
||||
|
||||
storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg<I> ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a6_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, int I> struct storage6< A1, A2, A3, A4, A5, boost::arg<I> (*) () >: public storage5< A1, A2, A3, A4, A5 >
|
||||
{
|
||||
typedef storage5<A1, A2, A3, A4, A5> inherited;
|
||||
|
||||
storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg<I> (*) () ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a6_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// 7
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct storage7: public storage6< A1, A2, A3, A4, A5, A6 >
|
||||
{
|
||||
typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
|
||||
|
||||
storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
BOOST_BIND_VISIT_EACH(v, a7_, 0);
|
||||
}
|
||||
|
||||
A7 a7_;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, int I> struct storage7< A1, A2, A3, A4, A5, A6, boost::arg<I> >: public storage6< A1, A2, A3, A4, A5, A6 >
|
||||
{
|
||||
typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
|
||||
|
||||
storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg<I> ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a7_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, int I> struct storage7< A1, A2, A3, A4, A5, A6, boost::arg<I> (*) () >: public storage6< A1, A2, A3, A4, A5, A6 >
|
||||
{
|
||||
typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
|
||||
|
||||
storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg<I> (*) () ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a7_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// 8
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 >
|
||||
{
|
||||
typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
|
||||
|
||||
storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
BOOST_BIND_VISIT_EACH(v, a8_, 0);
|
||||
}
|
||||
|
||||
A8 a8_;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, int I> struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg<I> >: public storage7< A1, A2, A3, A4, A5, A6, A7 >
|
||||
{
|
||||
typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
|
||||
|
||||
storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg<I> ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a8_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, int I> struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg<I> (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 >
|
||||
{
|
||||
typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
|
||||
|
||||
storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg<I> (*) () ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a8_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// 9
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
|
||||
{
|
||||
typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
|
||||
|
||||
storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
BOOST_BIND_VISIT_EACH(v, a9_, 0);
|
||||
}
|
||||
|
||||
A9 a9_;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, int I> struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg<I> >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
|
||||
{
|
||||
typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
|
||||
|
||||
storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg<I> ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a9_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, int I> struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg<I> (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
|
||||
{
|
||||
typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
|
||||
|
||||
storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg<I> (*) () ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ) {}
|
||||
|
||||
template<class V> void accept(V & v) const
|
||||
{
|
||||
inherited::accept(v);
|
||||
}
|
||||
|
||||
static boost::arg<I> a9_() { return boost::arg<I>(); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace _bi
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(default: 4512) // assignment operator could not be generated
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED
|
|
@ -1,24 +0,0 @@
|
|||
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
|
||||
// Use, modification and distribution are subject to 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/utility for most recent version including documentation.
|
||||
|
||||
// See boost/detail/call_traits.hpp and boost/detail/ob_call_traits.hpp
|
||||
// for full copyright notices.
|
||||
|
||||
#ifndef BOOST_CALL_TRAITS_HPP
|
||||
#define BOOST_CALL_TRAITS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
#include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
#include <boost/detail/ob_call_traits.hpp>
|
||||
#else
|
||||
#include <boost/detail/call_traits.hpp>
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CALL_TRAITS_HPP
|
|
@ -1,331 +0,0 @@
|
|||
// Boost cerrno.hpp header -------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2005.
|
||||
// Use, modification, and distribution is subject to 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 library home page at http://www.boost.org/libs/system
|
||||
|
||||
#ifndef BOOST_CERRNO_HPP
|
||||
#define BOOST_CERRNO_HPP
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
// supply errno values likely to be missing, particularly on Windows
|
||||
|
||||
#ifndef EAFNOSUPPORT
|
||||
#define EAFNOSUPPORT 9901
|
||||
#endif
|
||||
|
||||
#ifndef EADDRINUSE
|
||||
#define EADDRINUSE 9902
|
||||
#endif
|
||||
|
||||
#ifndef EADDRNOTAVAIL
|
||||
#define EADDRNOTAVAIL 9903
|
||||
#endif
|
||||
|
||||
#ifndef EISCONN
|
||||
#define EISCONN 9904
|
||||
#endif
|
||||
|
||||
#ifndef EBADMSG
|
||||
#define EBADMSG 9905
|
||||
#endif
|
||||
|
||||
#ifndef ECONNABORTED
|
||||
#define ECONNABORTED 9906
|
||||
#endif
|
||||
|
||||
#ifndef EALREADY
|
||||
#define EALREADY 9907
|
||||
#endif
|
||||
|
||||
#ifndef ECONNREFUSED
|
||||
#define ECONNREFUSED 9908
|
||||
#endif
|
||||
|
||||
#ifndef ECONNRESET
|
||||
#define ECONNRESET 9909
|
||||
#endif
|
||||
|
||||
#ifndef EDESTADDRREQ
|
||||
#define EDESTADDRREQ 9910
|
||||
#endif
|
||||
|
||||
#ifndef EHOSTUNREACH
|
||||
#define EHOSTUNREACH 9911
|
||||
#endif
|
||||
|
||||
#ifndef EIDRM
|
||||
#define EIDRM 9912
|
||||
#endif
|
||||
|
||||
#ifndef EMSGSIZE
|
||||
#define EMSGSIZE 9913
|
||||
#endif
|
||||
|
||||
#ifndef ENETDOWN
|
||||
#define ENETDOWN 9914
|
||||
#endif
|
||||
|
||||
#ifndef ENETRESET
|
||||
#define ENETRESET 9915
|
||||
#endif
|
||||
|
||||
#ifndef ENETUNREACH
|
||||
#define ENETUNREACH 9916
|
||||
#endif
|
||||
|
||||
#ifndef ENOBUFS
|
||||
#define ENOBUFS 9917
|
||||
#endif
|
||||
|
||||
#ifndef ENOLINK
|
||||
#define ENOLINK 9918
|
||||
#endif
|
||||
|
||||
#ifndef ENODATA
|
||||
#define ENODATA 9919
|
||||
#endif
|
||||
|
||||
#ifndef ENOMSG
|
||||
#define ENOMSG 9920
|
||||
#endif
|
||||
|
||||
#ifndef ENOPROTOOPT
|
||||
#define ENOPROTOOPT 9921
|
||||
#endif
|
||||
|
||||
#ifndef ENOSR
|
||||
#define ENOSR 9922
|
||||
#endif
|
||||
|
||||
#ifndef ENOTSOCK
|
||||
#define ENOTSOCK 9923
|
||||
#endif
|
||||
|
||||
#ifndef ENOSTR
|
||||
#define ENOSTR 9924
|
||||
#endif
|
||||
|
||||
#ifndef ENOTCONN
|
||||
#define ENOTCONN 9925
|
||||
#endif
|
||||
|
||||
#ifndef ENOTSUP
|
||||
#define ENOTSUP 9926
|
||||
#endif
|
||||
|
||||
#ifndef ECANCELED
|
||||
#define ECANCELED 9927
|
||||
#endif
|
||||
|
||||
#ifndef EINPROGRESS
|
||||
#define EINPROGRESS 9928
|
||||
#endif
|
||||
|
||||
#ifndef EOPNOTSUPP
|
||||
#define EOPNOTSUPP 9929
|
||||
#endif
|
||||
|
||||
#ifndef EWOULDBLOCK
|
||||
#define EWOULDBLOCK 9930
|
||||
#endif
|
||||
|
||||
#ifndef EOWNERDEAD
|
||||
#define EOWNERDEAD 9931
|
||||
#endif
|
||||
|
||||
#ifndef EPROTO
|
||||
#define EPROTO 9932
|
||||
#endif
|
||||
|
||||
#ifndef EPROTONOSUPPORT
|
||||
#define EPROTONOSUPPORT 9933
|
||||
#endif
|
||||
|
||||
#ifndef ENOTRECOVERABLE
|
||||
#define ENOTRECOVERABLE 9934
|
||||
#endif
|
||||
|
||||
#ifndef ETIME
|
||||
#define ETIME 9935
|
||||
#endif
|
||||
|
||||
#ifndef ETXTBSY
|
||||
#define ETXTBSY 9936
|
||||
#endif
|
||||
|
||||
#ifndef ETIMEDOUT
|
||||
#define ETIMEDOUT 9938
|
||||
#endif
|
||||
|
||||
#ifndef ELOOP
|
||||
#define ELOOP 9939
|
||||
#endif
|
||||
|
||||
#ifndef EOVERFLOW
|
||||
#define EOVERFLOW 9940
|
||||
#endif
|
||||
|
||||
#ifndef EPROTOTYPE
|
||||
#define EPROTOTYPE 9941
|
||||
#endif
|
||||
|
||||
#ifndef ENOSYS
|
||||
#define ENOSYS 9942
|
||||
#endif
|
||||
|
||||
#ifndef EINVAL
|
||||
#define EINVAL 9943
|
||||
#endif
|
||||
|
||||
#ifndef ERANGE
|
||||
#define ERANGE 9944
|
||||
#endif
|
||||
|
||||
#ifndef EILSEQ
|
||||
#define EILSEQ 9945
|
||||
#endif
|
||||
|
||||
// Windows Mobile doesn't appear to define these:
|
||||
|
||||
#ifndef E2BIG
|
||||
#define E2BIG 9946
|
||||
#endif
|
||||
|
||||
#ifndef EDOM
|
||||
#define EDOM 9947
|
||||
#endif
|
||||
|
||||
#ifndef EFAULT
|
||||
#define EFAULT 9948
|
||||
#endif
|
||||
|
||||
#ifndef EBADF
|
||||
#define EBADF 9949
|
||||
#endif
|
||||
|
||||
#ifndef EPIPE
|
||||
#define EPIPE 9950
|
||||
#endif
|
||||
|
||||
#ifndef EXDEV
|
||||
#define EXDEV 9951
|
||||
#endif
|
||||
|
||||
#ifndef EBUSY
|
||||
#define EBUSY 9952
|
||||
#endif
|
||||
|
||||
#ifndef ENOTEMPTY
|
||||
#define ENOTEMPTY 9953
|
||||
#endif
|
||||
|
||||
#ifndef ENOEXEC
|
||||
#define ENOEXEC 9954
|
||||
#endif
|
||||
|
||||
#ifndef EEXIST
|
||||
#define EEXIST 9955
|
||||
#endif
|
||||
|
||||
#ifndef EFBIG
|
||||
#define EFBIG 9956
|
||||
#endif
|
||||
|
||||
#ifndef ENAMETOOLONG
|
||||
#define ENAMETOOLONG 9957
|
||||
#endif
|
||||
|
||||
#ifndef ENOTTY
|
||||
#define ENOTTY 9958
|
||||
#endif
|
||||
|
||||
#ifndef EINTR
|
||||
#define EINTR 9959
|
||||
#endif
|
||||
|
||||
#ifndef ESPIPE
|
||||
#define ESPIPE 9960
|
||||
#endif
|
||||
|
||||
#ifndef EIO
|
||||
#define EIO 9961
|
||||
#endif
|
||||
|
||||
#ifndef EISDIR
|
||||
#define EISDIR 9962
|
||||
#endif
|
||||
|
||||
#ifndef ECHILD
|
||||
#define ECHILD 9963
|
||||
#endif
|
||||
|
||||
#ifndef ENOLCK
|
||||
#define ENOLCK 9964
|
||||
#endif
|
||||
|
||||
#ifndef ENOSPC
|
||||
#define ENOSPC 9965
|
||||
#endif
|
||||
|
||||
#ifndef ENXIO
|
||||
#define ENXIO 9966
|
||||
#endif
|
||||
|
||||
#ifndef ENODEV
|
||||
#define ENODEV 9967
|
||||
#endif
|
||||
|
||||
#ifndef ENOENT
|
||||
#define ENOENT 9968
|
||||
#endif
|
||||
|
||||
#ifndef ESRCH
|
||||
#define ESRCH 9969
|
||||
#endif
|
||||
|
||||
#ifndef ENOTDIR
|
||||
#define ENOTDIR 9970
|
||||
#endif
|
||||
|
||||
#ifndef ENOMEM
|
||||
#define ENOMEM 9971
|
||||
#endif
|
||||
|
||||
#ifndef EPERM
|
||||
#define EPERM 9972
|
||||
#endif
|
||||
|
||||
#ifndef EACCES
|
||||
#define EACCES 9973
|
||||
#endif
|
||||
|
||||
#ifndef EROFS
|
||||
#define EROFS 9974
|
||||
#endif
|
||||
|
||||
#ifndef EDEADLK
|
||||
#define EDEADLK 9975
|
||||
#endif
|
||||
|
||||
#ifndef EAGAIN
|
||||
#define EAGAIN 9976
|
||||
#endif
|
||||
|
||||
#ifndef ENFILE
|
||||
#define ENFILE 9977
|
||||
#endif
|
||||
|
||||
#ifndef EMFILE
|
||||
#define EMFILE 9978
|
||||
#endif
|
||||
|
||||
#ifndef EMLINK
|
||||
#define EMLINK 9979
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
|
@ -1,69 +0,0 @@
|
|||
#ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED
|
||||
#define BOOST_CHECKED_DELETE_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//
|
||||
// boost/checked_delete.hpp
|
||||
//
|
||||
// Copyright (c) 2002, 2003 Peter Dimov
|
||||
// Copyright (c) 2003 Daniel Frey
|
||||
// Copyright (c) 2003 Howard Hinnant
|
||||
//
|
||||
// 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/utility/checked_delete.html for documentation.
|
||||
//
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
// verify that types are complete for increased safety
|
||||
|
||||
template<class T> inline void checked_delete(T * x)
|
||||
{
|
||||
// intentionally complex - simplification causes regressions
|
||||
typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
|
||||
(void) sizeof(type_must_be_complete);
|
||||
delete x;
|
||||
}
|
||||
|
||||
template<class T> inline void checked_array_delete(T * x)
|
||||
{
|
||||
typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
|
||||
(void) sizeof(type_must_be_complete);
|
||||
delete [] x;
|
||||
}
|
||||
|
||||
template<class T> struct checked_deleter
|
||||
{
|
||||
typedef void result_type;
|
||||
typedef T * argument_type;
|
||||
|
||||
void operator()(T * x) const
|
||||
{
|
||||
// boost:: disables ADL
|
||||
boost::checked_delete(x);
|
||||
}
|
||||
};
|
||||
|
||||
template<class T> struct checked_array_deleter
|
||||
{
|
||||
typedef void result_type;
|
||||
typedef T * argument_type;
|
||||
|
||||
void operator()(T * x) const
|
||||
{
|
||||
boost::checked_array_delete(x);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED
|
|
@ -1,15 +0,0 @@
|
|||
// chrono.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2009-2011 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_CHRONO_CHRONO_HPP
|
||||
#define BOOST_CHRONO_CHRONO_HPP
|
||||
|
||||
#include <boost/chrono/duration.hpp>
|
||||
#include <boost/chrono/time_point.hpp>
|
||||
#include <boost/chrono/system_clocks.hpp>
|
||||
|
||||
#endif // BOOST_CHRONO_CHRONO_HPP
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// (C) Copyright 2010-2011 Vicente J. Botet Escriba
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
|
||||
#ifndef BOOST_CHRONO_CLOCK_STRING_HPP
|
||||
#define BOOST_CHRONO_CLOCK_STRING_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace chrono
|
||||
{
|
||||
|
||||
template<class Clock, class CharT>
|
||||
struct clock_string;
|
||||
|
||||
} // chrono
|
||||
|
||||
} // boost
|
||||
|
||||
#endif // BOOST_CHRONO_CLOCK_STRING_HPP
|
|
@ -1,220 +0,0 @@
|
|||
// boost/chrono/config.hpp -------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2003, 2006, 2008
|
||||
// Copyright 2009-2011 Vicente J. Botet Escriba
|
||||
|
||||
// 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/chrono for documentation.
|
||||
|
||||
#ifndef BOOST_CHRONO_CONFIG_HPP
|
||||
#define BOOST_CHRONO_CONFIG_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if !defined BOOST_CHRONO_VERSION
|
||||
#define BOOST_CHRONO_VERSION 1
|
||||
#else
|
||||
#if BOOST_CHRONO_VERSION!=1 && BOOST_CHRONO_VERSION!=2
|
||||
#error "BOOST_CHRONO_VERSION must be 1 or 2"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_USE_WINDOWS_H)
|
||||
#define BOOST_USE_WINDOWS_H
|
||||
#endif
|
||||
|
||||
#if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \
|
||||
&& ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
|
||||
|
||||
# define BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
|
||||
|
||||
#endif
|
||||
|
||||
// BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API
|
||||
// can be defined by the user to specify which API should be used
|
||||
|
||||
#if defined(BOOST_CHRONO_WINDOWS_API)
|
||||
# warning Boost.Chrono will use the Windows API
|
||||
#elif defined(BOOST_CHRONO_MAC_API)
|
||||
# warning Boost.Chrono will use the Mac API
|
||||
#elif defined(BOOST_CHRONO_POSIX_API)
|
||||
# warning Boost.Chrono will use the POSIX API
|
||||
#endif
|
||||
|
||||
# if defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_POSIX_API )
|
||||
# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_POSIX_API are defined
|
||||
# elif defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_MAC_API )
|
||||
# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_MAC_API are defined
|
||||
# elif defined( BOOST_CHRONO_MAC_API ) && defined( BOOST_CHRONO_POSIX_API )
|
||||
# error both BOOST_CHRONO_MAC_API and BOOST_CHRONO_POSIX_API are defined
|
||||
# elif !defined( BOOST_CHRONO_WINDOWS_API ) && !defined( BOOST_CHRONO_MAC_API ) && !defined( BOOST_CHRONO_POSIX_API )
|
||||
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
|
||||
# define BOOST_CHRONO_WINDOWS_API
|
||||
# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
||||
# define BOOST_CHRONO_MAC_API
|
||||
# else
|
||||
# define BOOST_CHRONO_POSIX_API
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if defined( BOOST_CHRONO_WINDOWS_API )
|
||||
# ifndef UNDER_CE
|
||||
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
|
||||
# endif
|
||||
# define BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
# define BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
|
||||
# endif
|
||||
|
||||
# if defined( BOOST_CHRONO_MAC_API )
|
||||
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
|
||||
# define BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
|
||||
# endif
|
||||
|
||||
# if defined( BOOST_CHRONO_POSIX_API )
|
||||
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
|
||||
# include <time.h> //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME
|
||||
# if defined(CLOCK_MONOTONIC)
|
||||
# define BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
# endif
|
||||
# if defined(_POSIX_THREAD_CPUTIME) && !defined(BOOST_DISABLE_THREADS)
|
||||
# define BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
|
||||
# endif
|
||||
# if defined(CLOCK_THREAD_CPUTIME_ID) && !defined(BOOST_DISABLE_THREADS)
|
||||
# define BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
|
||||
# endif
|
||||
# if defined(sun) || defined(__sun)
|
||||
# undef BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
|
||||
# endif
|
||||
# if defined(__HP_aCC) && defined(__hpux)
|
||||
# undef BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
|
||||
# endif
|
||||
# if defined(__VXWORKS__)
|
||||
# undef BOOST_CHRONO_HAS_PROCESS_CLOCKS
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#if defined(BOOST_CHRONO_THREAD_DISABLED) && defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
|
||||
#undef BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
#undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
|
||||
#endif
|
||||
|
||||
//#undef BOOST_CHRONO_HAS_PROCESS_CLOCKS
|
||||
|
||||
// unicode support ------------------------------//
|
||||
|
||||
#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T)
|
||||
//~ #define BOOST_CHRONO_HAS_UNICODE_SUPPORT
|
||||
#else
|
||||
#define BOOST_CHRONO_HAS_UNICODE_SUPPORT 1
|
||||
#endif
|
||||
|
||||
#if ! defined BOOST_NOEXCEPT
|
||||
#if defined(BOOST_NO_CXX11_NOEXCEPT)
|
||||
#define BOOST_NOEXCEPT
|
||||
#else
|
||||
#define BOOST_NOEXCEPT noexcept
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
|
||||
#define BOOST_CHRONO_LIB_CONSTEXPR
|
||||
#elif defined(_LIBCPP_VERSION) && !defined(_LIBCPP_CONSTEXPR)
|
||||
#define BOOST_CHRONO_LIB_CONSTEXPR
|
||||
#else
|
||||
#define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR
|
||||
#endif
|
||||
|
||||
#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
|
||||
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
|
||||
#else
|
||||
#ifdef BOOST_NO_CXX11_NOEXCEPT
|
||||
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
|
||||
#else
|
||||
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
|
||||
&& defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
#error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined"
|
||||
#endif
|
||||
|
||||
#if defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
|
||||
&& defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
|
||||
#error "BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 && BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 defined"
|
||||
#endif
|
||||
|
||||
#if ! defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
|
||||
&& ! defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
#define BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
#endif
|
||||
|
||||
#if (BOOST_CHRONO_VERSION == 2)
|
||||
#if ! defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
|
||||
&& ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
|
||||
#define BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_CHRONO_HEADER_ONLY
|
||||
#define BOOST_CHRONO_INLINE inline
|
||||
#define BOOST_CHRONO_STATIC inline
|
||||
#define BOOST_CHRONO_DECL
|
||||
|
||||
#else
|
||||
#define BOOST_CHRONO_INLINE
|
||||
#define BOOST_CHRONO_STATIC static
|
||||
|
||||
// enable dynamic linking on Windows ---------------------------------------//
|
||||
|
||||
// we need to import/export our code only if the user has specifically
|
||||
// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
|
||||
// libraries to be dynamically linked, or BOOST_CHRONO_DYN_LINK
|
||||
// if they want just this one to be dynamically liked:
|
||||
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
|
||||
// export if this is our own source, otherwise import:
|
||||
#ifdef BOOST_CHRONO_SOURCE
|
||||
# define BOOST_CHRONO_DECL BOOST_SYMBOL_EXPORT
|
||||
#else
|
||||
# define BOOST_CHRONO_DECL BOOST_SYMBOL_IMPORT
|
||||
#endif // BOOST_CHRONO_SOURCE
|
||||
#endif // DYN_LINK
|
||||
//
|
||||
// if BOOST_CHRONO_DECL isn't defined yet define it now:
|
||||
#ifndef BOOST_CHRONO_DECL
|
||||
#define BOOST_CHRONO_DECL
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// enable automatic library variant selection ------------------------------//
|
||||
|
||||
#if !defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_CHRONO_NO_LIB)
|
||||
//
|
||||
// Set the name of our library; this will get undef'ed by auto_link.hpp
|
||||
// once it's done with it:
|
||||
//
|
||||
#define BOOST_LIB_NAME boost_chrono
|
||||
//
|
||||
// If we're importing code from a dll, then tell auto_link.hpp about it:
|
||||
//
|
||||
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
|
||||
# define BOOST_DYN_LINK
|
||||
#endif
|
||||
//
|
||||
// And include the header that does the work:
|
||||
//
|
||||
#include <boost/config/auto_link.hpp>
|
||||
#endif // auto-linking disabled
|
||||
#endif // BOOST_CHRONO_HEADER_ONLY
|
||||
#endif // BOOST_CHRONO_CONFIG_HPP
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
// chrono.cpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2008
|
||||
// Copyright Vicente J. Botet Escriba 2009
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_CHRONO_DETAIL_INLINED_CHRONO_HPP
|
||||
#define BOOST_CHRONO_DETAIL_INLINED_CHRONO_HPP
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/chrono/chrono.hpp>
|
||||
#include <boost/system/system_error.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/chrono/detail/system.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// Platform-specific Implementations //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// Windows //
|
||||
//----------------------------------------------------------------------------//
|
||||
#if defined(BOOST_CHRONO_WINDOWS_API)
|
||||
#include <boost/chrono/detail/inlined/win/chrono.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// Mac //
|
||||
//----------------------------------------------------------------------------//
|
||||
#elif defined(BOOST_CHRONO_MAC_API)
|
||||
#include <boost/chrono/detail/inlined/mac/chrono.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// POSIX //
|
||||
//----------------------------------------------------------------------------//
|
||||
#elif defined(BOOST_CHRONO_POSIX_API)
|
||||
#include <boost/chrono/detail/inlined/posix/chrono.hpp>
|
||||
|
||||
#endif // POSIX
|
||||
|
||||
#endif
|
|
@ -1,241 +0,0 @@
|
|||
// mac/chrono.cpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2008
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// Mac //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <sys/time.h> //for gettimeofday and timeval
|
||||
#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace chrono
|
||||
{
|
||||
|
||||
// system_clock
|
||||
|
||||
// gettimeofday is the most precise "system time" available on this platform.
|
||||
// It returns the number of microseconds since New Years 1970 in a struct called timeval
|
||||
// which has a field for seconds and a field for microseconds.
|
||||
// Fill in the timeval and then convert that to the time_point
|
||||
system_clock::time_point
|
||||
system_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
timeval tv;
|
||||
gettimeofday(&tv, 0);
|
||||
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
system_clock::time_point
|
||||
system_clock::now(system::error_code & ec)
|
||||
{
|
||||
timeval tv;
|
||||
gettimeofday(&tv, 0);
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
|
||||
}
|
||||
#endif
|
||||
// Take advantage of the fact that on this platform time_t is nothing but
|
||||
// an integral count of seconds since New Years 1970 (same epoch as timeval).
|
||||
// Just get the duration out of the time_point and truncate it to seconds.
|
||||
time_t
|
||||
system_clock::to_time_t(const time_point& t) BOOST_NOEXCEPT
|
||||
{
|
||||
return time_t(duration_cast<seconds>(t.time_since_epoch()).count());
|
||||
}
|
||||
|
||||
// Just turn the time_t into a count of seconds and construct a time_point with it.
|
||||
system_clock::time_point
|
||||
system_clock::from_time_t(time_t t) BOOST_NOEXCEPT
|
||||
{
|
||||
return system_clock::time_point(seconds(t));
|
||||
}
|
||||
|
||||
namespace chrono_detail
|
||||
{
|
||||
|
||||
// steady_clock
|
||||
|
||||
// Note, in this implementation steady_clock and high_resolution_clock
|
||||
// are the same clock. They are both based on mach_absolute_time().
|
||||
// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
|
||||
// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom
|
||||
// are run time constants supplied by the OS. This clock has no relationship
|
||||
// to the Gregorian calendar. It's main use is as a high resolution timer.
|
||||
|
||||
// MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize
|
||||
// for that case as an optimization.
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_simplified()
|
||||
{
|
||||
return mach_absolute_time();
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_simplified_ec(system::error_code & ec)
|
||||
{
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return mach_absolute_time();
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_CHRONO_STATIC
|
||||
double
|
||||
compute_steady_factor(kern_return_t& err)
|
||||
{
|
||||
mach_timebase_info_data_t MachInfo;
|
||||
err = mach_timebase_info(&MachInfo);
|
||||
if ( err != 0 ) {
|
||||
return 0;
|
||||
}
|
||||
return static_cast<double>(MachInfo.numer) / MachInfo.denom;
|
||||
}
|
||||
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_full()
|
||||
{
|
||||
static kern_return_t err;
|
||||
static const double factor = chrono_detail::compute_steady_factor(err);
|
||||
if (err != 0)
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_full_ec(system::error_code & ec)
|
||||
{
|
||||
static kern_return_t err;
|
||||
static const double factor = chrono_detail::compute_steady_factor(err);
|
||||
if (err != 0)
|
||||
{
|
||||
if (BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
err,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::steady_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return steady_clock::rep();
|
||||
}
|
||||
}
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef steady_clock::rep (*FP)();
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
typedef steady_clock::rep (*FP_ec)(system::error_code &);
|
||||
#endif
|
||||
|
||||
BOOST_CHRONO_STATIC
|
||||
FP
|
||||
init_steady_clock(kern_return_t & err)
|
||||
{
|
||||
mach_timebase_info_data_t MachInfo;
|
||||
err = mach_timebase_info(&MachInfo);
|
||||
if ( err != 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MachInfo.numer == MachInfo.denom)
|
||||
{
|
||||
return &chrono_detail::steady_simplified;
|
||||
}
|
||||
return &chrono_detail::steady_full;
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_STATIC
|
||||
FP_ec
|
||||
init_steady_clock_ec(kern_return_t & err)
|
||||
{
|
||||
mach_timebase_info_data_t MachInfo;
|
||||
err = mach_timebase_info(&MachInfo);
|
||||
if ( err != 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MachInfo.numer == MachInfo.denom)
|
||||
{
|
||||
return &chrono_detail::steady_simplified_ec;
|
||||
}
|
||||
return &chrono_detail::steady_full_ec;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
steady_clock::time_point
|
||||
steady_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
static kern_return_t err;
|
||||
static chrono_detail::FP fp = chrono_detail::init_steady_clock(err);
|
||||
if ( err != 0 )
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
return time_point(duration(fp()));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
steady_clock::time_point
|
||||
steady_clock::now(system::error_code & ec)
|
||||
{
|
||||
static kern_return_t err;
|
||||
static chrono_detail::FP_ec fp = chrono_detail::init_steady_clock_ec(err);
|
||||
if ( err != 0 )
|
||||
{
|
||||
if (BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
err,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::steady_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( err, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return time_point();
|
||||
}
|
||||
}
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(duration(fp(ec)));
|
||||
}
|
||||
#endif
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
|
@ -1,120 +0,0 @@
|
|||
// posix/chrono.cpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2008
|
||||
// Copyright Vicente J. Botet Escriba 2009
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// POSIX //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <time.h> // for clock_gettime
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace chrono
|
||||
{
|
||||
|
||||
system_clock::time_point system_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
timespec ts;
|
||||
if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
|
||||
return time_point(duration(
|
||||
static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
system_clock::time_point system_clock::now(system::error_code & ec)
|
||||
{
|
||||
timespec ts;
|
||||
if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
|
||||
{
|
||||
if (BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
errno,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::system_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return time_point();
|
||||
}
|
||||
}
|
||||
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(duration(
|
||||
static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
|
||||
}
|
||||
#endif
|
||||
|
||||
std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast<std::time_t>( t.time_since_epoch().count() / 1000000000 );
|
||||
}
|
||||
|
||||
system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
|
||||
{
|
||||
return time_point(duration(static_cast<system_clock::rep>(t) * 1000000000));
|
||||
}
|
||||
|
||||
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
|
||||
steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
timespec ts;
|
||||
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
|
||||
return time_point(duration(
|
||||
static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
steady_clock::time_point steady_clock::now(system::error_code & ec)
|
||||
{
|
||||
timespec ts;
|
||||
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
|
||||
{
|
||||
if (BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
errno,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::steady_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return time_point();
|
||||
}
|
||||
}
|
||||
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(duration(
|
||||
static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
// win/chrono.cpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2008
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// Windows //
|
||||
//----------------------------------------------------------------------------//
|
||||
#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
|
||||
#define BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
|
||||
|
||||
#include <boost/detail/winapi/time.hpp>
|
||||
#include <boost/detail/winapi/timers.hpp>
|
||||
#include <boost/detail/winapi/GetLastError.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace chrono
|
||||
{
|
||||
namespace chrono_detail
|
||||
{
|
||||
|
||||
BOOST_CHRONO_INLINE double get_nanosecs_per_tic() BOOST_NOEXCEPT
|
||||
{
|
||||
boost::detail::winapi::LARGE_INTEGER_ freq;
|
||||
if ( !boost::detail::winapi::QueryPerformanceFrequency( &freq ) )
|
||||
return 0.0L;
|
||||
return double(1000000000.0L / freq.QuadPart);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
|
||||
|
||||
boost::detail::winapi::LARGE_INTEGER_ pcount;
|
||||
if ( (nanosecs_per_tic <= 0.0L) ||
|
||||
(!boost::detail::winapi::QueryPerformanceCounter( &pcount )) )
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
return steady_clock::time_point();
|
||||
}
|
||||
|
||||
return steady_clock::time_point(steady_clock::duration(
|
||||
static_cast<steady_clock::rep>((nanosecs_per_tic) * pcount.QuadPart)));
|
||||
}
|
||||
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
steady_clock::time_point steady_clock::now( system::error_code & ec )
|
||||
{
|
||||
static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
|
||||
|
||||
boost::detail::winapi::LARGE_INTEGER_ pcount;
|
||||
if ( (nanosecs_per_tic <= 0.0L)
|
||||
|| (!boost::detail::winapi::QueryPerformanceCounter( &pcount )) )
|
||||
{
|
||||
boost::detail::winapi::DWORD_ cause =
|
||||
((nanosecs_per_tic <= 0.0L)
|
||||
? ERROR_NOT_SUPPORTED
|
||||
: boost::detail::winapi::GetLastError());
|
||||
if (BOOST_CHRONO_IS_THROWS(ec)) {
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
cause,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::steady_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return steady_clock::time_point(duration(0));
|
||||
}
|
||||
}
|
||||
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(duration(
|
||||
static_cast<steady_clock::rep>(nanosecs_per_tic * pcount.QuadPart)));
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_CHRONO_INLINE
|
||||
system_clock::time_point system_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
boost::detail::winapi::FILETIME_ ft;
|
||||
boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
|
||||
return system_clock::time_point(
|
||||
system_clock::duration(
|
||||
((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
|
||||
-116444736000000000LL
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_INLINE
|
||||
system_clock::time_point system_clock::now( system::error_code & ec )
|
||||
{
|
||||
boost::detail::winapi::FILETIME_ ft;
|
||||
boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return system_clock::time_point(
|
||||
system_clock::duration(
|
||||
((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
|
||||
-116444736000000000LL
|
||||
));
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_CHRONO_INLINE
|
||||
std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
|
||||
{
|
||||
__int64 temp = t.time_since_epoch().count();
|
||||
temp /= 10000000;
|
||||
return static_cast<std::time_t>( temp );
|
||||
}
|
||||
|
||||
BOOST_CHRONO_INLINE
|
||||
system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
|
||||
{
|
||||
__int64 temp = t;
|
||||
temp *= 10000000;
|
||||
return time_point(duration(temp));
|
||||
}
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
|
@ -1,31 +0,0 @@
|
|||
// is_evenly_divisible_by.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
|
||||
#define BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
|
||||
|
||||
#include <boost/chrono/config.hpp>
|
||||
|
||||
#include <boost/mpl/logical.hpp>
|
||||
#include <boost/ratio/detail/overflow_helpers.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace chrono {
|
||||
namespace chrono_detail {
|
||||
|
||||
// template <class R1, class R2>
|
||||
// struct is_evenly_divisible_by : public boost::mpl::bool_ < ratio_divide<R1, R2>::type::den == 1 >
|
||||
// {};
|
||||
template <class R1, class R2>
|
||||
struct is_evenly_divisible_by : public boost::ratio_detail::is_evenly_divisible_by<R1, R2>
|
||||
{};
|
||||
|
||||
} // namespace chrono_detail
|
||||
} // namespace detail
|
||||
} // namespace chrono
|
||||
|
||||
#endif // BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP
|
|
@ -1,30 +0,0 @@
|
|||
// static_assert.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
|
||||
#ifndef BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
|
||||
#define BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
|
||||
|
||||
#include <boost/chrono/config.hpp>
|
||||
|
||||
#ifndef BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
|
||||
#elif defined(BOOST_CHRONO_USES_STATIC_ASSERT)
|
||||
#include <boost/static_assert.hpp>
|
||||
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
|
||||
#elif defined(BOOST_CHRONO_USES_MPL_ASSERT)
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) \
|
||||
BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
|
||||
#else
|
||||
//~ #elif defined(BOOST_CHRONO_USES_ARRAY_ASSERT)
|
||||
#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[(CND)?1:-1]
|
||||
//~ #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
|
|
@ -1,29 +0,0 @@
|
|||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_CHRONO_DETAIL_SYSTEM_HPP
|
||||
#define BOOST_CHRONO_DETAIL_SYSTEM_HPP
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
|
||||
#define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category
|
||||
#else
|
||||
#define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category()
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_SYSTEM_NO_DEPRECATED
|
||||
#define BOOST_CHRONO_THROWS boost::throws()
|
||||
#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::throws())
|
||||
#else
|
||||
#define BOOST_CHRONO_THROWS boost::system::throws
|
||||
#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::system::throws)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -1,794 +0,0 @@
|
|||
// duration.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2008 Howard Hinnant
|
||||
// Copyright 2008 Beman Dawes
|
||||
// Copyright 2009-2011 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
/*
|
||||
|
||||
This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
|
||||
Many thanks to Howard for making his code available under the Boost license.
|
||||
The original code was modified to conform to Boost conventions and to section
|
||||
20.9 Time utilities [time] of the C++ committee's working paper N2798.
|
||||
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
|
||||
|
||||
time2_demo contained this comment:
|
||||
|
||||
Much thanks to Andrei Alexandrescu,
|
||||
Walter Brown,
|
||||
Peter Dimov,
|
||||
Jeff Garland,
|
||||
Terry Golubiewski,
|
||||
Daniel Krugler,
|
||||
Anthony Williams.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_CHRONO_DURATION_HPP
|
||||
#define BOOST_CHRONO_DURATION_HPP
|
||||
|
||||
#include <boost/chrono/config.hpp>
|
||||
#include <boost/chrono/detail/static_assert.hpp>
|
||||
|
||||
#include <climits>
|
||||
#include <limits>
|
||||
|
||||
|
||||
#include <boost/mpl/logical.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/type_traits/common_type.hpp>
|
||||
#include <boost/type_traits/is_arithmetic.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
#include <boost/type_traits/is_unsigned.hpp>
|
||||
#include <boost/chrono/detail/is_evenly_divisible_by.hpp>
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/integer_traits.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_CHRONO_USES_MPL_ASSERT)
|
||||
#define BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION "A duration representation can not be a duration"
|
||||
#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO "Second template parameter of duration must be a boost::ratio"
|
||||
#define BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE "duration period must be positive"
|
||||
#define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION "Second template parameter of time_point must be a boost::chrono::duration"
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_CHRONO_HEADER_ONLY
|
||||
// this must occur after all of the includes and before any code appears:
|
||||
#include <boost/config/abi_prefix.hpp> // must be the last #include
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9 Time utilities [time] //
|
||||
// synopsis //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace boost {
|
||||
namespace chrono {
|
||||
|
||||
template <class Rep, class Period = ratio<1> >
|
||||
class duration;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <class T>
|
||||
struct is_duration
|
||||
: boost::false_type {};
|
||||
|
||||
template <class Rep, class Period>
|
||||
struct is_duration<duration<Rep, Period> >
|
||||
: boost::true_type {};
|
||||
|
||||
template <class Duration, class Rep, bool = is_duration<Rep>::value>
|
||||
struct duration_divide_result
|
||||
{
|
||||
};
|
||||
|
||||
template <class Duration, class Rep2,
|
||||
bool = (
|
||||
((boost::is_convertible<typename Duration::rep,
|
||||
typename common_type<typename Duration::rep, Rep2>::type>::value))
|
||||
&& ((boost::is_convertible<Rep2,
|
||||
typename common_type<typename Duration::rep, Rep2>::type>::value))
|
||||
)
|
||||
>
|
||||
struct duration_divide_imp
|
||||
{
|
||||
};
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
struct duration_divide_imp<duration<Rep1, Period>, Rep2, true>
|
||||
{
|
||||
typedef duration<typename common_type<Rep1, Rep2>::type, Period> type;
|
||||
};
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
struct duration_divide_result<duration<Rep1, Period>, Rep2, false>
|
||||
: duration_divide_imp<duration<Rep1, Period>, Rep2>
|
||||
{
|
||||
};
|
||||
|
||||
///
|
||||
template <class Rep, class Duration, bool = is_duration<Rep>::value>
|
||||
struct duration_divide_result2
|
||||
{
|
||||
};
|
||||
|
||||
template <class Rep, class Duration,
|
||||
bool = (
|
||||
((boost::is_convertible<typename Duration::rep,
|
||||
typename common_type<typename Duration::rep, Rep>::type>::value))
|
||||
&& ((boost::is_convertible<Rep,
|
||||
typename common_type<typename Duration::rep, Rep>::type>::value))
|
||||
)
|
||||
>
|
||||
struct duration_divide_imp2
|
||||
{
|
||||
};
|
||||
|
||||
template <class Rep1, class Rep2, class Period >
|
||||
struct duration_divide_imp2<Rep1, duration<Rep2, Period>, true>
|
||||
{
|
||||
//typedef typename common_type<Rep1, Rep2>::type type;
|
||||
typedef double type;
|
||||
};
|
||||
|
||||
template <class Rep1, class Rep2, class Period >
|
||||
struct duration_divide_result2<Rep1, duration<Rep2, Period>, false>
|
||||
: duration_divide_imp2<Rep1, duration<Rep2, Period> >
|
||||
{
|
||||
};
|
||||
|
||||
///
|
||||
template <class Duration, class Rep, bool = is_duration<Rep>::value>
|
||||
struct duration_modulo_result
|
||||
{
|
||||
};
|
||||
|
||||
template <class Duration, class Rep2,
|
||||
bool = (
|
||||
//boost::is_convertible<typename Duration::rep,
|
||||
//typename common_type<typename Duration::rep, Rep2>::type>::value
|
||||
//&&
|
||||
boost::is_convertible<Rep2,
|
||||
typename common_type<typename Duration::rep, Rep2>::type>::value
|
||||
)
|
||||
>
|
||||
struct duration_modulo_imp
|
||||
{
|
||||
};
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
struct duration_modulo_imp<duration<Rep1, Period>, Rep2, true>
|
||||
{
|
||||
typedef duration<typename common_type<Rep1, Rep2>::type, Period> type;
|
||||
};
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
struct duration_modulo_result<duration<Rep1, Period>, Rep2, false>
|
||||
: duration_modulo_imp<duration<Rep1, Period>, Rep2>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace chrono
|
||||
|
||||
|
||||
// common_type trait specializations
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
struct common_type<chrono::duration<Rep1, Period1>,
|
||||
chrono::duration<Rep2, Period2> >;
|
||||
|
||||
|
||||
namespace chrono {
|
||||
|
||||
// customization traits
|
||||
template <class Rep> struct treat_as_floating_point;
|
||||
template <class Rep> struct duration_values;
|
||||
|
||||
// convenience typedefs
|
||||
typedef duration<boost::int_least64_t, nano> nanoseconds; // at least 64 bits needed
|
||||
typedef duration<boost::int_least64_t, micro> microseconds; // at least 55 bits needed
|
||||
typedef duration<boost::int_least64_t, milli> milliseconds; // at least 45 bits needed
|
||||
typedef duration<boost::int_least64_t> seconds; // at least 35 bits needed
|
||||
typedef duration<boost::int_least32_t, ratio< 60> > minutes; // at least 29 bits needed
|
||||
typedef duration<boost::int_least32_t, ratio<3600> > hours; // at least 23 bits needed
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// duration helpers //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// duration_cast
|
||||
|
||||
// duration_cast is the heart of this whole prototype. It can convert any
|
||||
// duration to any other. It is also (implicitly) used in converting
|
||||
// time_points. The conversion is always exact if possible. And it is
|
||||
// always as efficient as hand written code. If different representations
|
||||
// are involved, care is taken to never require implicit conversions.
|
||||
// Instead static_cast is used explicitly for every required conversion.
|
||||
// If there are a mixture of integral and floating point representations,
|
||||
// the use of common_type ensures that the most logical "intermediate"
|
||||
// representation is used.
|
||||
template <class FromDuration, class ToDuration,
|
||||
class Period,
|
||||
bool PeriodNumEq1,
|
||||
bool PeriodDenEq1>
|
||||
struct duration_cast_aux;
|
||||
|
||||
// When the two periods are the same, all that is left to do is static_cast from
|
||||
// the source representation to the target representation (which may be a no-op).
|
||||
// This conversion is always exact as long as the static_cast from the source
|
||||
// representation to the destination representation is exact.
|
||||
template <class FromDuration, class ToDuration, class Period>
|
||||
struct duration_cast_aux<FromDuration, ToDuration, Period, true, true>
|
||||
{
|
||||
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
|
||||
{
|
||||
return ToDuration(static_cast<typename ToDuration::rep>(fd.count()));
|
||||
}
|
||||
};
|
||||
|
||||
// When the numerator of FromPeriod / ToPeriod is 1, then all we need to do is
|
||||
// divide by the denominator of FromPeriod / ToPeriod. The common_type of
|
||||
// the two representations is used for the intermediate computation before
|
||||
// static_cast'ing to the destination.
|
||||
// This conversion is generally not exact because of the division (but could be
|
||||
// if you get lucky on the run time value of fd.count()).
|
||||
template <class FromDuration, class ToDuration, class Period>
|
||||
struct duration_cast_aux<FromDuration, ToDuration, Period, true, false>
|
||||
{
|
||||
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
|
||||
{
|
||||
typedef typename common_type<
|
||||
typename ToDuration::rep,
|
||||
typename FromDuration::rep,
|
||||
boost::intmax_t>::type C;
|
||||
return ToDuration(static_cast<typename ToDuration::rep>(
|
||||
static_cast<C>(fd.count()) / static_cast<C>(Period::den)));
|
||||
}
|
||||
};
|
||||
|
||||
// When the denominator of FromPeriod / ToPeriod is 1, then all we need to do is
|
||||
// multiply by the numerator of FromPeriod / ToPeriod. The common_type of
|
||||
// the two representations is used for the intermediate computation before
|
||||
// static_cast'ing to the destination.
|
||||
// This conversion is always exact as long as the static_cast's involved are exact.
|
||||
template <class FromDuration, class ToDuration, class Period>
|
||||
struct duration_cast_aux<FromDuration, ToDuration, Period, false, true>
|
||||
{
|
||||
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
|
||||
{
|
||||
typedef typename common_type<
|
||||
typename ToDuration::rep,
|
||||
typename FromDuration::rep,
|
||||
boost::intmax_t>::type C;
|
||||
return ToDuration(static_cast<typename ToDuration::rep>(
|
||||
static_cast<C>(fd.count()) * static_cast<C>(Period::num)));
|
||||
}
|
||||
};
|
||||
|
||||
// When neither the numerator or denominator of FromPeriod / ToPeriod is 1, then we need to
|
||||
// multiply by the numerator and divide by the denominator of FromPeriod / ToPeriod. The
|
||||
// common_type of the two representations is used for the intermediate computation before
|
||||
// static_cast'ing to the destination.
|
||||
// This conversion is generally not exact because of the division (but could be
|
||||
// if you get lucky on the run time value of fd.count()).
|
||||
template <class FromDuration, class ToDuration, class Period>
|
||||
struct duration_cast_aux<FromDuration, ToDuration, Period, false, false>
|
||||
{
|
||||
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
|
||||
{
|
||||
typedef typename common_type<
|
||||
typename ToDuration::rep,
|
||||
typename FromDuration::rep,
|
||||
boost::intmax_t>::type C;
|
||||
return ToDuration(static_cast<typename ToDuration::rep>(
|
||||
static_cast<C>(fd.count()) * static_cast<C>(Period::num)
|
||||
/ static_cast<C>(Period::den)));
|
||||
}
|
||||
};
|
||||
|
||||
template <class FromDuration, class ToDuration>
|
||||
struct duration_cast {
|
||||
typedef typename ratio_divide<typename FromDuration::period,
|
||||
typename ToDuration::period>::type Period;
|
||||
typedef duration_cast_aux<
|
||||
FromDuration,
|
||||
ToDuration,
|
||||
Period,
|
||||
Period::num == 1,
|
||||
Period::den == 1
|
||||
> Aux;
|
||||
BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const
|
||||
{
|
||||
return Aux()(fd);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9.2 Time-related traits [time.traits] //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.2.1 treat_as_floating_point [time.traits.is_fp] //
|
||||
// Probably should have been treat_as_floating_point. Editor notifed. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// Support bidirectional (non-exact) conversions for floating point rep types
|
||||
// (or user defined rep types which specialize treat_as_floating_point).
|
||||
template <class Rep>
|
||||
struct treat_as_floating_point : boost::is_floating_point<Rep> {};
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.2.2 duration_values [time.traits.duration_values] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace detail {
|
||||
template <class T, bool = is_arithmetic<T>::value>
|
||||
struct chrono_numeric_limits {
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min) ();}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct chrono_numeric_limits<T,true> {
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits<T>::min) ();}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct chrono_numeric_limits<float,true> {
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR float lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
|
||||
{
|
||||
return -(std::numeric_limits<float>::max) ();
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct chrono_numeric_limits<double,true> {
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
|
||||
{
|
||||
return -(std::numeric_limits<double>::max) ();
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct chrono_numeric_limits<long double,true> {
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR long double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW
|
||||
{
|
||||
return -(std::numeric_limits<long double>::max)();
|
||||
}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct numeric_limits : chrono_numeric_limits<typename remove_cv<T>::type>
|
||||
{};
|
||||
|
||||
}
|
||||
template <class Rep>
|
||||
struct duration_values
|
||||
{
|
||||
static BOOST_CONSTEXPR Rep zero() {return Rep(0);}
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return (std::numeric_limits<Rep>::max)();
|
||||
}
|
||||
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return detail::numeric_limits<Rep>::lowest();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace chrono
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.2.3 Specializations of common_type [time.traits.specializations] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
struct common_type<chrono::duration<Rep1, Period1>,
|
||||
chrono::duration<Rep2, Period2> >
|
||||
{
|
||||
typedef chrono::duration<typename common_type<Rep1, Rep2>::type,
|
||||
typename boost::ratio_gcd<Period1, Period2>::type> type;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9.3 Class template duration [time.duration] //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
|
||||
namespace chrono {
|
||||
|
||||
template <class Rep, class Period>
|
||||
class BOOST_SYMBOL_VISIBLE duration
|
||||
{
|
||||
//BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_MUST_BE_INTEGRAL, ());
|
||||
BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::detail::is_duration<Rep>::value,
|
||||
BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION, ());
|
||||
BOOST_CHRONO_STATIC_ASSERT(boost::ratio_detail::is_ratio<typename Period::type>::value,
|
||||
BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO, ());
|
||||
BOOST_CHRONO_STATIC_ASSERT(Period::num>0,
|
||||
BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE, ());
|
||||
public:
|
||||
typedef Rep rep;
|
||||
typedef Period period;
|
||||
private:
|
||||
rep rep_;
|
||||
public:
|
||||
|
||||
BOOST_FORCEINLINE BOOST_CONSTEXPR
|
||||
duration() : rep_(duration_values<rep>::zero()) { }
|
||||
template <class Rep2>
|
||||
BOOST_SYMBOL_VISIBLE BOOST_FORCEINLINE BOOST_CONSTEXPR
|
||||
explicit duration(const Rep2& r
|
||||
, typename boost::enable_if <
|
||||
mpl::and_ <
|
||||
boost::is_convertible<Rep2, rep>,
|
||||
mpl::or_ <
|
||||
treat_as_floating_point<rep>,
|
||||
mpl::and_ <
|
||||
mpl::not_ < treat_as_floating_point<rep> >,
|
||||
mpl::not_ < treat_as_floating_point<Rep2> >
|
||||
>
|
||||
>
|
||||
>
|
||||
>::type* = 0
|
||||
) : rep_(r) { }
|
||||
//~duration() {} //= default;
|
||||
// BOOST_CONSTEXPR duration(const duration& rhs) : rep_(rhs.rep_) {} // = default;
|
||||
duration& operator=(const duration& rhs) // = default;
|
||||
{
|
||||
if (&rhs != this) rep_= rhs.rep_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// conversions
|
||||
template <class Rep2, class Period2>
|
||||
BOOST_FORCEINLINE BOOST_CONSTEXPR
|
||||
duration(const duration<Rep2, Period2>& d
|
||||
, typename boost::enable_if <
|
||||
mpl::or_ <
|
||||
treat_as_floating_point<rep>,
|
||||
mpl::and_ <
|
||||
chrono_detail::is_evenly_divisible_by<Period2, period>,
|
||||
mpl::not_ < treat_as_floating_point<Rep2> >
|
||||
>
|
||||
>
|
||||
>::type* = 0
|
||||
)
|
||||
: rep_(chrono::detail::duration_cast<duration<Rep2, Period2>, duration>()(d).count()) {}
|
||||
|
||||
// observer
|
||||
|
||||
BOOST_CONSTEXPR
|
||||
rep count() const {return rep_;}
|
||||
|
||||
// arithmetic
|
||||
|
||||
BOOST_CONSTEXPR
|
||||
duration operator+() const {return duration(rep_);;}
|
||||
BOOST_CONSTEXPR
|
||||
duration operator-() const {return duration(-rep_);}
|
||||
duration& operator++() {++rep_; return *this;}
|
||||
duration operator++(int) {return duration(rep_++);}
|
||||
duration& operator--() {--rep_; return *this;}
|
||||
duration operator--(int) {return duration(rep_--);}
|
||||
|
||||
duration& operator+=(const duration& d)
|
||||
{
|
||||
rep_ += d.count(); return *this;
|
||||
}
|
||||
duration& operator-=(const duration& d)
|
||||
{
|
||||
rep_ -= d.count(); return *this;
|
||||
}
|
||||
|
||||
duration& operator*=(const rep& rhs) {rep_ *= rhs; return *this;}
|
||||
duration& operator/=(const rep& rhs) {rep_ /= rhs; return *this;}
|
||||
duration& operator%=(const rep& rhs) {rep_ %= rhs; return *this;}
|
||||
duration& operator%=(const duration& rhs)
|
||||
{
|
||||
rep_ %= rhs.count(); return *this;
|
||||
}
|
||||
// 20.9.3.4 duration special values [time.duration.special]
|
||||
|
||||
static BOOST_CONSTEXPR duration zero()
|
||||
{
|
||||
return duration(duration_values<rep>::zero());
|
||||
}
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return duration((duration_values<rep>::min)());
|
||||
}
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return duration((duration_values<rep>::max)());
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.3.5 duration non-member arithmetic [time.duration.nonmember] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// Duration +
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
|
||||
operator+(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
typedef typename common_type<duration<Rep1, Period1>,
|
||||
duration<Rep2, Period2> >::type CD;
|
||||
return CD(CD(lhs).count()+CD(rhs).count());
|
||||
}
|
||||
|
||||
// Duration -
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
|
||||
operator-(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
typedef typename common_type<duration<Rep1, Period1>,
|
||||
duration<Rep2, Period2> >::type CD;
|
||||
return CD(CD(lhs).count()-CD(rhs).count());
|
||||
}
|
||||
|
||||
// Duration *
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::enable_if <
|
||||
mpl::and_ <
|
||||
boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>,
|
||||
boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>
|
||||
>,
|
||||
duration<typename common_type<Rep1, Rep2>::type, Period>
|
||||
>::type
|
||||
operator*(const duration<Rep1, Period>& d, const Rep2& s)
|
||||
{
|
||||
typedef typename common_type<Rep1, Rep2>::type CR;
|
||||
typedef duration<CR, Period> CD;
|
||||
return CD(CD(d).count()*static_cast<CR>(s));
|
||||
}
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::enable_if <
|
||||
mpl::and_ <
|
||||
boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>,
|
||||
boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>
|
||||
>,
|
||||
duration<typename common_type<Rep1, Rep2>::type, Period>
|
||||
>::type
|
||||
operator*(const Rep1& s, const duration<Rep2, Period>& d)
|
||||
{
|
||||
return d * s;
|
||||
}
|
||||
|
||||
// Duration /
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
|
||||
typename boost::chrono::detail::duration_divide_result<
|
||||
duration<Rep1, Period>, Rep2>::type
|
||||
>::type
|
||||
operator/(const duration<Rep1, Period>& d, const Rep2& s)
|
||||
{
|
||||
typedef typename common_type<Rep1, Rep2>::type CR;
|
||||
typedef duration<CR, Period> CD;
|
||||
|
||||
return CD(CD(d).count()/static_cast<CR>(s));
|
||||
}
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<Rep1, Rep2>::type
|
||||
operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
typedef typename common_type<duration<Rep1, Period1>,
|
||||
duration<Rep2, Period2> >::type CD;
|
||||
return CD(lhs).count() / CD(rhs).count();
|
||||
}
|
||||
|
||||
#ifdef BOOST_CHRONO_EXTENSIONS
|
||||
template <class Rep1, class Rep2, class Period>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::disable_if <boost::chrono::detail::is_duration<Rep1>,
|
||||
typename boost::chrono::detail::duration_divide_result2<
|
||||
Rep1, duration<Rep2, Period> >::type
|
||||
>::type
|
||||
operator/(const Rep1& s, const duration<Rep2, Period>& d)
|
||||
{
|
||||
typedef typename common_type<Rep1, Rep2>::type CR;
|
||||
typedef duration<CR, Period> CD;
|
||||
|
||||
return static_cast<CR>(s)/CD(d).count();
|
||||
}
|
||||
#endif
|
||||
// Duration %
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
|
||||
typename boost::chrono::detail::duration_modulo_result<
|
||||
duration<Rep1, Period>, Rep2>::type
|
||||
>::type
|
||||
operator%(const duration<Rep1, Period>& d, const Rep2& s)
|
||||
{
|
||||
typedef typename common_type<Rep1, Rep2>::type CR;
|
||||
typedef duration<CR, Period> CD;
|
||||
|
||||
return CD(CD(d).count()%static_cast<CR>(s));
|
||||
}
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
|
||||
operator%(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs) {
|
||||
typedef typename common_type<duration<Rep1, Period1>,
|
||||
duration<Rep2, Period2> >::type CD;
|
||||
|
||||
return CD(CD(lhs).count()%CD(rhs).count());
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.3.6 duration comparisons [time.duration.comparisons] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <class LhsDuration, class RhsDuration>
|
||||
struct duration_eq
|
||||
{
|
||||
BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const
|
||||
{
|
||||
typedef typename common_type<LhsDuration, RhsDuration>::type CD;
|
||||
return CD(lhs).count() == CD(rhs).count();
|
||||
}
|
||||
};
|
||||
|
||||
template <class LhsDuration>
|
||||
struct duration_eq<LhsDuration, LhsDuration>
|
||||
{
|
||||
BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const
|
||||
{
|
||||
return lhs.count() == rhs.count();
|
||||
}
|
||||
};
|
||||
|
||||
template <class LhsDuration, class RhsDuration>
|
||||
struct duration_lt
|
||||
{
|
||||
BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const
|
||||
{
|
||||
typedef typename common_type<LhsDuration, RhsDuration>::type CD;
|
||||
return CD(lhs).count() < CD(rhs).count();
|
||||
}
|
||||
};
|
||||
|
||||
template <class LhsDuration>
|
||||
struct duration_lt<LhsDuration, LhsDuration>
|
||||
{
|
||||
BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const
|
||||
{
|
||||
return lhs.count() < rhs.count();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
// Duration ==
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator==(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return boost::chrono::detail::duration_eq<
|
||||
duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
|
||||
}
|
||||
|
||||
// Duration !=
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator!=(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
// Duration <
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator< (const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return boost::chrono::detail::duration_lt<
|
||||
duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
|
||||
}
|
||||
|
||||
// Duration >
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator> (const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return rhs < lhs;
|
||||
}
|
||||
|
||||
// Duration <=
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator<=(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return !(rhs < lhs);
|
||||
}
|
||||
|
||||
// Duration >=
|
||||
|
||||
template <class Rep1, class Period1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator>=(const duration<Rep1, Period1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return !(lhs < rhs);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.3.7 duration_cast [time.duration.cast] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// Compile-time select the most efficient algorithm for the conversion...
|
||||
template <class ToDuration, class Rep, class Period>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename boost::enable_if <
|
||||
boost::chrono::detail::is_duration<ToDuration>, ToDuration>::type
|
||||
duration_cast(const duration<Rep, Period>& fd)
|
||||
{
|
||||
return boost::chrono::detail::duration_cast<
|
||||
duration<Rep, Period>, ToDuration>()(fd);
|
||||
}
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
#ifndef BOOST_CHRONO_HEADER_ONLY
|
||||
// the suffix header occurs after all of our code:
|
||||
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CHRONO_DURATION_HPP
|
|
@ -1,233 +0,0 @@
|
|||
// boost/chrono/system_clocks.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2008 Howard Hinnant
|
||||
// Copyright 2008 Beman Dawes
|
||||
// Copyright 2009-2011 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
/*
|
||||
|
||||
This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
|
||||
Many thanks to Howard for making his code available under the Boost license.
|
||||
The original code was modified to conform to Boost conventions and to section
|
||||
20.9 Time utilities [time] of the C++ committee's working paper N2798.
|
||||
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
|
||||
|
||||
time2_demo contained this comment:
|
||||
|
||||
Much thanks to Andrei Alexandrescu,
|
||||
Walter Brown,
|
||||
Peter Dimov,
|
||||
Jeff Garland,
|
||||
Terry Golubiewski,
|
||||
Daniel Krugler,
|
||||
Anthony Williams.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
TODO:
|
||||
|
||||
* Fully implement error handling, with test cases.
|
||||
* Consider issues raised by Michael Marcin:
|
||||
|
||||
> In the past I've seen QueryPerformanceCounter give incorrect results,
|
||||
> especially with SpeedStep processors on laptops. This was many years ago and
|
||||
> might have been fixed by service packs and drivers.
|
||||
>
|
||||
> Typically you check the results of QPC against GetTickCount to see if the
|
||||
> results are reasonable.
|
||||
> http://support.microsoft.com/kb/274323
|
||||
>
|
||||
> I've also heard of problems with QueryPerformanceCounter in multi-processor
|
||||
> systems.
|
||||
>
|
||||
> I know some people SetThreadAffinityMask to 1 for the current thread call
|
||||
> their QueryPerformance* functions then restore SetThreadAffinityMask. This
|
||||
> seems horrible to me because it forces your program to jump to another
|
||||
> physical processor if it isn't already on cpu0 but they claim it worked well
|
||||
> in practice because they called the timing functions infrequently.
|
||||
>
|
||||
> In the past I have chosen to use timeGetTime with timeBeginPeriod(1) for
|
||||
> high resolution timers to avoid these issues.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BOOST_CHRONO_SYSTEM_CLOCKS_HPP
|
||||
#define BOOST_CHRONO_SYSTEM_CLOCKS_HPP
|
||||
|
||||
#include <boost/chrono/config.hpp>
|
||||
#include <boost/chrono/duration.hpp>
|
||||
#include <boost/chrono/time_point.hpp>
|
||||
#include <boost/chrono/detail/system.hpp>
|
||||
#include <boost/chrono/clock_string.hpp>
|
||||
|
||||
#include <ctime>
|
||||
|
||||
# if defined( BOOST_CHRONO_POSIX_API )
|
||||
# if ! defined(CLOCK_REALTIME) && ! defined (__hpux__)
|
||||
# error <time.h> does not supply CLOCK_REALTIME
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef BOOST_CHRONO_WINDOWS_API
|
||||
// The system_clock tick is 100 nanoseconds
|
||||
# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::duration<boost::int_least64_t, ratio<BOOST_RATIO_INTMAX_C(1), BOOST_RATIO_INTMAX_C(10000000)> >
|
||||
#else
|
||||
# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::nanoseconds
|
||||
#endif
|
||||
|
||||
// this must occur after all of the includes and before any code appears:
|
||||
#ifndef BOOST_CHRONO_HEADER_ONLY
|
||||
#include <boost/config/abi_prefix.hpp> // must be the last #include
|
||||
#endif
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9 Time utilities [time] //
|
||||
// synopsis //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace boost {
|
||||
namespace chrono {
|
||||
|
||||
// Clocks
|
||||
class BOOST_CHRONO_DECL system_clock;
|
||||
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
class BOOST_CHRONO_DECL steady_clock;
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
typedef steady_clock high_resolution_clock; // as permitted by [time.clock.hires]
|
||||
#else
|
||||
typedef system_clock high_resolution_clock; // as permitted by [time.clock.hires]
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9.5 Clocks [time.clock] //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// If you're porting, clocks are the system-specific (non-portable) part.
|
||||
// You'll need to know how to get the current time and implement that under now().
|
||||
// You'll need to know what units (tick period) and representation makes the most
|
||||
// sense for your clock and set those accordingly.
|
||||
// If you know how to map this clock to time_t (perhaps your clock is std::time, which
|
||||
// makes that trivial), then you can fill out system_clock's to_time_t() and from_time_t().
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.5.1 Class system_clock [time.clock.system] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
class BOOST_CHRONO_DECL system_clock
|
||||
{
|
||||
public:
|
||||
typedef BOOST_SYSTEM_CLOCK_DURATION duration;
|
||||
typedef duration::rep rep;
|
||||
typedef duration::period period;
|
||||
typedef chrono::time_point<system_clock> time_point;
|
||||
BOOST_STATIC_CONSTEXPR bool is_steady = false;
|
||||
|
||||
static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
static BOOST_CHRONO_INLINE time_point now(system::error_code & ec);
|
||||
#endif
|
||||
|
||||
static BOOST_CHRONO_INLINE std::time_t to_time_t(const time_point& t) BOOST_NOEXCEPT;
|
||||
static BOOST_CHRONO_INLINE time_point from_time_t(std::time_t t) BOOST_NOEXCEPT;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.5.2 Class steady_clock [time.clock.steady] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// As permitted by [time.clock.steady]
|
||||
// The class steady_clock is conditionally supported.
|
||||
|
||||
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
class BOOST_CHRONO_DECL steady_clock
|
||||
{
|
||||
public:
|
||||
typedef nanoseconds duration;
|
||||
typedef duration::rep rep;
|
||||
typedef duration::period period;
|
||||
typedef chrono::time_point<steady_clock> time_point;
|
||||
BOOST_STATIC_CONSTEXPR bool is_steady = true;
|
||||
|
||||
static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT;
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
static BOOST_CHRONO_INLINE time_point now(system::error_code & ec);
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.5.3 Class high_resolution_clock [time.clock.hires] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// As permitted, steady_clock or system_clock is a typedef for high_resolution_clock.
|
||||
// See synopsis.
|
||||
|
||||
|
||||
template<class CharT>
|
||||
struct clock_string<system_clock, CharT>
|
||||
{
|
||||
static std::basic_string<CharT> name()
|
||||
{
|
||||
static const CharT u[] =
|
||||
{ 's', 'y', 's', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' };
|
||||
static const std::basic_string<CharT> str(u, u + sizeof(u)
|
||||
/ sizeof(u[0]));
|
||||
return str;
|
||||
}
|
||||
static std::basic_string<CharT> since()
|
||||
{
|
||||
static const CharT
|
||||
u[] =
|
||||
{ ' ', 's', 'i', 'n', 'c', 'e', ' ', 'J', 'a', 'n', ' ', '1', ',', ' ', '1', '9', '7', '0' };
|
||||
static const std::basic_string<CharT> str(u, u + sizeof(u)
|
||||
/ sizeof(u[0]));
|
||||
return str;
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
|
||||
|
||||
template<class CharT>
|
||||
struct clock_string<steady_clock, CharT>
|
||||
{
|
||||
static std::basic_string<CharT> name()
|
||||
{
|
||||
static const CharT
|
||||
u[] =
|
||||
{ 's', 't', 'e', 'a', 'd', 'y', '_', 'c', 'l', 'o', 'c', 'k' };
|
||||
static const std::basic_string<CharT> str(u, u + sizeof(u)
|
||||
/ sizeof(u[0]));
|
||||
return str;
|
||||
}
|
||||
static std::basic_string<CharT> since()
|
||||
{
|
||||
const CharT u[] =
|
||||
{ ' ', 's', 'i', 'n', 'c', 'e', ' ', 'b', 'o', 'o', 't' };
|
||||
const std::basic_string<CharT> str(u, u + sizeof(u) / sizeof(u[0]));
|
||||
return str;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
#ifndef BOOST_CHRONO_HEADER_ONLY
|
||||
// the suffix header occurs after all of our code:
|
||||
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
|
||||
#else
|
||||
#include <boost/chrono/detail/inlined/chrono.hpp>
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CHRONO_SYSTEM_CLOCKS_HPP
|
|
@ -1,380 +0,0 @@
|
|||
// duration.hpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright 2008 Howard Hinnant
|
||||
// Copyright 2008 Beman Dawes
|
||||
// Copyright 2009-2012 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
/*
|
||||
|
||||
This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
|
||||
Many thanks to Howard for making his code available under the Boost license.
|
||||
The original code was modified to conform to Boost conventions and to section
|
||||
20.9 Time utilities [time] of the C++ committee's working paper N2798.
|
||||
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
|
||||
|
||||
time2_demo contained this comment:
|
||||
|
||||
Much thanks to Andrei Alexandrescu,
|
||||
Walter Brown,
|
||||
Peter Dimov,
|
||||
Jeff Garland,
|
||||
Terry Golubiewski,
|
||||
Daniel Krugler,
|
||||
Anthony Williams.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_CHRONO_TIME_POINT_HPP
|
||||
#define BOOST_CHRONO_TIME_POINT_HPP
|
||||
|
||||
#include <boost/chrono/duration.hpp>
|
||||
#include <iostream>
|
||||
|
||||
#ifndef BOOST_CHRONO_HEADER_ONLY
|
||||
// this must occur after all of the includes and before any code appears:
|
||||
#include <boost/config/abi_prefix.hpp> // must be the last #include
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9 Time utilities [time] //
|
||||
// synopsis //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace boost {
|
||||
namespace chrono {
|
||||
|
||||
template <class Clock, class Duration = typename Clock::duration>
|
||||
class time_point;
|
||||
|
||||
|
||||
} // namespace chrono
|
||||
|
||||
|
||||
// common_type trait specializations
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
struct common_type<chrono::time_point<Clock, Duration1>,
|
||||
chrono::time_point<Clock, Duration2> >;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.2.3 Specializations of common_type [time.traits.specializations] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
struct common_type<chrono::time_point<Clock, Duration1>,
|
||||
chrono::time_point<Clock, Duration2> >
|
||||
{
|
||||
typedef chrono::time_point<Clock,
|
||||
typename common_type<Duration1, Duration2>::type> type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
namespace chrono {
|
||||
|
||||
// time_point arithmetic
|
||||
template <class Clock, class Duration1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<Duration1, duration<Rep2, Period2> >::type>
|
||||
operator+(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs);
|
||||
template <class Rep1, class Period1, class Clock, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<duration<Rep1, Period1>, Duration2>::type>
|
||||
operator+(
|
||||
const duration<Rep1, Period1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<Duration1, duration<Rep2, Period2> >::type>
|
||||
operator-(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<Duration1, Duration2>::type
|
||||
operator-(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock,
|
||||
Duration2>& rhs);
|
||||
|
||||
// time_point comparisons
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator==(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator!=(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator< (
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator<=(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator> (
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool operator>=(
|
||||
const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs);
|
||||
|
||||
// time_point_cast
|
||||
template <class ToDuration, class Clock, class Duration>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// 20.9.4 Class template time_point [time.point] //
|
||||
// //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
template <class Clock, class Duration>
|
||||
class time_point
|
||||
{
|
||||
BOOST_CHRONO_STATIC_ASSERT(boost::chrono::detail::is_duration<Duration>::value,
|
||||
BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION, (Duration));
|
||||
public:
|
||||
typedef Clock clock;
|
||||
typedef Duration duration;
|
||||
typedef typename duration::rep rep;
|
||||
typedef typename duration::period period;
|
||||
typedef Duration difference_type;
|
||||
|
||||
private:
|
||||
duration d_;
|
||||
|
||||
public:
|
||||
BOOST_FORCEINLINE BOOST_CONSTEXPR
|
||||
time_point() : d_(duration::zero())
|
||||
{}
|
||||
BOOST_FORCEINLINE BOOST_CONSTEXPR
|
||||
explicit time_point(const duration& d)
|
||||
: d_(d)
|
||||
{}
|
||||
|
||||
// conversions
|
||||
template <class Duration2>
|
||||
BOOST_FORCEINLINE BOOST_CONSTEXPR
|
||||
time_point(const time_point<clock, Duration2>& t
|
||||
, typename boost::enable_if
|
||||
<
|
||||
boost::is_convertible<Duration2, duration>
|
||||
>::type* = 0
|
||||
)
|
||||
: d_(t.time_since_epoch())
|
||||
{
|
||||
}
|
||||
// observer
|
||||
|
||||
BOOST_CONSTEXPR
|
||||
duration time_since_epoch() const
|
||||
{
|
||||
return d_;
|
||||
}
|
||||
|
||||
// arithmetic
|
||||
|
||||
#ifdef BOOST_CHRONO_EXTENSIONS
|
||||
BOOST_CONSTEXPR
|
||||
time_point operator+() const {return *this;}
|
||||
BOOST_CONSTEXPR
|
||||
time_point operator-() const {return time_point(-d_);}
|
||||
time_point& operator++() {++d_; return *this;}
|
||||
time_point operator++(int) {return time_point(d_++);}
|
||||
time_point& operator--() {--d_; return *this;}
|
||||
time_point operator--(int) {return time_point(d_--);}
|
||||
|
||||
time_point& operator+=(const rep& r) {d_ += duration(r); return *this;}
|
||||
time_point& operator-=(const rep& r) {d_ -= duration(r); return *this;}
|
||||
|
||||
#endif
|
||||
|
||||
time_point& operator+=(const duration& d) {d_ += d; return *this;}
|
||||
time_point& operator-=(const duration& d) {d_ -= d; return *this;}
|
||||
|
||||
// special values
|
||||
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR time_point
|
||||
min BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return time_point((duration::min)());
|
||||
}
|
||||
static BOOST_CHRONO_LIB_CONSTEXPR time_point
|
||||
max BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{
|
||||
return time_point((duration::max)());
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.4.5 time_point non-member arithmetic [time.point.nonmember] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// time_point operator+(time_point x, duration y);
|
||||
|
||||
template <class Clock, class Duration1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<Duration1, duration<Rep2, Period2> >::type>
|
||||
operator+(const time_point<Clock, Duration1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
typedef typename common_type<Duration1, duration<Rep2, Period2> >::type CDuration;
|
||||
typedef time_point<
|
||||
Clock,
|
||||
CDuration
|
||||
> TimeResult;
|
||||
return TimeResult(lhs.time_since_epoch() + CDuration(rhs));
|
||||
}
|
||||
|
||||
// time_point operator+(duration x, time_point y);
|
||||
|
||||
template <class Rep1, class Period1, class Clock, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<duration<Rep1, Period1>, Duration2>::type>
|
||||
operator+(const duration<Rep1, Period1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return rhs + lhs;
|
||||
}
|
||||
|
||||
// time_point operator-(time_point x, duration y);
|
||||
|
||||
template <class Clock, class Duration1, class Rep2, class Period2>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock,
|
||||
typename common_type<Duration1, duration<Rep2, Period2> >::type>
|
||||
operator-(const time_point<Clock, Duration1>& lhs,
|
||||
const duration<Rep2, Period2>& rhs)
|
||||
{
|
||||
return lhs + (-rhs);
|
||||
}
|
||||
|
||||
// duration operator-(time_point x, time_point y);
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
typename common_type<Duration1, Duration2>::type
|
||||
operator-(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return lhs.time_since_epoch() - rhs.time_since_epoch();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.4.6 time_point comparisons [time.point.comparisons] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// time_point ==
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator==(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return lhs.time_since_epoch() == rhs.time_since_epoch();
|
||||
}
|
||||
|
||||
// time_point !=
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator!=(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
// time_point <
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator<(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return lhs.time_since_epoch() < rhs.time_since_epoch();
|
||||
}
|
||||
|
||||
// time_point >
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator>(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return rhs < lhs;
|
||||
}
|
||||
|
||||
// time_point <=
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator<=(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return !(rhs < lhs);
|
||||
}
|
||||
|
||||
// time_point >=
|
||||
|
||||
template <class Clock, class Duration1, class Duration2>
|
||||
inline BOOST_CONSTEXPR
|
||||
bool
|
||||
operator>=(const time_point<Clock, Duration1>& lhs,
|
||||
const time_point<Clock, Duration2>& rhs)
|
||||
{
|
||||
return !(lhs < rhs);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// 20.9.4.7 time_point_cast [time.point.cast] //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
template <class ToDuration, class Clock, class Duration>
|
||||
inline BOOST_CONSTEXPR
|
||||
time_point<Clock, ToDuration>
|
||||
time_point_cast(const time_point<Clock, Duration>& t)
|
||||
{
|
||||
return time_point<Clock, ToDuration>(
|
||||
duration_cast<ToDuration>(t.time_since_epoch()));
|
||||
}
|
||||
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
|
||||
#ifndef BOOST_CHRONO_HEADER_ONLY
|
||||
// the suffix header occurs after all of our code:
|
||||
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CHRONO_TIME_POINT_HPP
|
|
@ -1,46 +0,0 @@
|
|||
// Copyright David Abrahams 2006. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP
|
||||
# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP
|
||||
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/detail/workaround.hpp>
|
||||
|
||||
// The old protocol used a constraints() member function in concept
|
||||
// checking classes. If the compiler supports SFINAE, we can detect
|
||||
// that function and seamlessly support the old concept checking
|
||||
// classes. In this release, backward compatibility with the old
|
||||
// concept checking classes is enabled by default, where available.
|
||||
// The old protocol is deprecated, though, and backward compatibility
|
||||
// will no longer be the default in the next release.
|
||||
|
||||
# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \
|
||||
&& !defined(BOOST_NO_SFINAE) \
|
||||
\
|
||||
&& !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) \
|
||||
&& !(BOOST_WORKAROUND(__GNUC__, == 2))
|
||||
|
||||
// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to
|
||||
// check for the presence of particularmember functions.
|
||||
|
||||
# define BOOST_OLD_CONCEPT_SUPPORT
|
||||
|
||||
# endif
|
||||
|
||||
# ifdef BOOST_MSVC
|
||||
# include <boost/concept/detail/msvc.hpp>
|
||||
# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
# include <boost/concept/detail/borland.hpp>
|
||||
# else
|
||||
# include <boost/concept/detail/general.hpp>
|
||||
# endif
|
||||
|
||||
// Usage, in class or function context:
|
||||
//
|
||||
// BOOST_CONCEPT_ASSERT((UnaryFunctionConcept<F,bool,int>));
|
||||
//
|
||||
# define BOOST_CONCEPT_ASSERT(ModelInParens) \
|
||||
BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
|
||||
|
||||
#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright David Abrahams 2009. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
|
||||
# define BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace concepts {}
|
||||
|
||||
# if defined(BOOST_HAS_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD)
|
||||
namespace concept = concepts;
|
||||
# endif
|
||||
} // namespace boost::concept
|
||||
|
||||
#endif // BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
|
|
@ -1,30 +0,0 @@
|
|||
// Copyright David Abrahams 2006. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
|
||||
# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
|
||||
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/concept/detail/backward_compatibility.hpp>
|
||||
|
||||
namespace boost { namespace concepts {
|
||||
|
||||
template <class ModelFnPtr>
|
||||
struct require;
|
||||
|
||||
template <class Model>
|
||||
struct require<void(*)(Model)>
|
||||
{
|
||||
enum { instantiate = sizeof((((Model*)0)->~Model()), 3) };
|
||||
};
|
||||
|
||||
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
|
||||
enum \
|
||||
{ \
|
||||
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
|
||||
boost::concepts::require<ModelFnPtr>::instantiate \
|
||||
}
|
||||
|
||||
}} // namespace boost::concept
|
||||
|
||||
#endif // BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
|
|
@ -1,51 +0,0 @@
|
|||
// Copyright David Abrahams 2006. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
|
||||
# define BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
|
||||
# include <boost/preprocessor/seq/for_each_i.hpp>
|
||||
# include <boost/preprocessor/seq/enum.hpp>
|
||||
# include <boost/preprocessor/comma_if.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
#endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
|
||||
|
||||
// BOOST_concept(SomeName, (p1)(p2)...(pN))
|
||||
//
|
||||
// Expands to "template <class p1, class p2, ...class pN> struct SomeName"
|
||||
//
|
||||
// Also defines an equivalent SomeNameConcept for backward compatibility.
|
||||
// Maybe in the next release we can kill off the "Concept" suffix for good.
|
||||
#if BOOST_WORKAROUND(__GNUC__, <= 3)
|
||||
# define BOOST_concept(name, params) \
|
||||
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
|
||||
struct name; /* forward declaration */ \
|
||||
\
|
||||
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
|
||||
struct BOOST_PP_CAT(name,Concept) \
|
||||
: name< BOOST_PP_SEQ_ENUM(params) > \
|
||||
{ \
|
||||
/* at least 2.96 and 3.4.3 both need this */ \
|
||||
BOOST_PP_CAT(name,Concept)(); \
|
||||
}; \
|
||||
\
|
||||
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
|
||||
struct name
|
||||
#else
|
||||
# define BOOST_concept(name, params) \
|
||||
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
|
||||
struct name; /* forward declaration */ \
|
||||
\
|
||||
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
|
||||
struct BOOST_PP_CAT(name,Concept) \
|
||||
: name< BOOST_PP_SEQ_ENUM(params) > \
|
||||
{ \
|
||||
}; \
|
||||
\
|
||||
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
|
||||
struct name
|
||||
#endif
|
||||
|
||||
// Helper for BOOST_concept, above.
|
||||
# define BOOST_CONCEPT_typename(r, ignored, index, t) \
|
||||
BOOST_PP_COMMA_IF(index) typename t
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
// Copyright David Abrahams 2006. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
# undef BOOST_concept_typename
|
||||
# undef BOOST_concept
|
|
@ -1,75 +0,0 @@
|
|||
// Copyright David Abrahams 2006. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
|
||||
# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
|
||||
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/concept/detail/backward_compatibility.hpp>
|
||||
|
||||
# ifdef BOOST_OLD_CONCEPT_SUPPORT
|
||||
# include <boost/concept/detail/has_constraints.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# endif
|
||||
|
||||
// This implementation works on Comeau and GCC, all the way back to
|
||||
// 2.95
|
||||
namespace boost { namespace concepts {
|
||||
|
||||
template <class ModelFn>
|
||||
struct requirement_;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <void(*)()> struct instantiate {};
|
||||
}
|
||||
|
||||
template <class Model>
|
||||
struct requirement
|
||||
{
|
||||
static void failed() { ((Model*)0)->~Model(); }
|
||||
};
|
||||
|
||||
struct failed {};
|
||||
|
||||
template <class Model>
|
||||
struct requirement<failed ************ Model::************>
|
||||
{
|
||||
static void failed() { ((Model*)0)->~Model(); }
|
||||
};
|
||||
|
||||
# ifdef BOOST_OLD_CONCEPT_SUPPORT
|
||||
|
||||
template <class Model>
|
||||
struct constraint
|
||||
{
|
||||
static void failed() { ((Model*)0)->constraints(); }
|
||||
};
|
||||
|
||||
template <class Model>
|
||||
struct requirement_<void(*)(Model)>
|
||||
: mpl::if_<
|
||||
concepts::not_satisfied<Model>
|
||||
, constraint<Model>
|
||||
, requirement<failed ************ Model::************>
|
||||
>::type
|
||||
{};
|
||||
|
||||
# else
|
||||
|
||||
// For GCC-2.x, these can't have exactly the same name
|
||||
template <class Model>
|
||||
struct requirement_<void(*)(Model)>
|
||||
: requirement<failed ************ Model::************>
|
||||
{};
|
||||
|
||||
# endif
|
||||
|
||||
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
|
||||
typedef ::boost::concepts::detail::instantiate< \
|
||||
&::boost::concepts::requirement_<ModelFnPtr>::failed> \
|
||||
BOOST_PP_CAT(boost_concept_check,__LINE__)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
|
|
@ -1,50 +0,0 @@
|
|||
// Copyright David Abrahams 2006. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
|
||||
# define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
|
||||
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/detail/workaround.hpp>
|
||||
# include <boost/concept/detail/backward_compatibility.hpp>
|
||||
|
||||
namespace boost { namespace concepts {
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Here we implement the metafunction that detects whether a
|
||||
// constraints metafunction exists
|
||||
typedef char yes;
|
||||
typedef char (&no)[2];
|
||||
|
||||
template <class Model, void (Model::*)()>
|
||||
struct wrap_constraints {};
|
||||
|
||||
#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__)
|
||||
// Work around the following bogus error in Sun Studio 11, by
|
||||
// turning off the has_constraints function entirely:
|
||||
// Error: complex expression not allowed in dependent template
|
||||
// argument expression
|
||||
inline no has_constraints_(...);
|
||||
#else
|
||||
template <class Model>
|
||||
inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
|
||||
inline no has_constraints_(...);
|
||||
#endif
|
||||
}
|
||||
|
||||
// This would be called "detail::has_constraints," but it has a strong
|
||||
// tendency to show up in error messages.
|
||||
template <class Model>
|
||||
struct not_satisfied
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool
|
||||
, value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) );
|
||||
typedef mpl::bool_<value> type;
|
||||
};
|
||||
|
||||
}} // namespace boost::concepts::detail
|
||||
|
||||
#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
|
|
@ -1,114 +0,0 @@
|
|||
// Copyright David Abrahams 2006. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
|
||||
# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
|
||||
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/concept/detail/backward_compatibility.hpp>
|
||||
|
||||
# ifdef BOOST_OLD_CONCEPT_SUPPORT
|
||||
# include <boost/concept/detail/has_constraints.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# endif
|
||||
|
||||
|
||||
namespace boost { namespace concepts {
|
||||
|
||||
|
||||
template <class Model>
|
||||
struct check
|
||||
{
|
||||
virtual void failed(Model* x)
|
||||
{
|
||||
x->~Model();
|
||||
}
|
||||
};
|
||||
|
||||
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
|
||||
struct failed {};
|
||||
template <class Model>
|
||||
struct check<failed ************ Model::************>
|
||||
{
|
||||
virtual void failed(Model* x)
|
||||
{
|
||||
x->~Model();
|
||||
}
|
||||
};
|
||||
# endif
|
||||
|
||||
# ifdef BOOST_OLD_CONCEPT_SUPPORT
|
||||
|
||||
namespace detail
|
||||
{
|
||||
// No need for a virtual function here, since evaluating
|
||||
// not_satisfied below will have already instantiated the
|
||||
// constraints() member.
|
||||
struct constraint {};
|
||||
}
|
||||
|
||||
template <class Model>
|
||||
struct require
|
||||
: mpl::if_c<
|
||||
not_satisfied<Model>::value
|
||||
, detail::constraint
|
||||
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
|
||||
, check<Model>
|
||||
# else
|
||||
, check<failed ************ Model::************>
|
||||
# endif
|
||||
>::type
|
||||
{};
|
||||
|
||||
# else
|
||||
|
||||
template <class Model>
|
||||
struct require
|
||||
# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
|
||||
: check<Model>
|
||||
# else
|
||||
: check<failed ************ Model::************>
|
||||
# endif
|
||||
{};
|
||||
|
||||
# endif
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
|
||||
|
||||
//
|
||||
// The iterator library sees some really strange errors unless we
|
||||
// do things this way.
|
||||
//
|
||||
template <class Model>
|
||||
struct require<void(*)(Model)>
|
||||
{
|
||||
virtual void failed(Model*)
|
||||
{
|
||||
require<Model>();
|
||||
}
|
||||
};
|
||||
|
||||
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
|
||||
enum \
|
||||
{ \
|
||||
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
|
||||
sizeof(::boost::concepts::require<ModelFnPtr>) \
|
||||
}
|
||||
|
||||
# else // Not vc-7.1
|
||||
|
||||
template <class Model>
|
||||
require<Model>
|
||||
require_(void(*)(Model));
|
||||
|
||||
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
|
||||
enum \
|
||||
{ \
|
||||
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
|
||||
sizeof(::boost::concepts::require_((ModelFnPtr)0)) \
|
||||
}
|
||||
|
||||
# endif
|
||||
}}
|
||||
|
||||
#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
|
|
@ -1,44 +0,0 @@
|
|||
// Copyright David Abrahams 2006. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP
|
||||
# define BOOST_CONCEPT_USAGE_DWA2006919_HPP
|
||||
|
||||
# include <boost/concept/assert.hpp>
|
||||
# include <boost/detail/workaround.hpp>
|
||||
# include <boost/concept/detail/backward_compatibility.hpp>
|
||||
|
||||
namespace boost { namespace concepts {
|
||||
|
||||
# if BOOST_WORKAROUND(__GNUC__, == 2)
|
||||
|
||||
# define BOOST_CONCEPT_USAGE(model) ~model()
|
||||
|
||||
# else
|
||||
|
||||
template <class Model>
|
||||
struct usage_requirements
|
||||
{
|
||||
~usage_requirements() { ((Model*)0)->~Model(); }
|
||||
};
|
||||
|
||||
# if BOOST_WORKAROUND(__GNUC__, <= 3)
|
||||
|
||||
# define BOOST_CONCEPT_USAGE(model) \
|
||||
model(); /* at least 2.96 and 3.4.3 both need this :( */ \
|
||||
BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
|
||||
~model()
|
||||
|
||||
# else
|
||||
|
||||
# define BOOST_CONCEPT_USAGE(model) \
|
||||
BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
|
||||
~model()
|
||||
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
}} // namespace boost::concepts
|
||||
|
||||
#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP
|
|
@ -1,63 +0,0 @@
|
|||
// Boost config.hpp configuration header file ------------------------------//
|
||||
|
||||
// (C) Copyright John Maddock 2002.
|
||||
// Use, modification and distribution are subject to 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/config for most recent version.
|
||||
|
||||
// Boost config.hpp policy and rationale documentation has been moved to
|
||||
// http://www.boost.org/libs/config
|
||||
//
|
||||
// CAUTION: This file is intended to be completely stable -
|
||||
// DO NOT MODIFY THIS FILE!
|
||||
//
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
#define BOOST_CONFIG_HPP
|
||||
|
||||
// if we don't have a user config, then use the default location:
|
||||
#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG)
|
||||
# define BOOST_USER_CONFIG <boost/config/user.hpp>
|
||||
#endif
|
||||
// include it first:
|
||||
#ifdef BOOST_USER_CONFIG
|
||||
# include BOOST_USER_CONFIG
|
||||
#endif
|
||||
|
||||
// if we don't have a compiler config set, try and find one:
|
||||
#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG)
|
||||
# include <boost/config/select_compiler_config.hpp>
|
||||
#endif
|
||||
// if we have a compiler config, include it now:
|
||||
#ifdef BOOST_COMPILER_CONFIG
|
||||
# include BOOST_COMPILER_CONFIG
|
||||
#endif
|
||||
|
||||
// if we don't have a std library config set, try and find one:
|
||||
#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus)
|
||||
# include <boost/config/select_stdlib_config.hpp>
|
||||
#endif
|
||||
// if we have a std library config, include it now:
|
||||
#ifdef BOOST_STDLIB_CONFIG
|
||||
# include BOOST_STDLIB_CONFIG
|
||||
#endif
|
||||
|
||||
// if we don't have a platform config set, try and find one:
|
||||
#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG)
|
||||
# include <boost/config/select_platform_config.hpp>
|
||||
#endif
|
||||
// if we have a platform config, include it now:
|
||||
#ifdef BOOST_PLATFORM_CONFIG
|
||||
# include BOOST_PLATFORM_CONFIG
|
||||
#endif
|
||||
|
||||
// get config suffix code:
|
||||
#include <boost/config/suffix.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CONFIG_HPP
|
|
@ -1,27 +0,0 @@
|
|||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to 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)
|
||||
|
||||
// for C++ Builder the following options effect the ABI:
|
||||
//
|
||||
// -b (on or off - effect emum sizes)
|
||||
// -Vx (on or off - empty members)
|
||||
// -Ve (on or off - empty base classes)
|
||||
// -aX (alignment - 5 options).
|
||||
// -pX (Calling convention - 4 options)
|
||||
// -VmX (member pointer size and layout - 5 options)
|
||||
// -VC (on or off, changes name mangling)
|
||||
// -Vl (on or off, changes struct layout).
|
||||
|
||||
// In addition the following warnings are sufficiently annoying (and
|
||||
// unfixable) to have them turned off by default:
|
||||
//
|
||||
// 8027 - functions containing [for|while] loops are not expanded inline
|
||||
// 8026 - functions taking class by value arguments are not expanded inline
|
||||
|
||||
#pragma nopushoptwarn
|
||||
# pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026
|
||||
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to 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)
|
||||
|
||||
# pragma option pop
|
||||
#pragma nopushoptwarn
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to 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)
|
||||
|
||||
//
|
||||
// Boost binaries are built with the compiler's default ABI settings,
|
||||
// if the user changes their default alignment in the VS IDE then their
|
||||
// code will no longer be binary compatible with the bjam built binaries
|
||||
// unless this header is included to force Boost code into a consistent ABI.
|
||||
//
|
||||
// Note that inclusion of this header is only necessary for libraries with
|
||||
// separate source, header only libraries DO NOT need this as long as all
|
||||
// translation units are built with the same options.
|
||||
//
|
||||
#if defined(_M_X64)
|
||||
# pragma pack(push,16)
|
||||
#else
|
||||
# pragma pack(push,8)
|
||||
#endif
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to 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)
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
// abi_prefix header -------------------------------------------------------//
|
||||
|
||||
// (c) Copyright John Maddock 2003
|
||||
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
#ifndef BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
# define BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
#else
|
||||
# error double inclusion of header boost/config/abi_prefix.hpp is an error
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
// this must occur after all other includes and before any code appears:
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
#if defined( __BORLANDC__ )
|
||||
#pragma nopushoptwarn
|
||||
#endif
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
// abi_sufffix header -------------------------------------------------------//
|
||||
|
||||
// (c) Copyright John Maddock 2003
|
||||
|
||||
// Use, modification and distribution are subject to 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).
|
||||
|
||||
// This header should be #included AFTER code that was preceded by a #include
|
||||
// <boost/config/abi_prefix.hpp>.
|
||||
|
||||
#ifndef BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
# error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp
|
||||
#else
|
||||
# undef BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
#endif
|
||||
|
||||
// the suffix header occurs after all of our code:
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#if defined( __BORLANDC__ )
|
||||
#pragma nopushoptwarn
|
||||
#endif
|
||||
|
||||
|
|
@ -1,429 +0,0 @@
|
|||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to 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)
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE auto_link.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
USAGE:
|
||||
~~~~~~
|
||||
|
||||
Before including this header you must define one or more of define the following macros:
|
||||
|
||||
BOOST_LIB_NAME: Required: A string containing the basename of the library,
|
||||
for example boost_regex.
|
||||
BOOST_LIB_TOOLSET: Optional: the base name of the toolset.
|
||||
BOOST_DYN_LINK: Optional: when set link to dll rather than static library.
|
||||
BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name
|
||||
of the library selected (useful for debugging).
|
||||
BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
|
||||
rather than a mangled-name version.
|
||||
BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option.
|
||||
This is essentially the same as the default name-mangled version, but without
|
||||
the compiler name and version, or the Boost version. Just the build options.
|
||||
|
||||
These macros will be undef'ed at the end of the header, further this header
|
||||
has no include guards - so be sure to include it only once from your library!
|
||||
|
||||
Algorithm:
|
||||
~~~~~~~~~~
|
||||
|
||||
Libraries for Borland and Microsoft compilers are automatically
|
||||
selected here, the name of the lib is selected according to the following
|
||||
formula:
|
||||
|
||||
BOOST_LIB_PREFIX
|
||||
+ BOOST_LIB_NAME
|
||||
+ "_"
|
||||
+ BOOST_LIB_TOOLSET
|
||||
+ BOOST_LIB_THREAD_OPT
|
||||
+ BOOST_LIB_RT_OPT
|
||||
"-"
|
||||
+ BOOST_LIB_VERSION
|
||||
|
||||
These are defined as:
|
||||
|
||||
BOOST_LIB_PREFIX: "lib" for static libraries otherwise "".
|
||||
|
||||
BOOST_LIB_NAME: The base name of the lib ( for example boost_regex).
|
||||
|
||||
BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
|
||||
|
||||
BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.
|
||||
|
||||
BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,
|
||||
contains one or more of the following letters after
|
||||
a hyphen:
|
||||
|
||||
s static runtime (dynamic if not present).
|
||||
g debug/diagnostic runtime (release if not present).
|
||||
y Python debug/diagnostic runtime (release if not present).
|
||||
d debug build (release if not present).
|
||||
p STLport build.
|
||||
n STLport build without its IOStreams.
|
||||
|
||||
BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
# ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
# endif
|
||||
#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
|
||||
//
|
||||
// C language compatability (no, honestly)
|
||||
//
|
||||
# define BOOST_MSVC _MSC_VER
|
||||
# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
|
||||
# define BOOST_DO_STRINGIZE(X) #X
|
||||
#endif
|
||||
//
|
||||
// Only include what follows for known and supported compilers:
|
||||
//
|
||||
#if defined(BOOST_MSVC) \
|
||||
|| defined(__BORLANDC__) \
|
||||
|| (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
|
||||
|| (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
|
||||
|
||||
#ifndef BOOST_VERSION_HPP
|
||||
# include <boost/version.hpp>
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_LIB_NAME
|
||||
# error "Macro BOOST_LIB_NAME not set (internal error)"
|
||||
#endif
|
||||
|
||||
//
|
||||
// error check:
|
||||
//
|
||||
#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
|
||||
# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")
|
||||
# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")
|
||||
# error "Incompatible build options"
|
||||
#endif
|
||||
//
|
||||
// select toolset if not defined already:
|
||||
//
|
||||
#ifndef BOOST_LIB_TOOLSET
|
||||
# if defined(BOOST_MSVC) && (BOOST_MSVC < 1200)
|
||||
// Note: no compilers before 1200 are supported
|
||||
# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
|
||||
|
||||
# ifdef UNDER_CE
|
||||
// eVC4:
|
||||
# define BOOST_LIB_TOOLSET "evc4"
|
||||
# else
|
||||
// vc6:
|
||||
# define BOOST_LIB_TOOLSET "vc6"
|
||||
# endif
|
||||
|
||||
# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310)
|
||||
|
||||
// vc7:
|
||||
# define BOOST_LIB_TOOLSET "vc7"
|
||||
|
||||
# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
|
||||
|
||||
// vc71:
|
||||
# define BOOST_LIB_TOOLSET "vc71"
|
||||
|
||||
# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500)
|
||||
|
||||
// vc80:
|
||||
# define BOOST_LIB_TOOLSET "vc80"
|
||||
|
||||
# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
|
||||
|
||||
// vc90:
|
||||
# define BOOST_LIB_TOOLSET "vc90"
|
||||
|
||||
# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700)
|
||||
|
||||
// vc10:
|
||||
# define BOOST_LIB_TOOLSET "vc100"
|
||||
|
||||
# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800)
|
||||
|
||||
// vc11:
|
||||
# define BOOST_LIB_TOOLSET "vc110"
|
||||
|
||||
# elif defined(BOOST_MSVC)
|
||||
|
||||
// vc12:
|
||||
# define BOOST_LIB_TOOLSET "vc120"
|
||||
|
||||
# elif defined(__BORLANDC__)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb"
|
||||
|
||||
# elif defined(__ICL)
|
||||
|
||||
// Intel C++, no version number:
|
||||
# define BOOST_LIB_TOOLSET "iw"
|
||||
|
||||
# elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
|
||||
|
||||
// Metrowerks CodeWarrior 8.x
|
||||
# define BOOST_LIB_TOOLSET "cw8"
|
||||
|
||||
# elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
|
||||
|
||||
// Metrowerks CodeWarrior 9.x
|
||||
# define BOOST_LIB_TOOLSET "cw9"
|
||||
|
||||
# endif
|
||||
#endif // BOOST_LIB_TOOLSET
|
||||
|
||||
//
|
||||
// select thread opt:
|
||||
//
|
||||
#if defined(_MT) || defined(__MT__)
|
||||
# define BOOST_LIB_THREAD_OPT "-mt"
|
||||
#else
|
||||
# define BOOST_LIB_THREAD_OPT
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MWERKS__)
|
||||
|
||||
# ifdef _DLL
|
||||
|
||||
# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-gydp"
|
||||
# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-gdp"
|
||||
# elif defined(_DEBUG)\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-gydp"
|
||||
# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-gdp"
|
||||
# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-p"
|
||||
# endif
|
||||
|
||||
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-gydpn"
|
||||
# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-gdpn"
|
||||
# elif defined(_DEBUG)\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-gydpn"
|
||||
# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-gdpn"
|
||||
# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-pn"
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
# if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-gyd"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-gd"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-sgydp"
|
||||
# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-sgdp"
|
||||
# elif defined(_DEBUG)\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-sgydp"
|
||||
# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-sgdp"
|
||||
# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-sp"
|
||||
# endif
|
||||
|
||||
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-sgydpn"
|
||||
# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-sgdpn"
|
||||
# elif defined(_DEBUG)\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-sgydpn"
|
||||
# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-sgdpn"
|
||||
# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-spn"
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
# if defined(_DEBUG)\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-sgyd"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-sgd"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-s"
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
|
||||
//
|
||||
// figure out whether we want the debug builds or not:
|
||||
//
|
||||
#if __BORLANDC__ > 0x561
|
||||
#pragma defineonoption BOOST_BORLAND_DEBUG -v
|
||||
#endif
|
||||
//
|
||||
// sanity check:
|
||||
//
|
||||
#if defined(__STL_DEBUG) || defined(_STLP_DEBUG)
|
||||
#error "Pre-built versions of the Boost libraries are not provided in STLport-debug form"
|
||||
#endif
|
||||
|
||||
# ifdef _RTLDLL
|
||||
|
||||
# if defined(BOOST_BORLAND_DEBUG)\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-yd"
|
||||
# elif defined(BOOST_BORLAND_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-d"
|
||||
# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT -y
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
# if defined(BOOST_BORLAND_DEBUG)\
|
||||
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-syd"
|
||||
# elif defined(BOOST_BORLAND_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-sd"
|
||||
# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
|
||||
# define BOOST_LIB_RT_OPT "-sy"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-s"
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// select linkage opt:
|
||||
//
|
||||
#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)
|
||||
# define BOOST_LIB_PREFIX
|
||||
#elif defined(BOOST_DYN_LINK)
|
||||
# error "Mixing a dll boost library with a static runtime is a really bad idea..."
|
||||
#else
|
||||
# define BOOST_LIB_PREFIX "lib"
|
||||
#endif
|
||||
|
||||
//
|
||||
// now include the lib:
|
||||
//
|
||||
#if defined(BOOST_LIB_NAME) \
|
||||
&& defined(BOOST_LIB_PREFIX) \
|
||||
&& defined(BOOST_LIB_TOOLSET) \
|
||||
&& defined(BOOST_LIB_THREAD_OPT) \
|
||||
&& defined(BOOST_LIB_RT_OPT) \
|
||||
&& defined(BOOST_LIB_VERSION)
|
||||
|
||||
#ifdef BOOST_AUTO_LINK_TAGGED
|
||||
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
|
||||
# ifdef BOOST_LIB_DIAGNOSTIC
|
||||
# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
|
||||
# endif
|
||||
#elif defined(BOOST_AUTO_LINK_NOMANGLE)
|
||||
# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
|
||||
# ifdef BOOST_LIB_DIAGNOSTIC
|
||||
# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
|
||||
# endif
|
||||
#else
|
||||
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
|
||||
# ifdef BOOST_LIB_DIAGNOSTIC
|
||||
# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
# error "some required macros where not defined (internal logic error)."
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _MSC_VER || __BORLANDC__
|
||||
|
||||
//
|
||||
// finally undef any macros we may have set:
|
||||
//
|
||||
#ifdef BOOST_LIB_PREFIX
|
||||
# undef BOOST_LIB_PREFIX
|
||||
#endif
|
||||
#if defined(BOOST_LIB_NAME)
|
||||
# undef BOOST_LIB_NAME
|
||||
#endif
|
||||
// Don't undef this one: it can be set by the user and should be the
|
||||
// same for all libraries:
|
||||
//#if defined(BOOST_LIB_TOOLSET)
|
||||
//# undef BOOST_LIB_TOOLSET
|
||||
//#endif
|
||||
#if defined(BOOST_LIB_THREAD_OPT)
|
||||
# undef BOOST_LIB_THREAD_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_RT_OPT)
|
||||
# undef BOOST_LIB_RT_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_LINK_OPT)
|
||||
# undef BOOST_LIB_LINK_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_DEBUG_OPT)
|
||||
# undef BOOST_LIB_DEBUG_OPT
|
||||
#endif
|
||||
#if defined(BOOST_DYN_LINK)
|
||||
# undef BOOST_DYN_LINK
|
||||
#endif
|
||||
|
||||
|
|
@ -1,287 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// Borland C++ compiler setup:
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Borland prior to version 5.4:
|
||||
#if __BORLANDC__ < 0x540
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
|
||||
// last known compiler version:
|
||||
#if (__BORLANDC__ > 0x613)
|
||||
//# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
//# else
|
||||
//# pragma message( "Unknown compiler version - please run the configure tests and report the results")
|
||||
//# endif
|
||||
#elif (__BORLANDC__ == 0x600)
|
||||
# error "CBuilderX preview compiler is no longer supported"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Support macros to help with standard library detection
|
||||
#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL)
|
||||
# define BOOST_BCB_WITH_ROGUE_WAVE
|
||||
#elif __BORLANDC__ < 0x570
|
||||
# define BOOST_BCB_WITH_STLPORT
|
||||
#else
|
||||
# define BOOST_BCB_WITH_DINKUMWARE
|
||||
#endif
|
||||
|
||||
//
|
||||
// Version 5.0 and below:
|
||||
# if __BORLANDC__ <= 0x0550
|
||||
// Borland C++Builder 4 and 5:
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# if __BORLANDC__ == 0x0550
|
||||
// Borland C++Builder 5, command-line compiler 5.5:
|
||||
# define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
# endif
|
||||
// Variadic macros do not exist for C++ Builder versions 5 and below
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# endif
|
||||
|
||||
// Version 5.51 and below:
|
||||
#if (__BORLANDC__ <= 0x551)
|
||||
# define BOOST_NO_CV_SPECIALIZATIONS
|
||||
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
# define BOOST_NO_DEDUCED_TYPENAME
|
||||
// workaround for missing WCHAR_MAX/WCHAR_MIN:
|
||||
#ifdef __cplusplus
|
||||
#include <climits>
|
||||
#include <cwchar>
|
||||
#else
|
||||
#include <limits.h>
|
||||
#include <wchar.h>
|
||||
#endif // __cplusplus
|
||||
#ifndef WCHAR_MAX
|
||||
# define WCHAR_MAX 0xffff
|
||||
#endif
|
||||
#ifndef WCHAR_MIN
|
||||
# define WCHAR_MIN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Borland C++ Builder 6 and below:
|
||||
#if (__BORLANDC__ <= 0x564)
|
||||
|
||||
# if defined(NDEBUG) && defined(__cplusplus)
|
||||
// fix broken <cstring> so that Boost.test works:
|
||||
# include <cstring>
|
||||
# undef strcmp
|
||||
# endif
|
||||
// fix broken errno declaration:
|
||||
# include <errno.h>
|
||||
# ifndef errno
|
||||
# define errno errno
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// new bug in 5.61:
|
||||
#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580)
|
||||
// this seems to be needed by the command line compiler, but not the IDE:
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
#endif
|
||||
|
||||
// Borland C++ Builder 2006 Update 2 and below:
|
||||
#if (__BORLANDC__ <= 0x582)
|
||||
# define BOOST_NO_SFINAE
|
||||
# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
|
||||
# define BOOST_NO_PRIVATE_IN_AGGREGATE
|
||||
|
||||
# ifdef _WIN32
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# elif defined(linux) || defined(__linux__) || defined(__linux)
|
||||
// we should really be able to do without this
|
||||
// but the wcs* functions aren't imported into std::
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
// _CPPUNWIND doesn't get automatically set for some reason:
|
||||
# pragma defineonoption BOOST_CPPUNWIND -x
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info
|
||||
// we shouldn't really need this - but too many things choke
|
||||
// without it, this needs more investigation:
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
|
||||
# define BOOST_NO_USING_TEMPLATE
|
||||
# define BOOST_SP_NO_SP_CONVERTIBLE
|
||||
|
||||
// Temporary workaround
|
||||
#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif
|
||||
|
||||
// Borland C++ Builder 2008 and below:
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
# define BOOST_NO_NESTED_FRIENDSHIP
|
||||
# define BOOST_NO_TYPENAME_WITH_CTOR
|
||||
#if (__BORLANDC__ < 0x600)
|
||||
# define BOOST_ILLEGAL_CV_REFERENCES
|
||||
#endif
|
||||
|
||||
//
|
||||
// Positive Feature detection
|
||||
//
|
||||
// Borland C++ Builder 2008 and below:
|
||||
#if (__BORLANDC__ >= 0x599)
|
||||
# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax
|
||||
#endif
|
||||
//
|
||||
// C++0x Macros:
|
||||
//
|
||||
#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610)
|
||||
# define BOOST_NO_CXX11_CHAR16_T
|
||||
# define BOOST_NO_CXX11_CHAR32_T
|
||||
# define BOOST_NO_CXX11_DECLTYPE
|
||||
# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
# define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
# define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
# define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
# define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#else
|
||||
# define BOOST_HAS_ALIGNOF
|
||||
# define BOOST_HAS_CHAR16_T
|
||||
# define BOOST_HAS_CHAR32_T
|
||||
# define BOOST_HAS_DECLTYPE
|
||||
# define BOOST_HAS_EXPLICIT_CONVERSION_OPS
|
||||
# define BOOST_HAS_REF_QUALIFIER
|
||||
# define BOOST_HAS_RVALUE_REFS
|
||||
# define BOOST_HAS_STATIC_ASSERT
|
||||
#endif
|
||||
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_ALIGNAS
|
||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
|
||||
#if __BORLANDC__ >= 0x590
|
||||
# define BOOST_HAS_TR1_HASH
|
||||
|
||||
# define BOOST_HAS_MACRO_USE_FACET
|
||||
#endif
|
||||
|
||||
//
|
||||
// Post 0x561 we have long long and stdint.h:
|
||||
#if __BORLANDC__ >= 0x561
|
||||
# ifndef __NO_LONG_LONG
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# else
|
||||
# define BOOST_NO_LONG_LONG
|
||||
# endif
|
||||
// On non-Win32 platforms let the platform config figure this out:
|
||||
# ifdef _WIN32
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is
|
||||
// defined, then we have 0x560 or greater with the Rogue Wave implementation
|
||||
// which presumably has the std::DBL_MAX bug.
|
||||
#if defined( BOOST_BCB_WITH_ROGUE_WAVE )
|
||||
// <climits> is partly broken, some macros define symbols that are really in
|
||||
// namespace std, so you end up having to use illegal constructs like
|
||||
// std::DBL_MAX, as a fix we'll just include float.h and have done with:
|
||||
#include <float.h>
|
||||
#endif
|
||||
//
|
||||
// __int64:
|
||||
//
|
||||
#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
//
|
||||
// check for exception handling support:
|
||||
//
|
||||
#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
//
|
||||
// all versions have a <dirent.h>:
|
||||
//
|
||||
#ifndef __STRICT_ANSI__
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
#endif
|
||||
//
|
||||
// all versions support __declspec:
|
||||
//
|
||||
#if defined(__STRICT_ANSI__)
|
||||
// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
|
||||
# define BOOST_SYMBOL_EXPORT
|
||||
#endif
|
||||
//
|
||||
// ABI fixing headers:
|
||||
//
|
||||
#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet
|
||||
#ifndef BOOST_ABI_PREFIX
|
||||
# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
|
||||
#endif
|
||||
#ifndef BOOST_ABI_SUFFIX
|
||||
# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
// Disable Win32 support in ANSI mode:
|
||||
//
|
||||
#if __BORLANDC__ < 0x600
|
||||
# pragma defineonoption BOOST_DISABLE_WIN32 -A
|
||||
#elif defined(__STRICT_ANSI__)
|
||||
# define BOOST_DISABLE_WIN32
|
||||
#endif
|
||||
//
|
||||
// MSVC compatibility mode does some nasty things:
|
||||
// TODO: look up if this doesn't apply to the whole 12xx range
|
||||
//
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
#endif
|
||||
|
||||
// Borland did not implement value-initialization completely, as I reported
|
||||
// in 2007, Borland Report 51854, "Value-initialization: POD struct should be
|
||||
// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854
|
||||
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
|
||||
// (Niels Dekker, LKEB, April 2010)
|
||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
|
||||
#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
|
|
@ -1,180 +0,0 @@
|
|||
// (C) Copyright Douglas Gregor 2010
|
||||
//
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// Clang compiler setup.
|
||||
|
||||
#define BOOST_HAS_PRAGMA_ONCE
|
||||
|
||||
#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI)
|
||||
# define BOOST_NO_RTTI
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID)
|
||||
# define BOOST_NO_TYPEID
|
||||
#endif
|
||||
|
||||
#if defined(__int64) && !defined(__GNUC__)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
|
||||
#define BOOST_HAS_NRVO
|
||||
|
||||
// Branch prediction hints
|
||||
#if defined(__has_builtin)
|
||||
#if __has_builtin(__builtin_expect)
|
||||
#define BOOST_LIKELY(x) __builtin_expect(x, 1)
|
||||
#define BOOST_UNLIKELY(x) __builtin_expect(x, 0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Clang supports "long long" in all compilation modes.
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
|
||||
//
|
||||
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
|
||||
//
|
||||
#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
|
||||
# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
|
||||
# define BOOST_SYMBOL_IMPORT
|
||||
# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
|
||||
#endif
|
||||
|
||||
//
|
||||
// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
|
||||
// between switch labels.
|
||||
//
|
||||
#if __cplusplus >= 201103L && defined(__has_warning)
|
||||
# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
|
||||
# define BOOST_FALLTHROUGH [[clang::fallthrough]]
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_auto_type)
|
||||
# define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#endif
|
||||
|
||||
#if !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
|
||||
# define BOOST_NO_CXX11_CHAR16_T
|
||||
# define BOOST_NO_CXX11_CHAR32_T
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_constexpr)
|
||||
# define BOOST_NO_CXX11_CONSTEXPR
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_decltype)
|
||||
# define BOOST_NO_CXX11_DECLTYPE
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_decltype_incomplete_return_types)
|
||||
# define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_defaulted_functions)
|
||||
# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_deleted_functions)
|
||||
# define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_explicit_conversions)
|
||||
# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_default_function_template_args)
|
||||
# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_generalized_initializers)
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_lambdas)
|
||||
# define BOOST_NO_CXX11_LAMBDAS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_local_type_template_args)
|
||||
# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_noexcept)
|
||||
# define BOOST_NO_CXX11_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_nullptr)
|
||||
# define BOOST_NO_CXX11_NULLPTR
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_range_for)
|
||||
# define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_raw_string_literals)
|
||||
# define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_generalized_initializers)
|
||||
# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_rvalue_references)
|
||||
# define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_strong_enums)
|
||||
# define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_static_assert)
|
||||
# define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_alias_templates)
|
||||
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_unicode_literals)
|
||||
# define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_variadic_templates)
|
||||
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_user_literals)
|
||||
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_alignas) || __has_extension(cxx_alignas))
|
||||
# define BOOST_NO_CXX11_ALIGNAS
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_trailing_return)
|
||||
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#endif
|
||||
|
||||
#if !__has_feature(cxx_inline_namespaces)
|
||||
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
#endif
|
||||
|
||||
// Clang always supports variadic macros
|
||||
// Clang always supports extern templates
|
||||
|
||||
#ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "Clang version " __clang_version__
|
||||
#endif
|
||||
|
||||
// Macro used to identify the Clang compiler.
|
||||
#define BOOST_CLANG 1
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// CodeGear C++ compiler setup:
|
||||
|
||||
#if !defined( BOOST_WITH_CODEGEAR_WARNINGS )
|
||||
// these warnings occur frequently in optimized template code
|
||||
# pragma warn -8004 // var assigned value, but never used
|
||||
# pragma warn -8008 // condition always true/false
|
||||
# pragma warn -8066 // dead code can never execute
|
||||
# pragma warn -8104 // static members with ctors not threadsafe
|
||||
# pragma warn -8105 // reference member in class without ctors
|
||||
#endif
|
||||
//
|
||||
// versions check:
|
||||
// last known and checked version is 0x621
|
||||
#if (__CODEGEARC__ > 0x621)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
# pragma message( "Unknown compiler version - please run the configure tests and report the results")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// CodeGear C++ Builder 2009
|
||||
#if (__CODEGEARC__ <= 0x613)
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_PRIVATE_IN_AGGREGATE
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
// we shouldn't really need this - but too many things choke
|
||||
// without it, this needs more investigation:
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
# define BOOST_SP_NO_SP_CONVERTIBLE
|
||||
#endif
|
||||
|
||||
// CodeGear C++ Builder 2010
|
||||
#if (__CODEGEARC__ <= 0x621)
|
||||
# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member
|
||||
# define BOOST_NO_USING_TEMPLATE
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
// Temporary hack, until specific MPL preprocessed headers are generated
|
||||
# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
// CodeGear has not yet completely implemented value-initialization, for
|
||||
// example for array types, as I reported in 2010: Embarcadero Report 83751,
|
||||
// "Value-initialization: arrays should have each element value-initialized",
|
||||
// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751
|
||||
// Last checked version: Embarcadero C++ 6.21
|
||||
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
|
||||
// (Niels Dekker, LKEB, April 2010)
|
||||
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
|
||||
# if defined(NDEBUG) && defined(__cplusplus)
|
||||
// fix broken <cstring> so that Boost.test works:
|
||||
# include <cstring>
|
||||
# undef strcmp
|
||||
# endif
|
||||
// fix broken errno declaration:
|
||||
# include <errno.h>
|
||||
# ifndef errno
|
||||
# define errno errno
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
// Reportedly, #pragma once is supported since C++ Builder 2010
|
||||
#if (__CODEGEARC__ >= 0x620)
|
||||
# define BOOST_HAS_PRAGMA_ONCE
|
||||
#endif
|
||||
|
||||
//
|
||||
// C++0x macros:
|
||||
//
|
||||
#if (__CODEGEARC__ <= 0x620)
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#else
|
||||
#define BOOST_HAS_STATIC_ASSERT
|
||||
#endif
|
||||
#define BOOST_HAS_CHAR16_T
|
||||
#define BOOST_HAS_CHAR32_T
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
// #define BOOST_HAS_ALIGNOF
|
||||
#define BOOST_HAS_DECLTYPE
|
||||
#define BOOST_HAS_EXPLICIT_CONVERSION_OPS
|
||||
// #define BOOST_HAS_RVALUE_REFS
|
||||
#define BOOST_HAS_SCOPED_ENUM
|
||||
// #define BOOST_HAS_STATIC_ASSERT
|
||||
#define BOOST_HAS_STD_TYPE_TRAITS
|
||||
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_ALIGNAS
|
||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
|
||||
//
|
||||
// TR1 macros:
|
||||
//
|
||||
#define BOOST_HAS_TR1_HASH
|
||||
#define BOOST_HAS_TR1_TYPE_TRAITS
|
||||
#define BOOST_HAS_TR1_UNORDERED_MAP
|
||||
#define BOOST_HAS_TR1_UNORDERED_SET
|
||||
|
||||
#define BOOST_HAS_MACRO_USE_FACET
|
||||
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
// On non-Win32 platforms let the platform config figure this out:
|
||||
#ifdef _WIN32
|
||||
# define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
//
|
||||
// __int64:
|
||||
//
|
||||
#if !defined(__STRICT_ANSI__)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
//
|
||||
// check for exception handling support:
|
||||
//
|
||||
#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
//
|
||||
// all versions have a <dirent.h>:
|
||||
//
|
||||
#if !defined(__STRICT_ANSI__)
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
#endif
|
||||
//
|
||||
// all versions support __declspec:
|
||||
//
|
||||
#if defined(__STRICT_ANSI__)
|
||||
// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
|
||||
# define BOOST_SYMBOL_EXPORT
|
||||
#endif
|
||||
//
|
||||
// ABI fixing headers:
|
||||
//
|
||||
#ifndef BOOST_ABI_PREFIX
|
||||
# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
|
||||
#endif
|
||||
#ifndef BOOST_ABI_SUFFIX
|
||||
# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
|
||||
#endif
|
||||
//
|
||||
// Disable Win32 support in ANSI mode:
|
||||
//
|
||||
# pragma defineonoption BOOST_DISABLE_WIN32 -A
|
||||
//
|
||||
// MSVC compatibility mode does some nasty things:
|
||||
// TODO: look up if this doesn't apply to the whole 12xx range
|
||||
//
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__)
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Douglas Gregor 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2003.
|
||||
// (C) Copyright Beman Dawes 2003.
|
||||
// (C) Copyright Jens Maurer 2003.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// Comeau C++ compiler setup:
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
#if (__COMO_VERSION__ <= 4245)
|
||||
|
||||
# if defined(_MSC_VER) && _MSC_VER <= 1300
|
||||
# if _MSC_VER > 100
|
||||
// only set this in non-strict mode:
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
# endif
|
||||
# endif
|
||||
|
||||
// Void returns don't work when emulating VC 6 (Peter Dimov)
|
||||
// TODO: look up if this doesn't apply to the whole 12xx range
|
||||
# if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
# endif
|
||||
|
||||
#endif // version 4245
|
||||
|
||||
//
|
||||
// enable __int64 support in VC emulation mode
|
||||
//
|
||||
# if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
# endif
|
||||
|
||||
#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't know Comeau prior to version 4245:
|
||||
#if __COMO_VERSION__ < 4245
|
||||
# error "Compiler not configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 4245:
|
||||
#if (__COMO_VERSION__ > 4245)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright Markus Schoepflin 2005.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
//
|
||||
// Options common to all edg based compilers.
|
||||
//
|
||||
// This is included from within the individual compiler mini-configs.
|
||||
|
||||
#ifndef __EDG_VERSION__
|
||||
# error This file requires that __EDG_VERSION__ be defined.
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 238)
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_SFINAE
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 240)
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES)
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT)
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#endif
|
||||
|
||||
// See also kai.hpp which checks a Kai-specific symbol for EH
|
||||
# if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
# endif
|
||||
|
||||
# if !defined(__NO_LONG_LONG)
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# else
|
||||
# define BOOST_NO_LONG_LONG
|
||||
# endif
|
||||
|
||||
// Not sure what version was the first to support #pragma once, but
|
||||
// different EDG-based compilers (e.g. Intel) supported it for ages.
|
||||
// Add a proper version check if it causes problems.
|
||||
#define BOOST_HAS_PRAGMA_ONCE
|
||||
|
||||
//
|
||||
// C++0x features
|
||||
//
|
||||
// See above for BOOST_NO_LONG_LONG
|
||||
//
|
||||
#if (__EDG_VERSION__ < 310)
|
||||
# define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
#endif
|
||||
#if (__EDG_VERSION__ <= 310)
|
||||
// No support for initializer lists
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#endif
|
||||
#if (__EDG_VERSION__ < 400)
|
||||
# define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#endif
|
||||
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_ALIGNAS
|
||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
|
||||
#ifdef c_plusplus
|
||||
// EDG has "long long" in non-strict mode
|
||||
// However, some libraries have insufficient "long long" support
|
||||
// #define BOOST_HAS_LONG_LONG
|
||||
#endif
|
|
@ -1,19 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// Tru64 C++ compiler setup (now HP):
|
||||
|
||||
#define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER)
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// Nothing to do here?
|
||||
|
||||
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
// (C) Copyright John Maddock 2011.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// Greenhills C compiler setup:
|
||||
|
||||
#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE)
|
||||
|
||||
#if _RELEASE < 7
|
||||
# error "Boost is not configured for Cray compilers prior to version 7, please try the configure script."
|
||||
#endif
|
||||
|
||||
//
|
||||
// Check this is a recent EDG based compiler, otherwise we don't support it here:
|
||||
//
|
||||
#ifndef __EDG_VERSION__
|
||||
# error "Unsupported Cray compiler, please try running the configure script."
|
||||
#endif
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
//
|
||||
// Cray peculiarities, probably version 7 specific:
|
||||
//
|
||||
#undef BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_ALIGNAS
|
||||
//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||
#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
|
||||
//#define BOOST_HAS_FPCLASSIFY
|
||||
|
||||
#define BOOST_SP_USE_PTHREADS
|
||||
#define BOOST_AC_USE_PTHREADS
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
// Copyright (C) Christof Meerwald 2003
|
||||
// Copyright (C) Dan Watkins 2003
|
||||
//
|
||||
// Use, modification and distribution are subject to 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)
|
||||
|
||||
// Digital Mars C++ compiler setup:
|
||||
#define BOOST_COMPILER __DMC_VERSION_STRING__
|
||||
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
#define BOOST_HAS_PRAGMA_ONCE
|
||||
|
||||
#if !defined(BOOST_STRICT_CONFIG)
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
#define BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
#define BOOST_NO_SFINAE
|
||||
#define BOOST_NO_USING_TEMPLATE
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#endif
|
||||
|
||||
//
|
||||
// has macros:
|
||||
#define BOOST_HAS_DIRENT_H
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#define BOOST_HAS_WINTHREADS
|
||||
|
||||
#if (__DMC__ >= 0x847)
|
||||
#define BOOST_HAS_EXPM1
|
||||
#define BOOST_HAS_LOG1P
|
||||
#endif
|
||||
|
||||
//
|
||||
// Is this really the best way to detect whether the std lib is in namespace std?
|
||||
//
|
||||
#ifdef __cplusplus
|
||||
#include <cstddef>
|
||||
#endif
|
||||
#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD)
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
#endif
|
||||
|
||||
|
||||
// check for exception handling support:
|
||||
#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
// C++0x features
|
||||
//
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_ALIGNAS
|
||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
|
||||
#if (__DMC__ <= 0x840)
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is ...:
|
||||
#if (__DMC__ > 0x848)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
|
@ -1,261 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001 - 2002.
|
||||
// (C) Copyright Beman Dawes 2001 - 2003.
|
||||
// (C) Copyright Douglas Gregor 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Synge Todo 2003.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// GNU C++ compiler setup.
|
||||
|
||||
//
|
||||
// Define BOOST_GCC so we know this is "real" GCC and not some pretender:
|
||||
//
|
||||
#if !defined(__CUDACC__)
|
||||
#define BOOST_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
||||
#if __GNUC__ == 3
|
||||
# if defined (__PATHSCALE__)
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
|
||||
# if __GNUC_MINOR__ < 4
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
# define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
#endif
|
||||
#if __GNUC__ < 4
|
||||
//
|
||||
// All problems to gcc-3.x and earlier here:
|
||||
//
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
# ifdef __OPEN64__
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links
|
||||
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
||||
#define BOOST_HAS_PRAGMA_ONCE
|
||||
#endif
|
||||
|
||||
#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
|
||||
// Previous versions of GCC did not completely implement value-initialization:
|
||||
// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize
|
||||
// members", reported by Jonathan Wakely in 2006,
|
||||
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4)
|
||||
// GCC Bug 33916, "Default constructor fails to initialize array members",
|
||||
// reported by Michael Elizabeth Chastain in 2007,
|
||||
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4)
|
||||
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
|
||||
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
#endif
|
||||
|
||||
#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Threading support: Turn this on unconditionally here (except for
|
||||
// those platforms where we can know for sure). It will get turned off again
|
||||
// later if no threading API is detected.
|
||||
//
|
||||
#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// gcc has "long long"
|
||||
//
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
|
||||
//
|
||||
// gcc implements the named return value optimization since version 3.1
|
||||
//
|
||||
#define BOOST_HAS_NRVO
|
||||
|
||||
// Branch prediction hints
|
||||
#define BOOST_LIKELY(x) __builtin_expect(x, 1)
|
||||
#define BOOST_UNLIKELY(x) __builtin_expect(x, 0)
|
||||
|
||||
//
|
||||
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
|
||||
//
|
||||
#if __GNUC__ >= 4
|
||||
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__)
|
||||
// All Win32 development environments, including 64-bit Windows and MinGW, define
|
||||
// _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
|
||||
// so does not define _WIN32 or its variants.
|
||||
# define BOOST_HAS_DECLSPEC
|
||||
# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
|
||||
# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
|
||||
# else
|
||||
# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
|
||||
# define BOOST_SYMBOL_IMPORT
|
||||
# endif
|
||||
# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
|
||||
#else
|
||||
// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
|
||||
# define BOOST_SYMBOL_EXPORT
|
||||
#endif
|
||||
|
||||
//
|
||||
// RTTI and typeinfo detection is possible post gcc-4.3:
|
||||
//
|
||||
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 403
|
||||
# ifndef __GXX_RTTI
|
||||
# ifndef BOOST_NO_TYPEID
|
||||
# define BOOST_NO_TYPEID
|
||||
# endif
|
||||
# ifndef BOOST_NO_RTTI
|
||||
# define BOOST_NO_RTTI
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Recent GCC versions have __int128 when in 64-bit mode.
|
||||
//
|
||||
// We disable this if the compiler is really nvcc as it
|
||||
// doesn't actually support __int128 as of CUDA_VERSION=5000
|
||||
// even though it defines __SIZEOF_INT128__.
|
||||
// See https://svn.boost.org/trac/boost/ticket/8048
|
||||
// Only re-enable this for nvcc if you're absolutely sure
|
||||
// of the circumstances under which it's supported:
|
||||
//
|
||||
#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__)
|
||||
# define BOOST_HAS_INT128
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.3.n and later
|
||||
//
|
||||
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
|
||||
// passed on the command line, which in turn defines
|
||||
// __GXX_EXPERIMENTAL_CXX0X__.
|
||||
# define BOOST_HAS_DECLTYPE
|
||||
# define BOOST_HAS_RVALUE_REFS
|
||||
# define BOOST_HAS_STATIC_ASSERT
|
||||
# define BOOST_HAS_VARIADIC_TMPL
|
||||
#else
|
||||
# define BOOST_NO_CXX11_DECLTYPE
|
||||
# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
# define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
# define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
|
||||
// Variadic templates compiler:
|
||||
// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
|
||||
# if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__))
|
||||
# define BOOST_HAS_VARIADIC_TMPL
|
||||
# else
|
||||
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.4.n and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
# define BOOST_NO_CXX11_CHAR16_T
|
||||
# define BOOST_NO_CXX11_CHAR32_T
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
# define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
#endif
|
||||
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
|
||||
# define BOOST_NO_SFINAE_EXPR
|
||||
#endif
|
||||
|
||||
// GCC 4.5 forbids declaration of defaulted functions in private or protected sections
|
||||
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && (__GNUC__ == 4 && __GNUC_MINOR__ <= 5)
|
||||
# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.5.0 and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
# define BOOST_NO_CXX11_LAMBDAS
|
||||
# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
# define BOOST_NO_CXX11_RAW_LITERALS
|
||||
# define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.5.1 and later
|
||||
//
|
||||
#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40501) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1
|
||||
// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
|
||||
# define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.6.n and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.7.n and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.8.n and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_CXX11_ALIGNAS
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.8.1 and later
|
||||
//
|
||||
#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40801) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "GNU C++ version " __VERSION__
|
||||
#endif
|
||||
|
||||
// ConceptGCC compiler:
|
||||
// http://www.generic-programming.org/software/ConceptGCC/
|
||||
#ifdef __GXX_CONCEPTS__
|
||||
# define BOOST_HAS_CONCEPTS
|
||||
# define BOOST_COMPILER "ConceptGCC version " __VERSION__
|
||||
#endif
|
||||
|
||||
// versions check:
|
||||
// we don't know gcc prior to version 3.30:
|
||||
#if (__GNUC__ < 3) || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3))
|
||||
# error "Compiler not configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 4.6 (Pre-release):
|
||||
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
// we don't emit warnings here anymore since there are no defect macros defined for
|
||||
// gcc post 3.4, so any failures are gcc regressions...
|
||||
//# warning "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
// (C) Copyright John Maddock 2006.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// GCC-XML C++ compiler setup:
|
||||
|
||||
# if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3))
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
|
||||
//
|
||||
// Threading support: Turn this on unconditionally here (except for
|
||||
// those platforms where we can know for sure). It will get turned off again
|
||||
// later if no threading API is detected.
|
||||
//
|
||||
#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__)
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// gcc has "long long"
|
||||
//
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
|
||||
// C++0x features:
|
||||
//
|
||||
# define BOOST_NO_CXX11_CONSTEXPR
|
||||
# define BOOST_NO_CXX11_NULLPTR
|
||||
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
# define BOOST_NO_CXX11_DECLTYPE
|
||||
# define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
# define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
# define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
# define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
# define BOOST_NO_CXX11_CHAR16_T
|
||||
# define BOOST_NO_CXX11_CHAR32_T
|
||||
# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
# define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
# define BOOST_NO_SFINAE_EXPR
|
||||
# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
# define BOOST_NO_CXX11_LAMBDAS
|
||||
# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
# define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
# define BOOST_NO_CXX11_RAW_LITERALS
|
||||
# define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
# define BOOST_NO_CXX11_NOEXCEPT
|
||||
# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
# define BOOST_NO_CXX11_ALIGNAS
|
||||
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
|
||||
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
|
||||
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// Greenhills C++ compiler setup:
|
||||
|
||||
#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs)
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Greenhills prior to version 0:
|
||||
#if __ghs < 0
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 0:
|
||||
#if (__ghs > 0)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Toon Knapen 2003.
|
||||
// (C) Copyright Boris Gubenko 2006 - 2007.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// HP aCC C++ compiler setup:
|
||||
|
||||
#if defined(__EDG__)
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC <= 33100)
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
# if !defined(_NAMESPACE_STD)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC <= 33300)
|
||||
// member templates are sufficiently broken that we disable them for now
|
||||
# define BOOST_NO_MEMBER_TEMPLATES
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC <= 38000)
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC > 50000) && (__HP_aCC < 60000)
|
||||
# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#endif
|
||||
|
||||
// optional features rather than defects:
|
||||
#if (__HP_aCC >= 33900)
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 )
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
#endif
|
||||
|
||||
// This macro should not be defined when compiling in strict ansi
|
||||
// mode, but, currently, we don't have the ability to determine
|
||||
// what standard mode we are compiling with. Some future version
|
||||
// of aCC6 compiler will provide predefined macros reflecting the
|
||||
// compilation options, including the standard mode.
|
||||
#if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98))
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support HP aCC prior to version 33000:
|
||||
#if __HP_aCC < 33000
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Extended checks for supporting aCC on PA-RISC
|
||||
#if __HP_aCC > 30000 && __HP_aCC < 50000
|
||||
# if __HP_aCC < 38000
|
||||
// versions prior to version A.03.80 not supported
|
||||
# error "Compiler version not supported - version A.03.80 or higher is required"
|
||||
# elif !defined(__hpxstd98)
|
||||
// must compile using the option +hpxstd98 with version A.03.80 and above
|
||||
# error "Compiler option '+hpxstd98' is required for proper support"
|
||||
# endif //PA-RISC
|
||||
#endif
|
||||
|
||||
//
|
||||
// C++0x features
|
||||
//
|
||||
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
|
||||
//
|
||||
#if !defined(__EDG__)
|
||||
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_ALIGNAS
|
||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
|
||||
/*
|
||||
See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and
|
||||
https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436
|
||||
*/
|
||||
|
||||
#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE)
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// last known and checked version for HP-UX/ia64 is 61300
|
||||
// last known and checked version for PA-RISC is 38000
|
||||
#if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98)))
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
|
@ -1,323 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001-8.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002 - 2003.
|
||||
// (C) Copyright Guillaume Melquiond 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2003.
|
||||
// (C) Copyright Martin Wille 2003.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// Intel compiler setup:
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
#if defined(__INTEL_COMPILER)
|
||||
# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
|
||||
#elif defined(__ICL)
|
||||
# define BOOST_INTEL_CXX_VERSION __ICL
|
||||
#elif defined(__ICC)
|
||||
# define BOOST_INTEL_CXX_VERSION __ICC
|
||||
#elif defined(__ECC)
|
||||
# define BOOST_INTEL_CXX_VERSION __ECC
|
||||
#endif
|
||||
|
||||
// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x'
|
||||
#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_INTEL_STDCXX0X
|
||||
#endif
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
||||
# define BOOST_INTEL_STDCXX0X
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_INTEL_STDCXX0X
|
||||
#define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
|
||||
#else
|
||||
#define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
|
||||
#endif
|
||||
#define BOOST_INTEL BOOST_INTEL_CXX_VERSION
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
# define BOOST_INTEL_WIN BOOST_INTEL
|
||||
#else
|
||||
# define BOOST_INTEL_LINUX BOOST_INTEL
|
||||
#endif
|
||||
|
||||
#if (BOOST_INTEL_CXX_VERSION <= 600)
|
||||
|
||||
# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov)
|
||||
|
||||
// Boost libraries assume strong standard conformance unless otherwise
|
||||
// indicated by a config macro. As configured by Intel, the EDG front-end
|
||||
// requires certain compiler options be set to achieve that strong conformance.
|
||||
// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt)
|
||||
// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for
|
||||
// details as they apply to particular versions of the compiler. When the
|
||||
// compiler does not predefine a macro indicating if an option has been set,
|
||||
// this config file simply assumes the option has been set.
|
||||
// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if
|
||||
// the compiler option is not enabled.
|
||||
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# endif
|
||||
|
||||
// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov)
|
||||
|
||||
# if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32)
|
||||
# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
|
||||
#endif
|
||||
|
||||
// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864
|
||||
#if BOOST_INTEL_CXX_VERSION < 600
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#else
|
||||
// We should test the macro _WCHAR_T_DEFINED to check if the compiler
|
||||
// supports wchar_t natively. *BUT* there is a problem here: the standard
|
||||
// headers define this macro if they typedef wchar_t. Anyway, we're lucky
|
||||
// because they define it without a value, while Intel C++ defines it
|
||||
// to 1. So we can check its value to see if the macro was defined natively
|
||||
// or not.
|
||||
// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T
|
||||
// is used instead.
|
||||
# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0)
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
|
||||
//
|
||||
// Figure out when Intel is emulating this gcc bug
|
||||
// (All Intel versions prior to 9.0.26, and versions
|
||||
// later than that if they are set up to emulate gcc 3.2
|
||||
// or earlier):
|
||||
//
|
||||
# if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912)
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(__GNUC__) && (__GNUC__ < 4)) || (defined(_WIN32) && (BOOST_INTEL_CXX_VERSION <= 1200)) || (BOOST_INTEL_CXX_VERSION <= 1200)
|
||||
// GCC or VC emulation:
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif
|
||||
//
|
||||
// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T
|
||||
// set correctly, if we don't do this now, we will get errors later
|
||||
// in type_traits code among other things, getting this correct
|
||||
// for the Intel compiler is actually remarkably fragile and tricky:
|
||||
//
|
||||
#ifdef __cplusplus
|
||||
#if defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
||||
#include <cwchar>
|
||||
template< typename T > struct assert_no_intrinsic_wchar_t;
|
||||
template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; };
|
||||
// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T
|
||||
// where it is defined above:
|
||||
typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_;
|
||||
#else
|
||||
template< typename T > struct assert_intrinsic_wchar_t;
|
||||
template<> struct assert_intrinsic_wchar_t<wchar_t> {};
|
||||
// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:
|
||||
template<> struct assert_intrinsic_wchar_t<unsigned short> {};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER+0 >= 1000)
|
||||
# if _MSC_VER >= 1200
|
||||
# define BOOST_HAS_MS_INT64
|
||||
# endif
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#elif defined(_WIN32)
|
||||
# define BOOST_DISABLE_WIN32
|
||||
#endif
|
||||
|
||||
// I checked version 6.0 build 020312Z, it implements the NRVO.
|
||||
// Correct this as you find out which version of the compiler
|
||||
// implemented the NRVO first. (Daniel Frey)
|
||||
#if (BOOST_INTEL_CXX_VERSION >= 600)
|
||||
# define BOOST_HAS_NRVO
|
||||
#endif
|
||||
|
||||
// Branch prediction hints
|
||||
// I'm not sure 8.0 was the first version to support these builtins,
|
||||
// update the condition if the version is not accurate. (Andrey Semashev)
|
||||
#if defined(__GNUC__) && BOOST_INTEL_CXX_VERSION >= 800
|
||||
#define BOOST_LIKELY(x) __builtin_expect(x, 1)
|
||||
#define BOOST_UNLIKELY(x) __builtin_expect(x, 0)
|
||||
#endif
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Intel prior to version 6.0:
|
||||
#if BOOST_INTEL_CXX_VERSION < 600
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
|
||||
// Intel on MacOS requires
|
||||
#if defined(__APPLE__) && defined(__INTEL_COMPILER)
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif
|
||||
|
||||
// Intel on Altix Itanium
|
||||
#if defined(__itanium__) && defined(__INTEL_COMPILER)
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif
|
||||
|
||||
//
|
||||
// An attempt to value-initialize a pointer-to-member may trigger an
|
||||
// internal error on Intel <= 11.1 (last checked version), as was
|
||||
// reported by John Maddock, Intel support issue 589832, May 2010.
|
||||
// Moreover, according to test results from Huang-Vista-x86_32_intel,
|
||||
// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some
|
||||
// cases when it should be value-initialized.
|
||||
// (Niels Dekker, LKEB, May 2010)
|
||||
// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression).
|
||||
#if defined(__INTEL_COMPILER)
|
||||
# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1500))
|
||||
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
|
||||
//
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))
|
||||
# define BOOST_SYMBOL_IMPORT
|
||||
# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
|
||||
#endif
|
||||
//
|
||||
// C++0x features
|
||||
// - ICC added static_assert in 11.0 (first version with C++0x support)
|
||||
//
|
||||
#if defined(BOOST_INTEL_STDCXX0X)
|
||||
# undef BOOST_NO_CXX11_STATIC_ASSERT
|
||||
//
|
||||
// These pass our test cases, but aren't officially supported according to:
|
||||
// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
|
||||
//
|
||||
//# undef BOOST_NO_CXX11_LAMBDAS
|
||||
//# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
//# undef BOOST_NO_CXX11_DECLTYPE
|
||||
//# undef BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
//# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200)
|
||||
//# undef BOOST_NO_CXX11_RVALUE_REFERENCES // Enabling this breaks Filesystem and Exception libraries
|
||||
//# undef BOOST_NO_CXX11_SCOPED_ENUMS // doesn't really work!!
|
||||
# undef BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
# undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
# undef BOOST_NO_CXX11_LAMBDAS
|
||||
# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
# undef BOOST_NO_CXX11_DECLTYPE
|
||||
# undef BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
# undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#endif
|
||||
|
||||
// icl Version 12.1.0.233 Build 20110811 and possibly some other builds
|
||||
// had an incorrect __INTEL_COMPILER value of 9999. Intel say this has been fixed.
|
||||
#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION > 1200)
|
||||
# undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
# undef BOOST_NO_CXX11_NULLPTR
|
||||
# undef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
# undef BOOST_NO_SFINAE_EXPR
|
||||
# undef BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
# undef BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
|
||||
// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
|
||||
// continues to list scoped enum support as "Partial"
|
||||
//# undef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#endif
|
||||
#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(_MSC_VER)
|
||||
# undef BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
# undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
// This one generates internal compiler errors in multiprecision, disabled for now:
|
||||
//# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
// This one generates errors when used with conditional exception specifications, for example in multiprecision:
|
||||
//# undef BOOST_NO_CXX11_NOEXCEPT
|
||||
# undef BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
# undef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
# undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#endif
|
||||
#if (BOOST_INTEL_CXX_VERSION >= 1310)
|
||||
# undef BOOST_NO_SFINAE_EXPR
|
||||
#endif
|
||||
#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1400) && !defined(_MSC_VER)
|
||||
# undef BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
# undef BOOST_NO_CXX11_RAW_LITERALS
|
||||
// This one generates errors when used with conditional exception specifications, for example in multiprecision:
|
||||
//# undef BOOST_NO_CXX11_NOEXCEPT
|
||||
// This breaks multiprecision:
|
||||
//# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
# undef BOOST_NO_CXX11_HDR_THREAD
|
||||
# undef BOOST_NO_CXX11_CHAR32_T
|
||||
# undef BOOST_NO_CXX11_CHAR16_T
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION <= 1310)
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION == 1400)
|
||||
// A regression in Intel's compiler means that <tuple> seems to be broken in this release as well as <future> :
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1700)
|
||||
//
|
||||
// Although the Intel compiler is capable of supporting these, it appears not to in MSVC compatibility mode:
|
||||
//
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
# define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
# if(BOOST_INTEL_CXX_VERSION < 1310)
|
||||
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (BOOST_INTEL_CXX_VERSION < 1200)
|
||||
//
|
||||
// fenv.h appears not to work with Intel prior to 12.0:
|
||||
//
|
||||
# define BOOST_NO_FENV_H
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310)
|
||||
# define BOOST_HAS_INT128
|
||||
#endif
|
||||
|
||||
//
|
||||
// last known and checked version:
|
||||
#if (BOOST_INTEL_CXX_VERSION > 1310)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# elif defined(_MSC_VER)
|
||||
//
|
||||
// We don't emit this warning any more, since we have so few
|
||||
// defect macros set anyway (just the one).
|
||||
//
|
||||
//# pragma message("Unknown compiler version - please run the configure tests and report the results")
|
||||
# endif
|
||||
#endif
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// Kai C++ compiler setup:
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG)
|
||||
// at least on Sun, the contents of <cwchar> is not in namespace std
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# endif
|
||||
|
||||
// see also common_edg.hpp which needs a special check for __KCC
|
||||
# if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
# endif
|
||||
|
||||
//
|
||||
// last known and checked version is 4001:
|
||||
#if (__KCC_VERSION > 4001)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright David Abrahams 2001 - 2002.
|
||||
// (C) Copyright Beman Dawes 2001 - 2003.
|
||||
// (C) Copyright Stefan Slapeta 2004.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// Metrowerks C++ compiler setup:
|
||||
|
||||
// locale support is disabled when linking with the dynamic runtime
|
||||
# ifdef _MSL_NO_LOCALE
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# endif
|
||||
|
||||
# if __MWERKS__ <= 0x2301 // 5.3
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# define BOOST_NO_POINTER_TO_MEMBER_CONST
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
# endif
|
||||
|
||||
# if __MWERKS__ <= 0x2401 // 6.2
|
||||
//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# endif
|
||||
|
||||
# if(__MWERKS__ <= 0x2407) // 7.x
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
# endif
|
||||
|
||||
# if(__MWERKS__ <= 0x3003) // 8.x
|
||||
# define BOOST_NO_SFINAE
|
||||
# endif
|
||||
|
||||
// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last
|
||||
// tested version *only*:
|
||||
# if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
|
||||
#if !__option(wchar_type)
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#endif
|
||||
|
||||
#if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh)
|
||||
# if __MWERKS__ == 0x3000
|
||||
# define BOOST_COMPILER_VERSION 8.0
|
||||
# elif __MWERKS__ == 0x3001
|
||||
# define BOOST_COMPILER_VERSION 8.1
|
||||
# elif __MWERKS__ == 0x3002
|
||||
# define BOOST_COMPILER_VERSION 8.2
|
||||
# elif __MWERKS__ == 0x3003
|
||||
# define BOOST_COMPILER_VERSION 8.3
|
||||
# elif __MWERKS__ == 0x3200
|
||||
# define BOOST_COMPILER_VERSION 9.0
|
||||
# elif __MWERKS__ == 0x3201
|
||||
# define BOOST_COMPILER_VERSION 9.1
|
||||
# elif __MWERKS__ == 0x3202
|
||||
# define BOOST_COMPILER_VERSION 9.2
|
||||
# elif __MWERKS__ == 0x3204
|
||||
# define BOOST_COMPILER_VERSION 9.3
|
||||
# elif __MWERKS__ == 0x3205
|
||||
# define BOOST_COMPILER_VERSION 9.4
|
||||
# elif __MWERKS__ == 0x3206
|
||||
# define BOOST_COMPILER_VERSION 9.5
|
||||
# elif __MWERKS__ == 0x3207
|
||||
# define BOOST_COMPILER_VERSION 9.6
|
||||
# else
|
||||
# define BOOST_COMPILER_VERSION __MWERKS__
|
||||
# endif
|
||||
#else
|
||||
# define BOOST_COMPILER_VERSION __MWERKS__
|
||||
#endif
|
||||
|
||||
//
|
||||
// C++0x features
|
||||
//
|
||||
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
|
||||
//
|
||||
#if __MWERKS__ > 0x3206 && __option(rvalue_refs)
|
||||
# define BOOST_HAS_RVALUE_REFS
|
||||
#else
|
||||
# define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#endif
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_ALIGNAS
|
||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
|
||||
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Metrowerks prior to version 5.3:
|
||||
#if __MWERKS__ < 0x2301
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version:
|
||||
#if (__MWERKS__ > 0x3205)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// MPW C++ compilers setup:
|
||||
|
||||
# if defined(__SC__)
|
||||
# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__)
|
||||
# elif defined(__MRC__)
|
||||
# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__)
|
||||
# else
|
||||
# error "Using MPW compiler configuration by mistake. Please update."
|
||||
# endif
|
||||
|
||||
//
|
||||
// MPW 8.90:
|
||||
//
|
||||
#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG)
|
||||
# define BOOST_NO_CV_SPECIALIZATIONS
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# define BOOST_NO_USING_TEMPLATE
|
||||
|
||||
# define BOOST_NO_CWCHAR
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
|
||||
# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// C++0x features
|
||||
//
|
||||
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
|
||||
//
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_ALIGNAS
|
||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support MPW prior to version 8.9:
|
||||
#if MPW_CPLUS < 0x890
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 0x890:
|
||||
#if (MPW_CPLUS > 0x890)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
// (C) Copyright Eric Jourdanneau, Joel Falcou 2010
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// NVIDIA CUDA C++ compiler setup
|
||||
|
||||
#ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"
|
||||
#endif
|
||||
|
||||
// NVIDIA Specific support
|
||||
// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
|
||||
#define BOOST_GPU_ENABLED __host__ __device__
|
|
@ -1,83 +0,0 @@
|
|||
// (C) Copyright Bryce Lelbach 2011
|
||||
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// PathScale EKOPath C++ Compiler
|
||||
|
||||
#ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__
|
||||
#endif
|
||||
|
||||
#if __PATHCC__ >= 4
|
||||
# define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# define BOOST_HAS_SIGACTION
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
# define BOOST_HAS_THREADS
|
||||
# define BOOST_HAS_PTHREADS
|
||||
# define BOOST_HAS_PTHREAD_YIELD
|
||||
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
# define BOOST_HAS_NRVO
|
||||
# define BOOST_HAS_NL_TYPES_H
|
||||
# define BOOST_HAS_NANOSLEEP
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# define BOOST_HAS_LOG1P
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# define BOOST_HAS_EXPM1
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
# define BOOST_HAS_CLOCK_GETTIME
|
||||
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
# define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
# define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
# define BOOST_NO_SFINAE_EXPR
|
||||
# define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
# define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
# define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
# define BOOST_NO_CXX11_RAW_LITERALS
|
||||
# define BOOST_NO_CXX11_NULLPTR
|
||||
# define BOOST_NO_CXX11_NUMERIC_LIMITS
|
||||
# define BOOST_NO_CXX11_NOEXCEPT
|
||||
# define BOOST_NO_CXX11_LAMBDAS
|
||||
# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
# define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
# define BOOST_NO_CXX11_DECLTYPE
|
||||
# define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
# define BOOST_NO_CXX11_CONSTEXPR
|
||||
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
# define BOOST_NO_CXX11_CHAR32_T
|
||||
# define BOOST_NO_CXX11_CHAR16_T
|
||||
# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
# define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
# define BOOST_NO_CXX11_ALIGNAS
|
||||
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
#endif
|
|
@ -1,125 +0,0 @@
|
|||
// (C) Copyright Noel Belcourt 2007.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// PGI C++ compiler setup:
|
||||
|
||||
#define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__
|
||||
#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
||||
|
||||
//
|
||||
// Threading support:
|
||||
// Turn this on unconditionally here, it will get turned off again later
|
||||
// if no threading API is detected.
|
||||
//
|
||||
|
||||
#if __PGIC__ >= 11
|
||||
|
||||
// options requested by configure --enable-test
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_PTHREAD_YIELD
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
|
||||
// options --enable-test wants undefined
|
||||
#undef BOOST_NO_STDC_NAMESPACE
|
||||
#undef BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
#undef BOOST_DEDUCED_TYPENAME
|
||||
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
|
||||
#elif __PGIC__ >= 10
|
||||
|
||||
// options requested by configure --enable-test
|
||||
#define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_NRVO
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
#if defined(linux) || defined(__linux) || defined(__linux__)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
// options --enable-test wants undefined
|
||||
#undef BOOST_NO_STDC_NAMESPACE
|
||||
#undef BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
#undef BOOST_DEDUCED_TYPENAME
|
||||
|
||||
#elif __PGIC__ >= 7
|
||||
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
|
||||
#else
|
||||
|
||||
# error "Pgi compiler not configured - please reconfigure"
|
||||
|
||||
#endif
|
||||
//
|
||||
// C++0x features
|
||||
//
|
||||
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
|
||||
//
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_NUMERIC_LIMITS
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
|
||||
#define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
#define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
#define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_CXX11_HDR_TUPLE
|
||||
#define BOOST_NO_CXX11_HDR_THREAD
|
||||
#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_CXX11_HDR_REGEX
|
||||
#define BOOST_NO_CXX11_HDR_RATIO
|
||||
#define BOOST_NO_CXX11_HDR_RANDOM
|
||||
#define BOOST_NO_CXX11_HDR_MUTEX
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_CXX11_HDR_FUTURE
|
||||
#define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_CXX11_HDR_CODECVT
|
||||
#define BOOST_NO_CXX11_HDR_CHRONO
|
||||
#define BOOST_NO_CXX11_HDR_ARRAY
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_ALIGNAS
|
||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
|
||||
//
|
||||
// version check:
|
||||
// probably nothing to do here?
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// SGI C++ compiler setup:
|
||||
|
||||
#define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION)
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
//
|
||||
// Threading support:
|
||||
// Turn this on unconditionally here, it will get turned off again later
|
||||
// if no threading API is detected.
|
||||
//
|
||||
#define BOOST_HAS_THREADS
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
|
||||
#undef BOOST_NO_SWPRINTF
|
||||
#undef BOOST_DEDUCED_TYPENAME
|
||||
|
||||
//
|
||||
// version check:
|
||||
// probably nothing to do here?
|
||||
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright Peter Dimov 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002 - 2003.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// Use, modification and distribution are subject to 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 for most recent version.
|
||||
|
||||
// Sun C++ compiler setup:
|
||||
|
||||
# if __SUNPRO_CC <= 0x500
|
||||
# define BOOST_NO_MEMBER_TEMPLATES
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# endif
|
||||
|
||||
# if (__SUNPRO_CC <= 0x520)
|
||||
//
|
||||
// Sunpro 5.2 and earler:
|
||||
//
|
||||
// although sunpro 5.2 supports the syntax for
|
||||
// inline initialization it often gets the value
|
||||
// wrong, especially where the value is computed
|
||||
// from other constants (J Maddock 6th May 2001)
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
|
||||
// Although sunpro 5.2 supports the syntax for
|
||||
// partial specialization, it often seems to
|
||||
// bind to the wrong specialization. Better
|
||||
// to disable it until suppport becomes more stable
|
||||
// (J Maddock 6th May 2001).
|
||||
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# endif
|
||||
|
||||
# if (__SUNPRO_CC <= 0x530)
|
||||
// Requesting debug info (-g) with Boost.Python results
|
||||
// in an internal compiler error for "static const"
|
||||
// initialized in-class.
|
||||
// >> Assertion: (../links/dbg_cstabs.cc, line 611)
|
||||
// while processing ../test.cpp at line 0.
|
||||
// (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002)
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
|
||||
// SunPro 5.3 has better support for partial specialization,
|
||||
// but breaks when compiling std::less<shared_ptr<T> >
|
||||
// (Jens Maurer 4 Nov 2001).
|
||||
|
||||
// std::less specialization fixed as reported by George
|
||||
// Heintzelman; partial specialization re-enabled
|
||||
// (Peter Dimov 17 Jan 2002)
|
||||
|
||||
//# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
// integral constant expressions with 64 bit numbers fail
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# endif
|
||||
|
||||
# if (__SUNPRO_CC < 0x570)
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
// see http://lists.boost.org/MailArchives/boost/msg47184.php
|
||||
// and http://lists.boost.org/MailArchives/boost/msg47220.php
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_NO_SFINAE
|
||||
# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
|
||||
# endif
|
||||
# if (__SUNPRO_CC <= 0x580)
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
|
||||
# if (__SUNPRO_CC <= 0x5100)
|
||||
// Sun 5.10 may not correctly value-initialize objects of
|
||||
// some user defined types, as was reported in April 2010
|
||||
// (CR 6947016), and confirmed by Steve Clamage.
|
||||
// (Niels Dekker, LKEB, May 2010).
|
||||
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
# endif
|
||||
|
||||
//
|
||||
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
|
||||
//
|
||||
#if __SUNPRO_CC > 0x500
|
||||
# define BOOST_SYMBOL_EXPORT __global
|
||||
# define BOOST_SYMBOL_IMPORT __global
|
||||
# define BOOST_SYMBOL_VISIBLE __global
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Issues that effect all known versions:
|
||||
//
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_ADL_BARRIER
|
||||
|
||||
//
|
||||
// C++0x features
|
||||
//
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
|
||||
#define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CXX11_CHAR16_T
|
||||
#define BOOST_NO_CXX11_CHAR32_T
|
||||
#define BOOST_NO_CXX11_CONSTEXPR
|
||||
#define BOOST_NO_CXX11_DECLTYPE
|
||||
#define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_CXX11_LAMBDAS
|
||||
#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_CXX11_NOEXCEPT
|
||||
#define BOOST_NO_CXX11_NULLPTR
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
#define BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
#define BOOST_NO_CXX11_ALIGNAS
|
||||
#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
#define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
#define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support sunpro prior to version 4:
|
||||
#if __SUNPRO_CC < 0x400
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 0x590:
|
||||
#if (__SUNPRO_CC > 0x590)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|