Skip to content

Commit 44bd36b

Browse files
committed
Manual changes to update style and fix breakages
1 parent a370594 commit 44bd36b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+347
-328
lines changed

.ycm_extra_conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
'-Wall',
1818
'-Wextra',
1919
'-Werror',
20-
'-std=c++03',
20+
'-std=c++11',
2121
'-isystem',
2222
'.',
2323
'-isystem',

boost/network/detail/directive_base.hpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#ifndef __NETWORK_DETAIL_DIRECTIVE_BASE_HPP__
88
#define __NETWORK_DETAIL_DIRECTIVE_BASE_HPP__
99

10+
#include <boost/network/message_fwd.hpp>
11+
1012
/** Defines the base type from which all directives inherit
1113
* to allow friend access to message and other types' internals.
1214
*/
@@ -17,12 +19,13 @@ namespace detail {
1719
template <class Tag>
1820
struct directive_base {
1921
typedef Tag tag;
20-
// explicit directive_base(basic_message<tag> & message_)
21-
// : _message(message_)
22+
explicit directive_base(basic_message<tag> & message)
23+
: message_(message) {}
24+
2225
protected:
23-
~directive_base() = default;default;; // can only be extended
26+
~directive_base() = default; // can only be extended
2427

25-
// mutable basic_message<tag> & _message;
28+
basic_message<tag> & message_;
2629
};
2730

2831
} // namespace detail

boost/network/detail/wrapper_base.hpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ struct wrapper_base {
1717
explicit wrapper_base(Message& message_) : _message(message_) {};
1818

1919
protected:
20-
~wrapper_base() = default;default;; // for extending only
21-
20+
~wrapper_base() = default; // for extending only
2221
Message& _message;
2322
};
2423

@@ -27,8 +26,7 @@ struct wrapper_base_const {
2726
explicit wrapper_base_const(Message const& message_) : _message(message_) {}
2827

2928
protected:
30-
~wrapper_base_const() = default;default;; // for extending only
31-
29+
~wrapper_base_const() = default; // for extending only
3230
Message const& _message;
3331
};
3432

boost/network/message.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <boost/network/message_fwd.hpp>
1010
#include <boost/network/traits/string.hpp>
11-
#include <boost/utility/enable_if.hpp>boost/network/traits/headers_container.hpp>
11+
#include <boost/utility/enable_if.hpp>
1212
#include <boost/network/detail/directive_base.hpp>
1313
#include <boost/network/detail/wrapper_base.hpp>
1414
#include <boost/network/message/directives.hpp>

boost/network/message/directives/detail/string_directive.hpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
// (See accompanying file LICENSE_1_0.txt or copy at
77
// http://www.boost.org/LICENSE_1_0.txt)
88

9+
#include <boost/mpl/if.hpp>
10+
#include <boost/mpl/or.hpp>
11+
#include <boost/network/support/is_pod.hpp>
912
#include <boost/network/traits/string.hpp>
13+
#include <boost/utility/enable_if.hpp>
14+
#include <boost/variant/apply_visitor.hpp>
15+
#include <boost/variant/static_visitor.hpp>
1016
#include <boost/variant/variant.hpp>
11-
#include <boost/network/support/is_pod.hpp>>
12-
#include <boost/variant/apply_visitor.hpp>#include <boost/variant/static_visitor.hpp>
13-
#include <boost/mpl/if.hpp<boost/mpl/or.hpp>
14-
#include <boost/utility/enable_if.hpp>ble_if.hpp>
1517

