Boost logo

Boost :

Subject: [boost] Old style casts and Boost style guidelines
From: Jon Biggar (jon_at_[hidden])
Date: 2008-09-13 17:15:42


I wanted to get rid of all old-style casts in my application, so I
turned on -Wold-style-cast in gcc and found a whole bunch of old-style
casts in boost headers.

It seems to me that the boost coding style guidelines ought to
explicitly discourage old-style casts. Any one else have a point of view?

I've attached a list of the old-style casts gcc found in the 1.36
headers. This list isn't exhaustive, since my app doesn't use all boost
libraries. :)

-- 
Jon Biggar
jon_at_[hidden]
jon_at_[hidden]
jonbiggar_at_[hidden]

../../../boost/asio/detail/posix_fd_set_adapter.hpp:41: warning: use of old-style cast
../../../boost/asio/detail/posix_fd_set_adapter.hpp:45: warning: use of old-style cast
../../../boost/asio/detail/posix_fd_set_adapter.hpp:53: warning: use of old-style cast
../../../boost/asio/detail/signal_init.hpp:41: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:117: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:163: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:423: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:469: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:470: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:471: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:558: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:560: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:581: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:583: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:772: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:78: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:81: warning: use of old-style cast
../../../boost/asio/detail/socket_ops.hpp:858: warning: use of old-style cast
../../../boost/asio/detail/socket_select_interrupter.hpp:61: warning: use of old-style cast
../../../boost/asio/detail/socket_select_interrupter.hpp:68: warning: use of old-style cast
../../../boost/asio/detail/socket_select_interrupter.hpp:90: warning: use of old-style cast
../../../boost/asio/ip/address_v4.hpp:153: warning: use of old-style cast
../../../boost/asio/ip/address_v4.hpp:159: warning: use of old-style cast
../../../boost/asio/ip/address_v4.hpp:165: warning: use of old-style cast
../../../boost/asio/ip/address_v4.hpp:171: warning: use of old-style cast
../../../boost/asio/ip/address_v4.hpp:213: warning: use of old-style cast
../../../boost/asio/ip/address_v4.hpp:219: warning: use of old-style cast
../../../boost/asio/ip/address_v4.hpp:225: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:189: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:207: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:215: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:222: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:229: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:236: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:243: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:250: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:257: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:264: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:271: warning: use of old-style cast
../../../boost/asio/ip/address_v6.hpp:278: warning: use of old-style cast
../../../boost/asio/ip/basic_endpoint.hpp:71: warning: use of old-style cast
../../../boost/asio/ip/basic_endpoint.hpp:99: warning: use of old-style cast
../../../boost/asio/ip/detail/socket_option.hpp:275: warning: use of old-style cast
../../../boost/asio/ip/detail/socket_option.hpp:284: warning: use of old-style cast
../../../boost/asio/ip/detail/socket_option.hpp:353: warning: use of old-style cast
../../../boost/asio/is_read_buffered.hpp:54: warning: use of old-style cast
../../../boost/asio/is_write_buffered.hpp:54: warning: use of old-style cast
../../../boost/concept_check.hpp:915: warning: use of old-style cast
../../../boost/concept_check.hpp:928: warning: use of old-style cast
../../../boost/concept/detail/general.hpp:29: warning: use of old-style cast
../../../boost/concept/detail/general.hpp:37: warning: use of old-style cast
../../../boost/concept/detail/has_constraints.hpp:40: warning: use of old-style cast
../../../boost/concept/usage.hpp:21: warning: use of old-style cast
../../../boost/detail/lcast_precision.hpp:176: warning: use of old-style cast
../../../boost/detail/lcast_precision.hpp:177: warning: use of old-style cast
../../../boost/detail/sp_convertible.hpp:48: warning: use of old-style cast
../../../boost/exception/enable_error_info.hpp:85: warning: use of old-style cast
../../../boost/functional/detail/hash_float.hpp:180: warning: use of old-style cast
../../../boost/functional/detail/hash_float.hpp:182: warning: use of old-style cast
../../../boost/functional/hash/hash.hpp:112: warning: use of old-style cast
../../../boost/functional/hash/hash.hpp:114: warning: use of old-style cast
../../../boost/functional/hash/hash.hpp:132: warning: use of old-style cast
../../../boost/functional/hash/hash.hpp:134: warning: use of old-style cast
../../../boost/function/function_base.hpp:300: warning: use of old-style cast
../../../boost/function/function_base.hpp:347: warning: use of old-style cast
../../../boost/function/function_base.hpp:434: warning: use of old-style cast
../../../boost/function/function_base.hpp:619: warning: use of old-style cast
../../../boost/function/function_template.hpp:342: warning: use of old-style cast
../../../boost/function/function_template.hpp:435: warning: use of old-style cast
../../../boost/iterator/detail/facade_iterator_category.hpp:145: warning: use of old-style cast
../../../boost/iterator/detail/facade_iterator_category.hpp:151: warning: use of old-style cast
../../../boost/iterator/detail/facade_iterator_category.hpp:152: warning: use of old-style cast
../../../boost/iterator/detail/facade_iterator_category.hpp:153: warning: use of old-style cast
../../../boost/iterator/detail/facade_iterator_category.hpp:155: warning: use of old-style cast
../../../boost/iterator/detail/facade_iterator_category.hpp:166: warning: use of old-style cast
../../../boost/lexical_cast.hpp:578: warning: use of old-style cast
../../../boost/lexical_cast.hpp:694: warning: use of old-style cast
../../../boost/lexical_cast.hpp:764: warning: use of old-style cast
../../../boost/mpl/aux_/preprocessed/gcc/arg.hpp:117: warning: use of old-style cast
../../../boost/mpl/aux_/preprocessed/gcc/arg.hpp:27: warning: use of old-style cast
../../../boost/mpl/aux_/preprocessed/gcc/arg.hpp:45: warning: use of old-style cast
../../../boost/mpl/aux_/preprocessed/gcc/arg.hpp:63: warning: use of old-style cast
../../../boost/mpl/aux_/preprocessed/gcc/arg.hpp:81: warning: use of old-style cast
../../../boost/mpl/aux_/preprocessed/gcc/arg.hpp:99: warning: use of old-style cast
../../../boost/none.hpp:23: warning: use of old-style cast
../../../boost/regex/v4/cpp_regex_traits.hpp:284: warning: use of old-style cast
../../../boost/regex/v4/cpp_regex_traits.hpp:294: warning: use of old-style cast
../../../boost/regex/v4/cpp_regex_traits.hpp:653: warning: use of old-style cast
../../../boost/regex/v4/cpp_regex_traits.hpp:663: warning: use of old-style cast
../../../boost/regex/v4/match_results.hpp:106: warning: use of old-style cast
../../../boost/regex/v4/match_results.hpp:115: warning: use of old-style cast
../../../boost/regex/v4/match_results.hpp:128: warning: use of old-style cast
../../../boost/regex/v4/match_results.hpp:369: warning: use of old-style cast
../../../boost/regex/v4/match_results.hpp:370: warning: use of old-style cast
../../../boost/regex/v4/match_results.hpp:94: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_common.hpp:787: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_common.hpp:831: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_common.hpp:866: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher.hpp:50: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher.hpp:54: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_non_recursive.hpp:432: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_non_recursive.hpp:433: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_non_recursive.hpp:476: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_non_recursive.hpp:477: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_non_recursive.hpp:665: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_non_recursive.hpp:671: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_non_recursive.hpp:733: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_non_recursive.hpp:739: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_non_recursive.hpp:802: warning: use of old-style cast
../../../boost/regex/v4/perl_matcher_non_recursive.hpp:808: warning: use of old-style cast
../../../boost/regex/v4/regex_split.hpp:124: warning: use of old-style cast
../../../boost/regex/v4/regex_token_iterator.hpp:112: warning: use of old-style cast
../../../boost/regex/v4/regex_token_iterator.hpp:141: warning: use of old-style cast
../../../boost/regex/v4/sub_match.hpp:69: warning: use of old-style cast
../../../boost/regex/v4/sub_match.hpp:75: warning: use of old-style cast
../../../boost/thread/locks.hpp:1259: warning: use of old-style cast
../../../boost/thread/locks.hpp:1293: warning: use of old-style cast
../../../boost/thread/locks.hpp:1299: warning: use of old-style cast
../../../boost/thread/locks.hpp:1305: warning: use of old-style cast
../../../boost/thread/locks.hpp:43: warning: use of old-style cast
../../../boost/thread/locks.hpp:59: warning: use of old-style cast
../../../boost/thread/locks.hpp:75: warning: use of old-style cast
../../../boost/thread/pthread/timespec.hpp:28: warning: use of old-style cast
../../../boost/thread/thread_time.hpp:34: warning: use of old-style cast
../../../boost/thread/xtime.hpp:83: warning: use of old-style cast


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk