forked from Juniper/contrail-third-party
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boost_1_48_patch1.diff
6752 lines (6379 loc) · 217 KB
/
boost_1_48_patch1.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/third_party/boost_1_48_0/boost/any.hpp b/third_party/boost_1_48_0/boost/any.hpp
index a8c654c..ddb1f6b 100644
--- a/third_party/boost_1_48_0/boost/any.hpp
+++ b/third_party/boost_1_48_0/boost/any.hpp
@@ -207,8 +207,12 @@ namespace boost
#endif
nonref * result = any_cast<nonref>(&operand);
+#ifndef BOOST_NO_EXCEPTIONS
if(!result)
boost::throw_exception(bad_any_cast());
+#else
+ assert(result);
+#endif
return *result;
}
diff --git a/third_party/boost_1_48_0/boost/array.hpp b/third_party/boost_1_48_0/boost/array.hpp
index ffb504b..aca99fd 100644
--- a/third_party/boost_1_48_0/boost/array.hpp
+++ b/third_party/boost_1_48_0/boost/array.hpp
@@ -188,10 +188,14 @@ namespace boost {
// check range (may be private because it is static)
static void rangecheck (size_type i) {
+#ifndef BOOST_NO_EXCEPTIONS
if (i >= size()) {
std::out_of_range e("array<>: index out of range");
boost::throw_exception(e);
}
+#else //BOOST_NO_EXCEPTIONS
+ assert(i < size());
+#endif //BOOST_NO_EXCEPTIONS
}
};
diff --git a/third_party/boost_1_48_0/boost/asio/basic_datagram_socket.hpp b/third_party/boost_1_48_0/boost/asio/basic_datagram_socket.hpp
index bdbcec1..a55fdf9 100644
--- a/third_party/boost_1_48_0/boost/asio/basic_datagram_socket.hpp
+++ b/third_party/boost_1_48_0/boost/asio/basic_datagram_socket.hpp
@@ -82,11 +82,13 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_datagram_socket(boost::asio::io_service& io_service,
const protocol_type& protocol)
: basic_socket<Protocol, DatagramSocketService>(io_service, protocol)
{
}
+#endif
/// Construct a basic_datagram_socket, opening it and binding it to the given
/// local endpoint.
@@ -104,11 +106,13 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_datagram_socket(boost::asio::io_service& io_service,
const endpoint_type& endpoint)
: basic_socket<Protocol, DatagramSocketService>(io_service, endpoint)
{
}
+#endif
/// Construct a basic_datagram_socket on an existing native socket.
/**
@@ -125,12 +129,14 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_datagram_socket(boost::asio::io_service& io_service,
const protocol_type& protocol, const native_handle_type& native_socket)
: basic_socket<Protocol, DatagramSocketService>(
io_service, protocol, native_socket)
{
}
+#endif
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_datagram_socket from another.
@@ -190,6 +196,7 @@ public:
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename ConstBufferSequence>
std::size_t send(const ConstBufferSequence& buffers)
{
@@ -199,6 +206,7 @@ public:
boost::asio::detail::throw_error(ec, "send");
return s;
}
+#endif
/// Send some data on a connected socket.
/**
@@ -217,6 +225,7 @@ public:
* @note The send operation can only be used with a connected socket. Use
* the send_to function to send data on an unconnected datagram socket.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename ConstBufferSequence>
std::size_t send(const ConstBufferSequence& buffers,
socket_base::message_flags flags)
@@ -227,6 +236,7 @@ public:
boost::asio::detail::throw_error(ec, "send");
return s;
}
+#endif
/// Send some data on a connected socket.
/**
@@ -368,6 +378,7 @@ public:
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename ConstBufferSequence>
std::size_t send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination)
@@ -378,6 +389,7 @@ public:
boost::asio::detail::throw_error(ec, "send_to");
return s;
}
+#endif
/// Send a datagram to the specified endpoint.
/**
@@ -395,6 +407,7 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename ConstBufferSequence>
std::size_t send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination, socket_base::message_flags flags)
@@ -405,6 +418,7 @@ public:
boost::asio::detail::throw_error(ec, "send_to");
return s;
}
+#endif
/// Send a datagram to the specified endpoint.
/**
@@ -545,6 +559,7 @@ public:
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t receive(const MutableBufferSequence& buffers)
{
@@ -554,6 +569,7 @@ public:
boost::asio::detail::throw_error(ec, "receive");
return s;
}
+#endif
/// Receive some data on a connected socket.
/**
@@ -573,6 +589,7 @@ public:
* the receive_from function to receive data on an unconnected datagram
* socket.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags)
@@ -583,6 +600,7 @@ public:
boost::asio::detail::throw_error(ec, "receive");
return s;
}
+#endif
/// Receive some data on a connected socket.
/**
@@ -725,6 +743,7 @@ public:
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint)
@@ -735,6 +754,7 @@ public:
boost::asio::detail::throw_error(ec, "receive_from");
return s;
}
+#endif
/// Receive a datagram with the endpoint of the sender.
/**
@@ -752,6 +772,7 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint, socket_base::message_flags flags)
@@ -762,6 +783,7 @@ public:
boost::asio::detail::throw_error(ec, "receive_from");
return s;
}
+#endif
/// Receive a datagram with the endpoint of the sender.
/**
diff --git a/third_party/boost_1_48_0/boost/asio/basic_deadline_timer.hpp b/third_party/boost_1_48_0/boost/asio/basic_deadline_timer.hpp
index c90cbee..dd7cb84 100644
--- a/third_party/boost_1_48_0/boost/asio/basic_deadline_timer.hpp
+++ b/third_party/boost_1_48_0/boost/asio/basic_deadline_timer.hpp
@@ -156,6 +156,7 @@ public:
* @param expiry_time The expiry time to be used for the timer, expressed
* as an absolute time.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_deadline_timer(boost::asio::io_service& io_service,
const time_type& expiry_time)
: basic_io_object<TimerService>(io_service)
@@ -164,6 +165,7 @@ public:
this->service.expires_at(this->implementation, expiry_time, ec);
boost::asio::detail::throw_error(ec, "expires_at");
}
+#endif
/// Constructor to set a particular expiry time relative to now.
/**
@@ -175,6 +177,7 @@ public:
* @param expiry_time The expiry time to be used for the timer, relative to
* now.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_deadline_timer(boost::asio::io_service& io_service,
const duration_type& expiry_time)
: basic_io_object<TimerService>(io_service)
@@ -183,6 +186,7 @@ public:
this->service.expires_from_now(this->implementation, expiry_time, ec);
boost::asio::detail::throw_error(ec, "expires_from_now");
}
+#endif
/// Cancel any asynchronous operations that are waiting on the timer.
/**
@@ -206,6 +210,7 @@ public:
* These handlers can no longer be cancelled, and therefore are passed an
* error code that indicates the successful completion of the wait operation.
*/
+#ifndef BOOST_NO_EXCEPTIONS
std::size_t cancel()
{
boost::system::error_code ec;
@@ -213,6 +218,7 @@ public:
boost::asio::detail::throw_error(ec, "cancel");
return s;
}
+#endif
/// Cancel any asynchronous operations that are waiting on the timer.
/**
@@ -265,6 +271,7 @@ public:
* These handlers can no longer be cancelled, and therefore are passed an
* error code that indicates the successful completion of the wait operation.
*/
+#ifndef BOOST_NO_EXCEPTIONS
std::size_t cancel_one()
{
boost::system::error_code ec;
@@ -272,6 +279,7 @@ public:
boost::asio::detail::throw_error(ec, "cancel_one");
return s;
}
+#endif
/// Cancels one asynchronous operation that is waiting on the timer.
/**
@@ -334,6 +342,7 @@ public:
* These handlers can no longer be cancelled, and therefore are passed an
* error code that indicates the successful completion of the wait operation.
*/
+#ifndef BOOST_NO_EXCEPTIONS
std::size_t expires_at(const time_type& expiry_time)
{
boost::system::error_code ec;
@@ -342,6 +351,7 @@ public:
boost::asio::detail::throw_error(ec, "expires_at");
return s;
}
+#endif
/// Set the timer's expiry time as an absolute time.
/**
@@ -403,6 +413,7 @@ public:
* These handlers can no longer be cancelled, and therefore are passed an
* error code that indicates the successful completion of the wait operation.
*/
+#ifndef BOOST_NO_EXCEPTIONS
std::size_t expires_from_now(const duration_type& expiry_time)
{
boost::system::error_code ec;
@@ -411,6 +422,7 @@ public:
boost::asio::detail::throw_error(ec, "expires_from_now");
return s;
}
+#endif
/// Set the timer's expiry time relative to now.
/**
@@ -448,12 +460,14 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void wait()
{
boost::system::error_code ec;
this->service.wait(this->implementation, ec);
boost::asio::detail::throw_error(ec, "wait");
}
+#endif
/// Perform a blocking wait on the timer.
/**
diff --git a/third_party/boost_1_48_0/boost/asio/basic_raw_socket.hpp b/third_party/boost_1_48_0/boost/asio/basic_raw_socket.hpp
index b29dd62..8b46249 100644
--- a/third_party/boost_1_48_0/boost/asio/basic_raw_socket.hpp
+++ b/third_party/boost_1_48_0/boost/asio/basic_raw_socket.hpp
@@ -82,11 +82,13 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_raw_socket(boost::asio::io_service& io_service,
const protocol_type& protocol)
: basic_socket<Protocol, RawSocketService>(io_service, protocol)
{
}
+#endif
/// Construct a basic_raw_socket, opening it and binding it to the given
/// local endpoint.
@@ -104,11 +106,13 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_raw_socket(boost::asio::io_service& io_service,
const endpoint_type& endpoint)
: basic_socket<Protocol, RawSocketService>(io_service, endpoint)
{
}
+#endif
/// Construct a basic_raw_socket on an existing native socket.
/**
@@ -125,12 +129,14 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_raw_socket(boost::asio::io_service& io_service,
const protocol_type& protocol, const native_handle_type& native_socket)
: basic_socket<Protocol, RawSocketService>(
io_service, protocol, native_socket)
{
}
+#endif
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_raw_socket from another.
@@ -188,6 +194,7 @@ public:
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename ConstBufferSequence>
std::size_t send(const ConstBufferSequence& buffers)
{
@@ -197,6 +204,7 @@ public:
boost::asio::detail::throw_error(ec, "send");
return s;
}
+#endif
/// Send some data on a connected socket.
/**
@@ -214,6 +222,7 @@ public:
* @note The send operation can only be used with a connected socket. Use
* the send_to function to send data on an unconnected raw socket.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename ConstBufferSequence>
std::size_t send(const ConstBufferSequence& buffers,
socket_base::message_flags flags)
@@ -224,6 +233,7 @@ public:
boost::asio::detail::throw_error(ec, "send");
return s;
}
+#endif
/// Send some data on a connected socket.
/**
@@ -362,6 +372,7 @@ public:
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename ConstBufferSequence>
std::size_t send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination)
@@ -372,6 +383,7 @@ public:
boost::asio::detail::throw_error(ec, "send_to");
return s;
}
+#endif
/// Send raw data to the specified endpoint.
/**
@@ -389,6 +401,7 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename ConstBufferSequence>
std::size_t send_to(const ConstBufferSequence& buffers,
const endpoint_type& destination, socket_base::message_flags flags)
@@ -399,6 +412,7 @@ public:
boost::asio::detail::throw_error(ec, "send_to");
return s;
}
+#endif
/// Send raw data to the specified endpoint.
/**
@@ -539,6 +553,7 @@ public:
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t receive(const MutableBufferSequence& buffers)
{
@@ -548,6 +563,7 @@ public:
boost::asio::detail::throw_error(ec, "receive");
return s;
}
+#endif
/// Receive some data on a connected socket.
/**
@@ -567,6 +583,7 @@ public:
* the receive_from function to receive data on an unconnected raw
* socket.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t receive(const MutableBufferSequence& buffers,
socket_base::message_flags flags)
@@ -577,6 +594,7 @@ public:
boost::asio::detail::throw_error(ec, "receive");
return s;
}
+#endif
/// Receive some data on a connected socket.
/**
@@ -719,6 +737,7 @@ public:
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint)
@@ -729,6 +748,7 @@ public:
boost::asio::detail::throw_error(ec, "receive_from");
return s;
}
+#endif
/// Receive raw data with the endpoint of the sender.
/**
@@ -746,6 +766,7 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t receive_from(const MutableBufferSequence& buffers,
endpoint_type& sender_endpoint, socket_base::message_flags flags)
@@ -756,6 +777,7 @@ public:
boost::asio::detail::throw_error(ec, "receive_from");
return s;
}
+#endif
/// Receive raw data with the endpoint of the sender.
/**
diff --git a/third_party/boost_1_48_0/boost/asio/basic_seq_packet_socket.hpp b/third_party/boost_1_48_0/boost/asio/basic_seq_packet_socket.hpp
index 17e15e7..e6e305a 100644
--- a/third_party/boost_1_48_0/boost/asio/basic_seq_packet_socket.hpp
+++ b/third_party/boost_1_48_0/boost/asio/basic_seq_packet_socket.hpp
@@ -86,11 +86,13 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_seq_packet_socket(boost::asio::io_service& io_service,
const protocol_type& protocol)
: basic_socket<Protocol, SeqPacketSocketService>(io_service, protocol)
{
}
+#endif
/// Construct a basic_seq_packet_socket, opening it and binding it to the
/// given local endpoint.
@@ -108,11 +110,13 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_seq_packet_socket(boost::asio::io_service& io_service,
const endpoint_type& endpoint)
: basic_socket<Protocol, SeqPacketSocketService>(io_service, endpoint)
{
}
+#endif
/// Construct a basic_seq_packet_socket on an existing native socket.
/**
@@ -129,12 +133,14 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_seq_packet_socket(boost::asio::io_service& io_service,
const protocol_type& protocol, const native_handle_type& native_socket)
: basic_socket<Protocol, SeqPacketSocketService>(
io_service, protocol, native_socket)
{
}
+#endif
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_seq_packet_socket from another.
@@ -196,6 +202,7 @@ public:
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename ConstBufferSequence>
std::size_t send(const ConstBufferSequence& buffers,
socket_base::message_flags flags)
@@ -206,6 +213,7 @@ public:
boost::asio::detail::throw_error(ec, "send");
return s;
}
+#endif
/// Send some data on the socket.
/**
@@ -308,6 +316,7 @@ public:
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t receive(const MutableBufferSequence& buffers,
socket_base::message_flags& out_flags)
@@ -318,6 +327,7 @@ public:
boost::asio::detail::throw_error(ec, "receive");
return s;
}
+#endif
/// Receive some data on the socket.
/**
@@ -354,6 +364,7 @@ public:
* multiple buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t receive(const MutableBufferSequence& buffers,
socket_base::message_flags in_flags,
@@ -365,6 +376,7 @@ public:
boost::asio::detail::throw_error(ec, "receive");
return s;
}
+#endif
/// Receive some data on a connected socket.
/**
diff --git a/third_party/boost_1_48_0/boost/asio/basic_serial_port.hpp b/third_party/boost_1_48_0/boost/asio/basic_serial_port.hpp
index a94b0e5..62e24bb 100644
--- a/third_party/boost_1_48_0/boost/asio/basic_serial_port.hpp
+++ b/third_party/boost_1_48_0/boost/asio/basic_serial_port.hpp
@@ -82,6 +82,7 @@ public:
* @param device The platform-specific device name for this serial
* port.
*/
+#ifndef BOOST_NO_EXCEPTIONS
explicit basic_serial_port(boost::asio::io_service& io_service,
const char* device)
: basic_io_object<SerialPortService>(io_service)
@@ -90,6 +91,7 @@ public:
this->get_service().open(this->get_implementation(), device, ec);
boost::asio::detail::throw_error(ec, "open");
}
+#endif
/// Construct and open a basic_serial_port.
/**
@@ -102,6 +104,7 @@ public:
* @param device The platform-specific device name for this serial
* port.
*/
+#ifndef BOOST_NO_EXCEPTIONS
explicit basic_serial_port(boost::asio::io_service& io_service,
const std::string& device)
: basic_io_object<SerialPortService>(io_service)
@@ -110,6 +113,7 @@ public:
this->get_service().open(this->get_implementation(), device, ec);
boost::asio::detail::throw_error(ec, "open");
}
+#endif
/// Construct a basic_serial_port on an existing native serial port.
/**
@@ -123,6 +127,7 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_serial_port(boost::asio::io_service& io_service,
const native_handle_type& native_serial_port)
: basic_io_object<SerialPortService>(io_service)
@@ -132,6 +137,7 @@ public:
native_serial_port, ec);
boost::asio::detail::throw_error(ec, "assign");
}
+#endif
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_serial_port from another.
@@ -204,12 +210,14 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void open(const std::string& device)
{
boost::system::error_code ec;
this->get_service().open(this->get_implementation(), device, ec);
boost::asio::detail::throw_error(ec, "open");
}
+#endif
/// Open the serial port using the specified device name.
/**
@@ -234,6 +242,7 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void assign(const native_handle_type& native_serial_port)
{
boost::system::error_code ec;
@@ -241,6 +250,7 @@ public:
native_serial_port, ec);
boost::asio::detail::throw_error(ec, "assign");
}
+#endif
/// Assign an existing native serial port to the serial port.
/*
@@ -271,12 +281,14 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void close()
{
boost::system::error_code ec;
this->get_service().close(this->get_implementation(), ec);
boost::asio::detail::throw_error(ec, "close");
}
+#endif
/// Close the serial port.
/**
@@ -322,12 +334,14 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void cancel()
{
boost::system::error_code ec;
this->get_service().cancel(this->get_implementation(), ec);
boost::asio::detail::throw_error(ec, "cancel");
}
+#endif
/// Cancel all asynchronous operations associated with the serial port.
/**
@@ -349,12 +363,14 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void send_break()
{
boost::system::error_code ec;
this->get_service().send_break(this->get_implementation(), ec);
boost::asio::detail::throw_error(ec, "send_break");
}
+#endif
/// Send a break sequence to the serial port.
/**
@@ -383,6 +399,7 @@ public:
* boost::asio::serial_port_base::stop_bits @n
* boost::asio::serial_port_base::character_size
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename SettableSerialPortOption>
void set_option(const SettableSerialPortOption& option)
{
@@ -390,6 +407,7 @@ public:
this->get_service().set_option(this->get_implementation(), option, ec);
boost::asio::detail::throw_error(ec, "set_option");
}
+#endif
/// Set an option on the serial port.
/**
@@ -430,6 +448,7 @@ public:
* boost::asio::serial_port_base::stop_bits @n
* boost::asio::serial_port_base::character_size
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename GettableSerialPortOption>
void get_option(GettableSerialPortOption& option)
{
@@ -437,6 +456,7 @@ public:
this->get_service().get_option(this->get_implementation(), option, ec);
boost::asio::detail::throw_error(ec, "get_option");
}
+#endif
/// Get an option from the serial port.
/**
@@ -489,6 +509,7 @@ public:
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename ConstBufferSequence>
std::size_t write_some(const ConstBufferSequence& buffers)
{
@@ -498,6 +519,7 @@ public:
boost::asio::detail::throw_error(ec, "write_some");
return s;
}
+#endif
/// Write some data to the serial port.
/**
@@ -598,6 +620,7 @@ public:
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
+#ifndef BOOST_NO_EXCEPTIONS
template <typename MutableBufferSequence>
std::size_t read_some(const MutableBufferSequence& buffers)
{
@@ -607,6 +630,7 @@ public:
boost::asio::detail::throw_error(ec, "read_some");
return s;
}
+#endif
/// Read some data from the serial port.
/**
diff --git a/third_party/boost_1_48_0/boost/asio/basic_signal_set.hpp b/third_party/boost_1_48_0/boost/asio/basic_signal_set.hpp
index 2f84a14..3e8a225 100644
--- a/third_party/boost_1_48_0/boost/asio/basic_signal_set.hpp
+++ b/third_party/boost_1_48_0/boost/asio/basic_signal_set.hpp
@@ -120,6 +120,7 @@ public:
* @code boost::asio::signal_set signals(io_service);
* signals.add(signal_number_1); @endcode
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_signal_set(boost::asio::io_service& io_service, int signal_number_1)
: basic_io_object<SignalSetService>(io_service)
{
@@ -127,6 +128,7 @@ public:
this->service.add(this->implementation, signal_number_1, ec);
boost::asio::detail::throw_error(ec, "add");
}
+#endif
/// Construct a signal set and add two signals.
/**
@@ -144,6 +146,7 @@ public:
* signals.add(signal_number_1);
* signals.add(signal_number_2); @endcode
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_signal_set(boost::asio::io_service& io_service, int signal_number_1,
int signal_number_2)
: basic_io_object<SignalSetService>(io_service)
@@ -154,6 +157,7 @@ public:
this->service.add(this->implementation, signal_number_2, ec);
boost::asio::detail::throw_error(ec, "add");
}
+#endif
/// Construct a signal set and add three signals.
/**
@@ -174,6 +178,7 @@ public:
* signals.add(signal_number_2);
* signals.add(signal_number_3); @endcode
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_signal_set(boost::asio::io_service& io_service, int signal_number_1,
int signal_number_2, int signal_number_3)
: basic_io_object<SignalSetService>(io_service)
@@ -186,6 +191,7 @@ public:
this->service.add(this->implementation, signal_number_3, ec);
boost::asio::detail::throw_error(ec, "add");
}
+#endif
/// Add a signal to a signal_set.
/**
@@ -196,12 +202,14 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void add(int signal_number)
{
boost::system::error_code ec;
this->service.add(this->implementation, signal_number, ec);
boost::asio::detail::throw_error(ec, "add");
}
+#endif
/// Add a signal to a signal_set.
/**
@@ -230,12 +238,14 @@ public:
* @note Removes any notifications that have been queued for the specified
* signal number.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void remove(int signal_number)
{
boost::system::error_code ec;
this->service.remove(this->implementation, signal_number, ec);
boost::asio::detail::throw_error(ec, "remove");
}
+#endif
/// Remove a signal from a signal_set.
/**
@@ -264,12 +274,14 @@ public:
*
* @note Removes all queued notifications.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void clear()
{
boost::system::error_code ec;
this->service.clear(this->implementation, ec);
boost::asio::detail::throw_error(ec, "clear");
}
+#endif
/// Remove all signals from a signal_set.
/**
@@ -306,12 +318,14 @@ public:
* These handlers can no longer be cancelled, and therefore are passed an
* error code that indicates the successful completion of the wait operation.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void cancel()
{
boost::system::error_code ec;
this->service.cancel(this->implementation, ec);
boost::asio::detail::throw_error(ec, "cancel");
}
+#endif
/// Cancel all operations associated with the signal set.
/**
diff --git a/third_party/boost_1_48_0/boost/asio/basic_socket.hpp b/third_party/boost_1_48_0/boost/asio/basic_socket.hpp
index 28c5be1..904fe68 100644
--- a/third_party/boost_1_48_0/boost/asio/basic_socket.hpp
+++ b/third_party/boost_1_48_0/boost/asio/basic_socket.hpp
@@ -81,6 +81,7 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_socket(boost::asio::io_service& io_service,
const protocol_type& protocol)
: basic_io_object<SocketService>(io_service)
@@ -89,7 +90,7 @@ public:
this->get_service().open(this->get_implementation(), protocol, ec);
boost::asio::detail::throw_error(ec, "open");
}
-
+#endif
/// Construct a basic_socket, opening it and binding it to the given local
/// endpoint.
/**
@@ -105,6 +106,7 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_socket(boost::asio::io_service& io_service,
const endpoint_type& endpoint)
: basic_io_object<SocketService>(io_service)
@@ -116,7 +118,7 @@ public:
this->get_service().bind(this->get_implementation(), endpoint, ec);
boost::asio::detail::throw_error(ec, "bind");
}
-
+#endif
/// Construct a basic_socket on an existing native socket.
/**
* This constructor creates a socket object to hold an existing native socket.
@@ -130,6 +132,7 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
basic_socket(boost::asio::io_service& io_service,
const protocol_type& protocol, const native_handle_type& native_socket)
: basic_io_object<SocketService>(io_service)
@@ -139,7 +142,7 @@ public:
protocol, native_socket, ec);
boost::asio::detail::throw_error(ec, "assign");
}
-
+#endif
#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Move-construct a basic_socket from another.
/**
@@ -217,13 +220,14 @@ public:
* socket.open(boost::asio::ip::tcp::v4());
* @endcode
*/
+#ifndef BOOST_NO_EXCEPTIONS
void open(const protocol_type& protocol = protocol_type())
{
boost::system::error_code ec;
this->get_service().open(this->get_implementation(), protocol, ec);
boost::asio::detail::throw_error(ec, "open");
}
-
+#endif
/// Open the socket using the specified protocol.
/**
* This function opens the socket so that it will use the specified protocol.
@@ -259,6 +263,7 @@ public:
*
* @throws boost::system::system_error Thrown on failure.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void assign(const protocol_type& protocol,
const native_handle_type& native_socket)
{
@@ -267,7 +272,7 @@ public:
protocol, native_socket, ec);
boost::asio::detail::throw_error(ec, "assign");
}
-
+#endif
/// Assign an existing native socket to the socket.
/*
* This function opens the socket to hold an existing native socket.
@@ -303,13 +308,14 @@ public:
* @note For portable behaviour with respect to graceful closure of a
* connected socket, call shutdown() before closing the socket.
*/
+#ifndef BOOST_NO_EXCEPTIONS
void close()
{
boost::system::error_code ec;
this->get_service().close(this->get_implementation(), ec);
boost::asio::detail::throw_error(ec, "close");
}
-