1618
/**
1719
*
@@ -32,7 +34,7 @@
3234
#define BOOST_NETWORK_STRING_DIRECTIVE(name, value, body, pod_body) \
3335
template <class ValueType> \
3436
struct name##_directive { \
35-
ValueType const& ((value)); \
37+
ValueType const&((value)); \
3638
explicit name##_directive(ValueType const& value_) : value(value_) {} \
3739
name##_directive(name##_directive const& other) : value(other.value) {} \
3840
template <class Tag, template <class> class Message> \
@@ -51,7 +53,5 @@
5153
inline name##_directive<T> name(T const& input) { \
5254
return name##_directive<T>(input); \
5355
}
54-
#endif /* BOOST_NETWORK_STRING_DIRECTIVE */
55-
56-
#endif /* BOOST_NETWORK_MESSAGE_DIRECTIVES_DETAIL_STRING_DIRECTIVE_HPP_20100915 \
57-
*/
56+
#endif // BOOST_NETWORK_STRING_DIRECTIVE
57+
#endif // BOOST_NETWORK_MESSAGE_DIRECTIVES_DETAIL_STRING_DIRECTIVE_HPP_20100915

boost/network/message/directives/header.hpp

+12-8
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@
44
// (See accompanying file LICENSE_1_0.txt or copy at
55
// http://www.boost.org/LICENSE_1_0.txt)
66

7-
#ifndef __NETWORK_MESSAGE_DIRECTIVES_HEADER_HPP__
8-
#define __NETWORK_MESSAGE_DIRECTIVES_HEADER_HPP__
7+
#ifndef BOOST_NETWORK_MESSAGE_DIRECTIVES_HEADER_HPP__
8+
#define BOOST_NETWORK_MESSAGE_DIRECTIVES_HEADER_HPP__
99

