Boost inspection notification (2006-09-28/RC_1_34_0) *X*

Boost Inspection Report Run Date: 16:03:07 UTC, Thursday 28 September 2006 An inspection program <http://www.boost.org/tools/inspect/index.html> checks each file in the current Boost CVS for various problems, generating this as output. Problems detected include tabs in files, missing copyrights, broken URL's, and similar misdemeanors. Totals: 11685 files scanned 904 directories scanned (including root) 161 problems reported Problem counts: 0 files with invalid line endings 0 bookmarks with invalid characters 3 invalid urls 88 broken links 25 unlinked files 7 file/directory names issues 0 files with tabs 0 violations of the Boost min/max guidelines 38 usages of unnamed namespaces in headers (including .ipp files) Summary: archive (3) bind (1) build (3) date_time (1) doc (2) filesystem (36) graph (3) iostreams (2) iterator (3) lambda (3) mpl (1) multi_array (2) parameter (2) ptr_container (1) regex (1) regression (13) serialization (1) test (79) thread (3) type_traits (1) Details: *R* invalid (cr only) line-ending *A* invalid bookmarks, invalid urls, broken links, unlinked files *N* file/directory names issues *T* tabs in file *M* uses of min or max that have not been protected from the min/max macros, or unallowed #undef-s *U* unnamed namespace in header |archive| boost/archive/basic_streambuf_locale_saver.hpp: *N* name exceeds 31 characters boost/archive/impl/xml_wiarchive_impl.ipp: *U* unnamed namespace at line 53 boost/archive/iterators/remove_whitespace.hpp: *U* unnamed namespace at line 57 |bind| boost/bind/placeholders.hpp: *U* unnamed namespace at line 25 |build| tools/build/v1/variables.html: *A* unlinked file tools/build/v2/example/make/main.cpp.pro: *N* name contains more than one dot character ('.') tools/build/v2/test/test_system.html: *A* unlinked file |date_time| libs/date_time/xmldoc/date_time_docs_howto.html: *A* unlinked file |doc| doc/html/boost_math/inverse_complex.html: *A* unlinked file doc/html/jam.html: *A* unlinked file |filesystem| libs/filesystem/doc/do-list.htm: *A* invalid URL (hardwired file): file://?/ *A* invalid URL (hardwired file): file://?/UNC/ libs/filesystem/doc/i18n.html: *A* broken link: convenience.htm#basic_recursive_directory_iterator *A* broken link: exception.htm *A* broken link: operations.htm *A* broken link: operations.htm#Do-the-right-thing *A* broken link: operations.htm#is_directory *A* broken link: operations.htm#is_file *A* broken link: operations.htm#status libs/filesystem/doc/index.htm: *A* broken link: convenience.htm *A* broken link: fstream.htm *A* broken link: operations.htm#create_directory *A* broken link: operations.htm#create_hard_link *A* broken link: operations.htm#current_path *A* broken link: operations.htm#directory_iterator *A* broken link: operations.htm#equivalent *A* broken link: operations.htm#file_size *A* broken link: operations.htm#initial_path *A* broken link: operations.htm#is_file *A* broken link: operations.htm#is_symlink *A* broken link: operations.htm#status *A* broken link: operations.htm#symlink_status *A* broken link: path.htm#Canonical *A* broken link: path.htm#Grammar *A* broken link: path.htm#Normalized *A* broken link: path.htm#default_name_check *A* broken link: path.htm#name_check_mechanism *A* broken link: path.htm#normalize *A* broken link: path.htm#operator_eq *A* broken link: path.htm#synopsis libs/filesystem/doc/portability_guide.htm: *A* broken link: path.htm#name_check_typedef libs/filesystem/doc/tr2_proposal.html: *A* invalid URL (hardwired file): file:///C|/boost/site/libs/filesystem/doc/operations.htm#complete_note |graph| boost/graph/maximum_cardinality_matching.hpp: *N* name exceeds 31 characters libs/graph/doc/lengauer_tarjan_dominator_tree.htm: *N* name exceeds 31 characters libs/graph/doc/sorted_erdos_renyi_generator.html: *N* name exceeds 31 characters |iostreams| libs/iostreams/doc/acknowledgments.html: *A* unlinked file libs/iostreams/doc/concepts/multi-character.html: *A* unlinked file |iterator| libs/iterator/doc/issues.html: *A* unlinked file libs/iterator/doc/iter-issue-list.html: *A* unlinked file libs/iterator/doc/ref_problem.html: *A* unlinked file |lambda| boost/lambda/core.hpp: *U* unnamed namespace at line 62 boost/lambda/detail/lambda_functors.hpp: *U* unnamed namespace at line 25 boost/lambda/exceptions.hpp: *U* unnamed namespace at line 24 |mpl| boost/mpl/alias.hpp: *U* unnamed namespace at line 17 |multi_array| boost/multi_array/base.hpp: *U* unnamed namespace at line 69 libs/multi_array/test/generative_tests.hpp: *U* unnamed namespace at line 57 |parameter| libs/parameter/doc/html/python.html: *A* broken link: tag::x(int *A* broken link: tag::y*(int |ptr_container| libs/ptr_container/doc/tutorial_example.html: *A* unlinked file |regex| libs/regex/performance/input.html: *A* unlinked file |regression| regression/.htaccess: *N* leading character of ".htaccess" is not alphabetic tools/regression/xsl_reports/xsl/html/issues_legend.html: *A* unlinked file tools/regression/xsl_reports/xsl/html/library_developer_legend.html: *A* unlinked file tools/regression/xsl_reports/xsl/html/library_user_legend.html: *A* unlinked file tools/regression/xsl_reports/xsl/html/make_tinyurl.html: *A* unlinked file tools/regression/xsl_reports/xsl/html/summary_developer_legend.html: *A* unlinked file tools/regression/xsl_reports/xsl/html/summary_user_legend.html: *A* unlinked file tools/regression/xsl_reports/xsl/v2/html/issues_legend.html: *A* unlinked file tools/regression/xsl_reports/xsl/v2/html/library_developer_legend.html: *A* unlinked file tools/regression/xsl_reports/xsl/v2/html/library_user_legend.html: *A* unlinked file tools/regression/xsl_reports/xsl/v2/html/make_tinyurl.html: *A* unlinked file tools/regression/xsl_reports/xsl/v2/html/summary_developer_legend.html: *A* unlinked file tools/regression/xsl_reports/xsl/v2/html/summary_user_legend.html: *A* unlinked file |serialization| libs/serialization/src/basic_xml_grammar.ipp: *U* unnamed namespace at line 43 |test| boost/test/floating_point_comparison.hpp: *U* unnamed namespace at line 206 *U* unnamed namespace at line 228 boost/test/impl/cpp_main.ipp: *U* unnamed namespace at line 42 boost/test/impl/exception_safety.ipp: *U* unnamed namespace at line 400 boost/test/impl/framework.ipp: *U* unnamed namespace at line 199 boost/test/impl/plain_report_formatter.ipp: *U* unnamed namespace at line 45 boost/test/impl/progress_monitor.ipp: *U* unnamed namespace at line 38 boost/test/impl/results_collector.ipp: *U* unnamed namespace at line 106 boost/test/impl/results_reporter.ipp: *U* unnamed namespace at line 48 boost/test/impl/unit_test_log.ipp: *U* unnamed namespace at line 79 boost/test/impl/unit_test_monitor.ipp: *U* unnamed namespace at line 35 boost/test/impl/unit_test_parameters.ipp: *U* unnamed namespace at line 50 boost/test/results_collector.hpp: *U* unnamed namespace at line 40 boost/test/test_tools.hpp: *U* unnamed namespace at line 255 boost/test/utils/iterator/token_iterator.hpp: *U* unnamed namespace at line 166 boost/test/utils/named_params.hpp: *U* unnamed namespace at line 216 boost/test/utils/runtime/cla/dual_name_parameter.ipp: *U* unnamed namespace at line 43 boost/test/utils/runtime/cla/modifier.hpp: *U* unnamed namespace at line 34 boost/test/utils/runtime/env/modifier.hpp: *U* unnamed namespace at line 34 boost/test/utils/runtime/file/config_file.hpp: *U* unnamed namespace at line 169 *U* unnamed namespace at line 64 *U* unnamed namespace at line 74 boost/test/utils/runtime/file/config_file_iterator.hpp: *U* unnamed namespace at line 68 boost/test/utils/trivial_singleton.hpp: *U* unnamed namespace at line 52 *U* unnamed namespace at line 61 libs/test/build/msvc71_proj/config_file_iterator_test.vcproj: *N* name exceeds 31 characters libs/test/doc/components/prg_exec_monitor/index.html: *A* broken link: ../../../../../boost/test/cpp_main.hpp libs/test/doc/components/test_tools/index.html: *A* broken link: ../../tests/boost_check_equal_str.html libs/test/doc/components/test_tools/reference/BOOST_CHECK_CLOSE.html: *A* broken link: BOOST_CHECK_CLOSE_FRACTION.html libs/test/doc/components/test_tools/reference/BOOST_CHECK_MESSAGE.html: *A* broken link: BOOST_MESSAGE.html libs/test/doc/components/test_tools/reference/BOOST_CHECK_SMALL.html: *A* broken link: BOOST_CHECK_CLOSE_FRACTION.html libs/test/doc/components/test_tools/reference/tools_list.html: *A* broken link: ../../btl1.gif *A* broken link: BOOST_CHECK_CLOSE_FRACTION.html libs/test/doc/components/utf/components/index.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/components/test_case/abstract_interface.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_case/auto_register_facility.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_case/boost_function_tc.html: *A* broken link: ../../../../../../../boost/test/unit_test_suite_ex.hpp *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_case/class_tc.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_case/function_tc.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_case/index.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_case/param_boost_function_tc.html: *A* broken link: ../../../../../../../boost/test/unit_test_suite_ex.hpp *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_case/param_class_tc.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_case/param_function_tc.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_case/tc_template.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_log/custom_log_formatter.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_log/index.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_result/index.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/components/test_suite/index.html: *A* broken link: ../../../btl1.gif libs/test/doc/components/utf/index.html: *A* broken link: getting_started/index.html libs/test/doc/components/utf/parameters/build_info.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/catch_system_errors.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/detect_memory_leaks.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/index.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/log_format.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/log_level.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/no_result_code.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/output_format.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/random.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/report_format.html: *A* broken link: ../../../../../LICENSE_1_0.txt *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/report_level.html: *A* broken link: ../../btl1.gif libs/test/doc/components/utf/parameters/show_progress.html: *A* broken link: ../../btl1.gif libs/test/doc/examples/unit_test_example1.html: *A* broken link: ../../example/unit_test_example1.cpp libs/test/doc/examples/unit_test_example2.html: *A* broken link: ../../example/unit_test_example2.cpp libs/test/doc/examples/unit_test_example3.html: *A* broken link: ../../example/unit_test_example3.cpp libs/test/doc/examples/unit_test_example4.html: *A* broken link: ../../example/unit_test_example4.cpp libs/test/doc/examples/unit_test_example5.html: *A* broken link: ../../example/unit_test_example5.cpp *A* broken link: ../../example/unit_test_example5.input libs/test/doc/tests/auto_unit_test_test.html: *A* broken link: ../../test/auto_unit_test_test.cpp libs/test/doc/tests/auto_unit_test_test_mult.html: *A* broken link: ../../test/auto_unit_test_test_mult1.cpp *A* broken link: ../../test/auto_unit_test_test_mult2.cpp libs/test/doc/tests/unit_test_suite_ex_test.html: *A* broken link: ../../test/unit_test_suite_ex_test.cpp libs/test/doc/tutorials/hello_the_testing_world.html: *A* broken link: ../../../../../LICENSE_1_0.txt *A* broken link: ../execution_monitor/index.html libs/test/doc/tutorials/new_year_resolution.html: *A* broken link: ../../../../../../LICENSE_1_0.txt |thread| libs/thread/src/mutex.inl: *U* unnamed namespace at line 7 libs/thread/src/timeconv.inl: *U* unnamed namespace at line 7 libs/thread/test/util.inl: *U* unnamed namespace at line 19 |type_traits| libs/type_traits/cxx_type_traits.htm: *A* unlinked file

Rene Rivera wrote:
Boost Inspection Report Run Date: 16:03:07 UTC, Thursday 28 September 2006
An inspection program <http://www.boost.org/tools/inspect/index.html> checks each file in the current Boost CVS for various problems, generating this as output. Problems detected include tabs in files, missing copyrights, broken URL's, and similar misdemeanors. [ ... ] 38 usages of unnamed namespaces in headers (including .ipp files) [ ... ] |thread| libs/thread/src/mutex.inl: *U* unnamed namespace at line 7 libs/thread/src/timeconv.inl: *U* unnamed namespace at line 7 libs/thread/test/util.inl: *U* unnamed namespace at line 19
I foolowed the link http://www.boost.org/tools/inspect/index.html and then "guidline violations" http://www.boost.org/more/lib_guide.htm but was not able to find the guidelines about "usage of unnamed namespaces in headers". Also the suspect files are neither *.hpp nor *.ipp. Can you please give me a hint, how I should correct this? Thank you Roland

Roland Schwarz ha escrito:
Rene Rivera wrote:
Boost Inspection Report Run Date: 16:03:07 UTC, Thursday 28 September 2006
An inspection program <http://www.boost.org/tools/inspect/index.html> checks each file in the current Boost CVS for various problems, generating this as output. Problems detected include tabs in files, missing copyrights, broken URL's, and similar misdemeanors. [ ... ] 38 usages of unnamed namespaces in headers (including .ipp files) [ ... ] |thread| libs/thread/src/mutex.inl: *U* unnamed namespace at line 7 libs/thread/src/timeconv.inl: *U* unnamed namespace at line 7 libs/thread/test/util.inl: *U* unnamed namespace at line 19
I foolowed the link http://www.boost.org/tools/inspect/index.html and then "guidline violations" http://www.boost.org/more/lib_guide.htm but was not able to find the guidelines about "usage of unnamed namespaces in headers". Also the suspect files are neither *.hpp nor *.ipp.
I'm afraid the docs are outdated. Currently, these are the inspected issues: * copyright notice is present * crlf_check.hpp" * Boost license info is included * links to other parts of Boost are correct, and there are no unlinked files * filename lengths <=31 and other file and path restrictions by ISO 9660 lev 3 format * no tabs are used * usage of min and max is macro safe * No unnamed spaces are used in headers As for the latter, the problem with unnamed spaces in headers is that they can lead to ODR violations, see for instance: http://lists.boost.org/Archives/boost/2004/06/67159.php
Can you please give me a hint, how I should correct this?
If you think your usage of unnamed spaces is actually correct, then simply have your file contain the following (possibly inside a comment): boostinspect:nounnamed to instruct the inspect tool to skip. HTH Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Joaquín Mª López Muñoz <joaquin@tid.es> writes:
libs/thread/src/mutex.inl: *U* unnamed namespace at line 7 libs/thread/src/timeconv.inl: *U* unnamed namespace at line 7 libs/thread/test/util.inl: *U* unnamed namespace at line 19
I foolowed the link http://www.boost.org/tools/inspect/index.html and then "guidline violations" http://www.boost.org/more/lib_guide.htm but was not able to find the guidelines about "usage of unnamed namespaces in headers". Also the suspect files are neither *.hpp nor *.ipp.
Another guideline that we don't check for, and maybe we never wrote down: all files containing C++ source code should have a 3-letter extension ending in "pp". This decision dates back to the earliest days of Boost, when Nico Josuttis was still a heavy player here (it was his idea, and a good one -- it makes searching through C++ source files much easier). So please, no ".inl" files. If you really must use a separate file for inline implementation, use ".ipp"
As for the latter, the problem with unnamed spaces in headers is that they can lead to ODR violations, see for instance:
http://lists.boost.org/Archives/boost/2004/06/67159.php
Can you please give me a hint, how I should correct this?
If you think your usage of unnamed spaces is actually correct, then simply have your file contain the following (possibly inside a comment):
boostinspect:nounnamed
to instruct the inspect tool to skip.
Yeah, but be really careful, because there are only a few good ways to use an unnamed namespace in a header. In fact, the only legitimate way to fix the Boost.Bind placeholder issue for header-only libs, without ODR or order-of-initialization issues, is: // placeholders.hpp template <class SomePOD> static pod_singleton { const SomePOD instance; }; template <class SomePOD> SomePOD const pod_singleton::instance = { /*optional contents*/ }; namespace { some_pod const& _1 = pod_singleton<some_pod>::instance; } That's an unnamed namespace in a header. -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams wrote:
Another guideline that we don't check for, and maybe we never wrote down: all files containing C++ source code should have a 3-letter extension ending in "pp". This decision dates back to the earliest days of Boost, when Nico Josuttis was still a heavy player here (it was his idea, and a good one -- it makes searching through C++ source files much easier).
So please, no ".inl" files. If you really must use a separate file for inline implementation, use ".ipp"
Thank you. I didn't know this.
to instruct the inspect tool to skip.
Yeah, but be really careful, because there are only a few good ways to use an unnamed namespace in a header.
To be honest, I do not have the time at the moment to study this issue in detail. (Altough I am aware of the ODR.) The inline files date back to Bill Kempfs original thread implementation. Since everything works I just thought to omit this warning. It is mainly guarding inline function definitions. I will take care of this in the thread_rewrite. I do not want to make (possibly large) changes for the 1.34. But if you think it is better to leave the warning turned on for the time beeing, I'll revert. BTW.: a "fix" like the following I think will not be caught by inspect, while still potentially being able to violate ODR. namespace { #include <boost/foo.ipp> } True? Roland

On 29/09/06, Roland Schwarz <roland.schwarz@chello.at> wrote:
BTW.: a "fix" like the following I think will not be caught by inspect, while still potentially being able to violate ODR.
namespace { #include <boost/foo.ipp> }
True?
Please don't try to trick inspect, just use 'boostinspect:nounnamed' - with a note on why you've used it. This will be clearer to readers and easier to grep. This is probably the best thing to on the RC_1_34_0 branch.

On 29/09/06, Daniel James <daniel_james@fmail.co.uk> wrote:
On 29/09/06, Roland Schwarz <roland.schwarz@chello.at> wrote:
BTW.: a "fix" like the following I think will not be caught by inspect, while still potentially being able to violate ODR.
namespace { #include <boost/foo.ipp> }
True?
Please don't try to trick inspect, just use 'boostinspect:nounnamed' - with a note on why you've used it. This will be clearer to readers and easier to grep. This is probably the best thing to on the RC_1_34_0 branch.
Oh sorry, on second thoughts I think I misinterpreted you. It doesn't really matter if inspect doesn't catch this kind of thing - it should be obvious that we shouldn't write it in the first place. But I think inspect will complain as that's present in a header. It's actually fairly easy to trick inspect - as it's regular expression based. But we assume no one is going to do that.

Roland Schwarz <roland.schwarz@chello.at> writes:
Yeah, but be really careful, because there are only a few good ways to use an unnamed namespace in a header.
To be honest, I do not have the time at the moment to study this issue in detail. (Altough I am aware of the ODR.) The inline files date back to Bill Kempfs original thread implementation.
Okay, definitely not time to change it right now.
Since everything works I just thought to omit this warning.
I think we should leave the warning intact so we know we need to "study this issue in detail."
It is mainly guarding inline function definitions.
Why would one want to do that, I wonder?
I will take care of this in the thread_rewrite. I do not want to make (possibly large) changes for the 1.34. But if you think it is better to leave the warning turned on for the time beeing, I'll revert.
If you're 100% sure you're going to rewrite the code and eliminate any problems, I don't mind the idea of turning off the warning. We should just be sure we're being honest with ourselves, and not silencing legitimate complaints.
BTW.: a "fix" like the following I think will not be caught by inspect, while still potentially being able to violate ODR.
namespace { #include <boost/foo.ipp> }
True?
I don't know; why don't you try it? -- Dave Abrahams Boost Consulting www.boost-consulting.com

"David Abrahams" <dave@boost-consulting.com> wrote
Yeah, but be really careful, because there are only a few good ways to use an unnamed namespace in a header. In fact, the only legitimate way to fix the Boost.Bind placeholder issue for header-only libs, without ODR or order-of-initialization issues, is:
// placeholders.hpp template <class SomePOD> static pod_singleton { const SomePOD instance; };
template <class SomePOD> SomePOD const pod_singleton::instance = { /*optional contents*/ };
namespace { some_pod const& _1 = pod_singleton<some_pod>::instance; }
That's an unnamed namespace in a header.
Why doesn't it have ODR issues? Isn't it still possible to cause ODR violation by using _1 inside a class/template definition in a header? Regards, Arkadiy

"Arkadiy Vertleyb" <vertleyb@hotmail.com> writes:
"David Abrahams" <dave@boost-consulting.com> wrote
Yeah, but be really careful, because there are only a few good ways to use an unnamed namespace in a header. In fact, the only legitimate way to fix the Boost.Bind placeholder issue for header-only libs, without ODR or order-of-initialization issues, is:
// placeholders.hpp template <class SomePOD> static pod_singleton { const SomePOD instance; };
template <class SomePOD> SomePOD const pod_singleton::instance = { /*optional contents*/ };
namespace { some_pod const& _1 = pod_singleton<some_pod>::instance; }
That's an unnamed namespace in a header.
Why doesn't it have ODR issues? Isn't it still possible to cause ODR violation by using _1 inside a class/template definition in a header?
Instances of _1 all refer to the same object (pod_singleton<some_pod>::instance), thus no ODR violation. See the standard ODR text if you need to be convinced. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (6)
-
Arkadiy Vertleyb
-
Daniel James
-
David Abrahams
-
Joaquín Mª López Muñoz
-
Rene Rivera
-
Roland Schwarz