10-
#include <boost/network/support/is_async.hpp>pp>
11-
#include <boost/network/traits/string.hpp>nclude <boost/utility/enable_if.hpp>ude <boost/thread/future.hpp>
10+
#include <boost/network/support/is_async.hpp>
11+
#include <boost/network/traits/string.hpp>
12+
#include <boost/utility/enable_if.hpp>
13+
#include <boost/thread/future.hpp>
1214
#include <boost/mpl/if.hpp>
1315
#include <boost/mpl/or.hpp>
14-
#include <boost/variant/apply_visitor.hpp>r.hpp>
15-
#include <boost/variant/static_visitor.hpp>>
16-
#include <boost/variant/variant.hpp>pace boost {
16+
#include <boost/variant/apply_visitor.hpp>
17+
#include <boost/variant/static_visitor.hpp>
18+
#include <boost/variant/variant.hpp>
19+
20+
namespace boost {
1721
namespace network {
1822

1923
namespace impl {
@@ -69,4 +73,4 @@ inline impl::header_directive<T1, T2> header(T1 const& header_name,
6973
} // namespace network
7074
} // namespace boost
7175

72-
#endif // __NETWORK_MESSAGE_DIRECTIVES_HEADER_HPP__
76+
#endif // BOOST_NETWORK_MESSAGE_DIRECTIVES_HEADER_HPP__

boost/network/message/directives/remove_header.hpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define NETWORK_MESSAGE_DIRECTIVES_REMOVE_HEADER_HPP
99

1010
#include <boost/network/traits/string.hpp>
11+
#include <string>
1112

1213
namespace boost {
1314
namespace network {
@@ -34,14 +35,15 @@ struct remove_header_directive {
3435
} // namespace impl
3536

3637
inline impl::remove_header_directive<std::string> remove_header(
37-
std::string /*header_name*/ame*/) {
38+
const std::string& header_name) {
3839
return impl::remove_header_directive<std::string>(header_name);
3940
}
4041

4142
inline impl::remove_header_directive<std::wstring> remove_header(
42-
std::wstring header_name) {
43+
const std::wstring& header_name) {
4344
return impl::remove_header_directive<std::wstring>(header_name);
4445
}
46+
4547
} // namespace network
4648
} // namespace boost
4749

boost/network/message/message_concept.hpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
#include <boost/network/message/traits/source.hpp>
1515
#include <boost/network/message/traits/destination.hpp>
1616
#include <boost/network/message/traits/headers.hpp>
17-
#include <boost/network/tags.hp<boost/network/traits/string.hpp>de <boost/thread/future.hpp>oost {
17+
#include <boost/network/tags.hpp>
18+
#include <boost/network/traits/string.hpp>
19+
#include <boost/thread/future.hpp>
20+
21+
namespace boost {
1822
namespace network {
1923

2024
template <class M>

boost/network/message/modifiers/add_header.hpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/mpl/a<boost/mpl/not<boost/network/support/is_async.hpp>nc.hpp>
11-
#include <boost/network/support/is_pod.hpp>ort/is_pod.hpp>
12-
#include <boost/utility/enable_if.hpp>le_if.hpp>
10+
#include <boost/mpl/and.hpp>
11+
#include <boost/mpl/not.hpp>
12+
#include <boost/network/support/is_async.hpp>
13+
#include <boost/network/support/is_pod.hpp>
14+
#include <boost/utility/enable_if.hpp>
1315

1416
namespace boost {
1517
namespace network {
@@ -36,7 +38,7 @@ inline typename enable_if<is_pod<Tag>, void>::type add_header(
3638
typename Message::header_type header = {key, value};
3739
message.headers.insert(message.headers.end(), header);
3840
}
39-
} // namespace impl // namespace impl
41+
} // namespace impl
4042

4143
template <class Tag, template <class> class Message, class KeyType,
4244
class ValueType>

boost/network/message/modifiers/clear_headers.hpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
// (See accompanying file LICENSE_1_0.txt or copy at
77
// http://www.boost.org/LICENSE_1_0.txt)
88

9-
#include <boost/mpl/a<boost/mpl/not<boost/network/support/is_async.hpp>_async.hpp>
10-
#include <boost/network/support/is_pod.hpp>.hpp>
11-
#include <boost/thread/future.hpp>e.hpp>
12-
#include <boost/utility/enable_if.hpp>le_if.hpp>
9+
#include <boost/mpl/and.hpp>
10+
#include <boost/mpl/not.hpp>
11+
#include <boost/network/support/is_async.hpp>
12+
#include <boost/network/support/is_pod.hpp>
13+
#include <boost/thread/future.hpp>
14+
#include <boost/utility/enable_if.hpp>
1315

1416
namespace boost {
1517
namespace network {

boost/network/message/modifiers/remove_header.hpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10+
#include <boost/mpl/not.hpp>
1011
#include <boost/network/support/is_async.hpp>
1112
#include <boost/network/support/is_pod.hpp>
12-
#include <boost/range/algorithm/remove_if.hpp>_if.hpp>
13-
#include <boost/utility/enable_if.hpp>e <boost/algorithm/string/predicate.hpp>
14-
#include <boost/mpl/not.hpp>
13+
#include <boost/range/algorithm/remove_if.hpp>
14+
#include <boost/utility/enable_if.hpp>
15+
#include <boost/algorithm/string/predicate.hpp>
1516

1617
namespace boost {
1718
namespace network {
@@ -38,7 +39,7 @@ struct iequals_pred {
3839
iequals_pred(KeyType const& key) : key(key) {}
3940
template <class Header>
4041
bool operator()(Header& other) const {
41-
return boost::iequals(key, name(other));
42+
return boost::algorithm::iequals(key, name(other));
4243
}
4344
};
4445

boost/network/message/traits/body.hpp

+6-10
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/mpl<boost/mpl/<boost/network/support/is_async.hpp>.hpp>
11-
#include <boost/network/support/is_sync.hpp>_sync.hpp>
12-
#include <boost/thread/future.hpp>re.hpp>
13-
#include <boost/type_traits/is_same.hpp>/is_same.hpp>
10+
#include <boost/mpl/if.hpp>
11+
#include <boost/network/traits/string.hpp>
12+
#include <boost/network/support/is_async.hpp>
13+
#include <boost/network/support/is_sync.hpp>
14+
#include <boost/thread/future.hpp>
15+
#include <boost/type_traits/is_same.hpp>
1416

1517
namespace boost {
1618
namespace network {
@@ -33,13 +35,7 @@ struct body
3335
unsupported_tag<typename Message::tag> >::type> {};
3436

3537
} // namespace traits
36-
3738
} // namespace network
38-
// namespace network
39-
/* network */
40-
4139
} // namespace boost
42-
// namespace boost
43-
/* boost */
4440

4541
#endif // BOOST_NETWORK_MESSAGE_TRAITS_BODY_HPP_20100903

boost/network/message/traits/destination.hpp

+6-10
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/mpl<boost/network/support/is_async.hpp>>
11-
#include <boost/network/support/is_sync.hpp>hpp>
10+
#include <boost/mpl/if.hpp>
11+
#include <boost/network/support/is_async.hpp>
12+
#include <boost/network/support/is_sync.hpp>
13+
#include <boost/network/traits/string.hpp>
1214
#include <boost/thread/future.hpp>
13-
#include <boost/type_traits/is_same.hpp>/is_same.hpp>
15+
#include <boost/type_traits/is_same.hpp>
1416

1517
namespace boost {
1618
namespace network {
@@ -33,13 +35,7 @@ struct destination
3335
unsupported_tag<typename Message::tag> >::type> {};
3436

3537
} // namespace traits
36-
37-
} // namespace network
38-
// namespace network
39-
/* network */
40-
38+
} // namespace network
4139
} // namespace boost
42-
// namespace boost
43-
/* boost */
4440

4541
#endif // BOOST_NETWORK_MESSAGE_TRAITS_DESTINATION_HPP_20100903

boost/network/message/traits/headers.hpp

+8-12
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10-
#include <boost/mpl/if.hpp>ude <boost/mpl/or<boost/network/message/directives.hpp>p>
11-
#include <boost/network/message/transformers.hpp>.hpp>
12-
#include <boost/network/message/wrappers.hpp>appers.hpp>
13-
#include <boost/network/support/is_async.hpp>port/is_async.hpp>
14-
#include <boost/network/support/is_sync.hpp>port/is_sync.hpp>
10+
#include <boost/mpl/if.hpp>
11+
#include <boost/mpl/or.hpp>
12+
#include <boost/network/message/directives.hpp>
13+
#include <boost/network/message/transformers.hpp>
14+
#include <boost/network/message/wrappers.hpp>
15+
#include <boost/network/support/is_async.hpp>
16+
#include <boost/network/support/is_sync.hpp>
1517

1618
namespace boost {
1719
namespace network {
@@ -46,13 +48,7 @@ struct header_value
4648
unsupported_tag<typename Message::tag> >::type> {};
4749

4850
} // namespace traits
49-
50-
} // namespace network
51-
// namespace network
52-
/* network */
53-
51+
} // namespace network
5452
} // namespace boost
55-
// namespace boost
56-
/* boost */
5753

5854
#endif // BOOST_NETWORK_MESSAGE_TRAITS_HEADERS_HPP_20100903

boost/network/message/traits/source.hpp

+6-11
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
// (See accompanying file LICENSE_1_0.txt or copy at
77
// http://www.boost.org/LICENSE_1_0.txt)
88

9-
#include <boost/mpl<boost/network/support/is_async.hpp>>
10-
#include <boost/network/support/is_sync.hpp>hpp>
9+
#include <boost/mpl/if.hpp>
10+
#include <boost/network/support/is_async.hpp>
11+
#include <boost/network/support/is_sync.hpp>
12+
#include <boost/network/traits/string.hpp>
1113
#include <boost/thread/future.hpp>
12-
#include <boost/type_traits/is_same.hpp>/is_same.hpp>
14+
#include <boost/type_traits/is_same.hpp>
1315

1416
namespace boost {
1517
namespace network {
16-
1718
namespace traits {
1819

1920
template <class Tag>
@@ -32,13 +33,7 @@ struct source
3233
unsupported_tag<typename Message::tag> >::type> {};
3334

3435
} // namespace traits
35-
3636
} // namespace network
37-
// namespace network
38-
/* network */
39-
40-
} // namespace boost
41-
// namespace boost
42-
/* boost */
37+
} // namespace boost
4338

4439
#endif // BOOST_NETWORK_MESSAGE_TRAITS_SOURCE_HPP_20100903

0 commit comments

Comments
 (0)