Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83213 - in sandbox/contract: . doc doc/html doc/html/contract doc/html/contract__ doc/src doc/src/images doc/src/images/callouts example example/cline90 example/concepts example/contracts example/meyer97 example/mitchell02 example/mitchell02/counter example/mitchell02/observer example/n1962 example/n2081 example/named_parameters example/named_parameters/deduced_params_pydef_module example/named_parameters/named_template_params_pyclass_module example/stroustrup97 example/virtual_specifiers include include/contract include/contract/aux_ include/contract/aux_/call include/contract/aux_/call/impl_ include/contract/aux_/macro include/contract/aux_/macro/code_ include/contract/aux_/macro/code_/named_params_ include/contract/aux_/preprocessor include/contract/aux_/preprocessor/iteration include/contract/aux_/subcontract include/contract/detail include/contract/detail/preprocessor include/contract/detail/preprocessor/array include/contract/detail/preprocessor/facilities include/contract/detail/preprocessor/keyword include/contract/detail/preprocessor/keyword/contract include/contract/detail/preprocessor/keyword/cstddef include/contract/detail/preprocessor/keyword/cxx11 include/contract/detail/preprocessor/keyword/cxx11/cstddef include/contract/detail/preprocessor/keyword/facilities include/contract/detail/preprocessor/list include/contract/detail/preprocessor/punctuation include/contract/detail/preprocessor/seq include/contract/detail/preprocessor/traits include/contract/detail/preprocessor/traits/aux_ include/contract/detail/preprocessor/traits/base include/contract/detail/preprocessor/traits/class include/contract/detail/preprocessor/traits/func include/contract/detail/preprocessor/traits/func_param include/contract/detail/preprocessor/traits/oldof include/contract/detail/preprocessor/traits/params include/contract/detail/preprocessor/traits/template_param include/contract/detail/preprocessor/tuple include/contract/detail/preprocessor/variadic tools tools/boost_setup
From: lorcaminiti_at_[hidden]
Date: 2013-02-28 17:57:58


Author: lcaminiti
Date: 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
New Revision: 83213
URL: http://svn.boost.org/trac/boost/changeset/83213

Log:
Added Contract++ 0.4.1 into Boost sandbox. This code (reviewed and accepted into Boost) will serve as the base for Boost.Contract.
Added:
   sandbox/contract/
   sandbox/contract/COPYRIGHT.txt (contents, props changed)
   sandbox/contract/Jamroot (contents, props changed)
   sandbox/contract/LICENSE_1_0.txt (contents, props changed)
   sandbox/contract/README.txt (contents, props changed)
   sandbox/contract/doc/
   sandbox/contract/doc/Jamfile.v2 (contents, props changed)
   sandbox/contract/doc/acknowledgments.qbk (contents, props changed)
   sandbox/contract/doc/advanced_topics.qbk (contents, props changed)
   sandbox/contract/doc/bibliography.qbk (contents, props changed)
   sandbox/contract/doc/bjam.py (contents, props changed)
   sandbox/contract/doc/concepts.qbk (contents, props changed)
   sandbox/contract/doc/contract_programming_overview.qbk (contents, props changed)
   sandbox/contract/doc/contractpp.qbk (contents, props changed)
   sandbox/contract/doc/examples.qbk (contents, props changed)
   sandbox/contract/doc/full_table_of_contents.qbk (contents, props changed)
   sandbox/contract/doc/getting_started.qbk (contents, props changed)
   sandbox/contract/doc/grammar.qbk (contents, props changed)
   sandbox/contract/doc/html/
   sandbox/contract/doc/html/CONTRACT_BLOCK_INVARIANT.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_BLOCK_INVARIANT_TPL.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CLASS.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CLASS_INVARIANT.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CLASS_INVARIANT_TPL.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CLASS_TPL.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_ARRAY_DIMENSION_MAX.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_FUNCTION_ARITY_MAX.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_INHERITANCE_MAX.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_NO_BLOCK_INVARIANTS.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_NO_CLASS_INVARIANTS.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_NO_LOOP_VARIANTS.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_NO_POSTCONDITIONS.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_NO_PRECONDITIONS.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_OLDOF_MAX.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONFIG_THREAD_SAFE.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR_ARG.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR_BODY.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR_TPL.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_DESTRUCTOR.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_DESTRUCTOR_BODY.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_DESTRUCTOR_TPL.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_FREE_BODY.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_FUNCTION.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_FUNCTION_TPL.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_LIMIT_OLDOFS.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_LOOP.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_LOOP_VARIANT.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_LOOP_VARIANT_TPL.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_MEMBER_BODY.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_OLDOF.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_PARAMETER.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_PARAMETER_BODY.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_PARAMETER_TYPEOF.html (contents, props changed)
   sandbox/contract/doc/html/CONTRACT_TEMPLATE_PARAMETER.html (contents, props changed)
   sandbox/contract/doc/html/contract/
   sandbox/contract/doc/html/contract/block_invariant_broken.html (contents, props changed)
   sandbox/contract/doc/html/contract/broken.html (contents, props changed)
   sandbox/contract/doc/html/contract/broken_contract_handler.html (contents, props changed)
   sandbox/contract/doc/html/contract/class_invariant_b_id488563.html (contents, props changed)
   sandbox/contract/doc/html/contract/class_invariant_b_id488641.html (contents, props changed)
   sandbox/contract/doc/html/contract/class_invariant_b_id488719.html (contents, props changed)
   sandbox/contract/doc/html/contract/copy.html (contents, props changed)
   sandbox/contract/doc/html/contract/from.html (contents, props changed)
   sandbox/contract/doc/html/contract/has_oldof.html (contents, props changed)
   sandbox/contract/doc/html/contract/loop_variant_broken.html (contents, props changed)
   sandbox/contract/doc/html/contract/postcondition_broken.html (contents, props changed)
   sandbox/contract/doc/html/contract/precondition_broken.html (contents, props changed)
   sandbox/contract/doc/html/contract__/
   sandbox/contract/doc/html/contract__/acknowledgments.html (contents, props changed)
   sandbox/contract/doc/html/contract__/advanced_topics.html (contents, props changed)
   sandbox/contract/doc/html/contract__/bibliography.html (contents, props changed)
   sandbox/contract/doc/html/contract__/concepts.html (contents, props changed)
   sandbox/contract/doc/html/contract__/contract_programming_overview.html (contents, props changed)
   sandbox/contract/doc/html/contract__/examples.html (contents, props changed)
   sandbox/contract/doc/html/contract__/full_table_of_contents.html (contents, props changed)
   sandbox/contract/doc/html/contract__/getting_started.html (contents, props changed)
   sandbox/contract/doc/html/contract__/grammar.html (contents, props changed)
   sandbox/contract/doc/html/contract__/named_parameters.html (contents, props changed)
   sandbox/contract/doc/html/contract__/no_variadic_macros.html (contents, props changed)
   sandbox/contract/doc/html/contract__/release_notes.html (contents, props changed)
   sandbox/contract/doc/html/contract__/tutorial.html (contents, props changed)
   sandbox/contract/doc/html/contract__/virtual_specifiers.html (contents, props changed)
   sandbox/contract/doc/html/contractpp.pdf (contents, props changed)
   sandbox/contract/doc/html/index.html (contents, props changed)
   sandbox/contract/doc/html/reference.html (contents, props changed)
   sandbox/contract/doc/introduction.qbk (contents, props changed)
   sandbox/contract/doc/named_parameters.qbk (contents, props changed)
   sandbox/contract/doc/navbar.xsl (contents, props changed)
   sandbox/contract/doc/no_variadic_macros.qbk (contents, props changed)
   sandbox/contract/doc/release_notes.qbk (contents, props changed)
   sandbox/contract/doc/src/
   sandbox/contract/doc/src/boost.xml (contents, props changed)
   sandbox/contract/doc/src/boostbook.css (contents, props changed)
   sandbox/contract/doc/src/docutils.css (contents, props changed)
   sandbox/contract/doc/src/images/
   sandbox/contract/doc/src/images/alert.png (contents, props changed)
   sandbox/contract/doc/src/images/blank.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/
   sandbox/contract/doc/src/images/callouts/1.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/1.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/10.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/10.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/11.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/11.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/12.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/12.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/13.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/13.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/14.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/14.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/15.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/15.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/16.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/17.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/18.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/19.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/2.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/2.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/20.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/21.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/22.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/23.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/24.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/25.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/26.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/27.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/28.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/29.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/3.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/3.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/30.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/4.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/4.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/5.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/5.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/6.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/6.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/7.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/7.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/8.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/8.svg (contents, props changed)
   sandbox/contract/doc/src/images/callouts/9.png (contents, props changed)
   sandbox/contract/doc/src/images/callouts/9.svg (contents, props changed)
   sandbox/contract/doc/src/images/caution.png (contents, props changed)
   sandbox/contract/doc/src/images/caution.svg (contents, props changed)
   sandbox/contract/doc/src/images/draft.png (contents, props changed)
   sandbox/contract/doc/src/images/home.png (contents, props changed)
   sandbox/contract/doc/src/images/home.svg (contents, props changed)
   sandbox/contract/doc/src/images/important.png (contents, props changed)
   sandbox/contract/doc/src/images/important.svg (contents, props changed)
   sandbox/contract/doc/src/images/next.png (contents, props changed)
   sandbox/contract/doc/src/images/next.svg (contents, props changed)
   sandbox/contract/doc/src/images/next_disabled.png (contents, props changed)
   sandbox/contract/doc/src/images/note.png (contents, props changed)
   sandbox/contract/doc/src/images/note.svg (contents, props changed)
   sandbox/contract/doc/src/images/prev.png (contents, props changed)
   sandbox/contract/doc/src/images/prev.svg (contents, props changed)
   sandbox/contract/doc/src/images/prev_disabled.png (contents, props changed)
   sandbox/contract/doc/src/images/smiley.png (contents, props changed)
   sandbox/contract/doc/src/images/tip.png (contents, props changed)
   sandbox/contract/doc/src/images/tip.svg (contents, props changed)
   sandbox/contract/doc/src/images/toc-blank.png (contents, props changed)
   sandbox/contract/doc/src/images/toc-minus.png (contents, props changed)
   sandbox/contract/doc/src/images/toc-plus.png (contents, props changed)
   sandbox/contract/doc/src/images/up.png (contents, props changed)
   sandbox/contract/doc/src/images/up.svg (contents, props changed)
   sandbox/contract/doc/src/images/up_disabled.png (contents, props changed)
   sandbox/contract/doc/src/images/warning.png (contents, props changed)
   sandbox/contract/doc/src/images/warning.svg (contents, props changed)
   sandbox/contract/doc/src/minimal.css (contents, props changed)
   sandbox/contract/doc/src/reference.css (contents, props changed)
   sandbox/contract/doc/tutorial.qbk (contents, props changed)
   sandbox/contract/doc/virtual_specifiers.qbk (contents, props changed)
   sandbox/contract/example/
   sandbox/contract/example/Jamfile.v2 (contents, props changed)
   sandbox/contract/example/cline90/
   sandbox/contract/example/cline90/calendar.cpp (contents, props changed)
   sandbox/contract/example/cline90/stack.cpp (contents, props changed)
   sandbox/contract/example/cline90/vector.hpp (contents, props changed)
   sandbox/contract/example/cline90/vector_app.hpp (contents, props changed)
   sandbox/contract/example/cline90/vector_main.cpp (contents, props changed)
   sandbox/contract/example/cline90/vstack.cpp (contents, props changed)
   sandbox/contract/example/concepts/
   sandbox/contract/example/concepts/class_member_concept_vector.cpp (contents, props changed)
   sandbox/contract/example/concepts/class_member_concept_vector.hpp (contents, props changed)
   sandbox/contract/example/concepts/class_member_concept_vector_constructor_error.cpp (contents, props changed)
   sandbox/contract/example/concepts/class_member_concept_vector_error.cpp (contents, props changed)
   sandbox/contract/example/concepts/class_member_concept_vector_member_error.cpp (contents, props changed)
   sandbox/contract/example/concepts/concept_def.cpp (contents, props changed)
   sandbox/contract/example/concepts/concept_def_npaper.cpp (contents, props changed)
   sandbox/contract/example/concepts/free_concept_operator_preinc.cpp (contents, props changed)
   sandbox/contract/example/concepts/free_concept_operator_preinc.hpp (contents, props changed)
   sandbox/contract/example/concepts/free_concept_operator_preinc_error.cpp (contents, props changed)
   sandbox/contract/example/contracts/
   sandbox/contract/example/contracts/assertion_complexity_factorial.cpp (contents, props changed)
   sandbox/contract/example/contracts/assertion_requirements_push_back.cpp (contents, props changed)
   sandbox/contract/example/contracts/assertion_statement_ialloc.cpp (contents, props changed)
   sandbox/contract/example/contracts/blockinv_loopvar_gcd.cpp (contents, props changed)
   sandbox/contract/example/contracts/body_natural.cpp (contents, props changed)
   sandbox/contract/example/contracts/body_natural.hpp (contents, props changed)
   sandbox/contract/example/contracts/body_natural_impl.hpp (contents, props changed)
   sandbox/contract/example/contracts/broken_handler_sqrt.cpp (contents, props changed)
   sandbox/contract/example/contracts/class_ivector.cpp (contents, props changed)
   sandbox/contract/example/contracts/class_template_vector.cpp (contents, props changed)
   sandbox/contract/example/contracts/class_template_vector_seq.cpp (contents, props changed)
   sandbox/contract/example/contracts/class_template_vector_seq_nova.cpp (contents, props changed)
   sandbox/contract/example/contracts/const_assertion_number.cpp (contents, props changed)
   sandbox/contract/example/contracts/const_assertion_number_global_error.cpp (contents, props changed)
   sandbox/contract/example/contracts/const_assertion_number_static_error.cpp (contents, props changed)
   sandbox/contract/example/contracts/const_select_assertion_factorial.cpp (contents, props changed)
   sandbox/contract/example/contracts/const_select_assertion_factorial_error.cpp (contents, props changed)
   sandbox/contract/example/contracts/contract_failure.cpp (contents, props changed)
   sandbox/contract/example/contracts/copy_inc.cpp (contents, props changed)
   sandbox/contract/example/contracts/default_subcontracting_base.cpp (contents, props changed)
   sandbox/contract/example/contracts/exception_array.cpp (contents, props changed)
   sandbox/contract/example/contracts/friend_counter.cpp (contents, props changed)
   sandbox/contract/example/contracts/function_template_postinc.cpp (contents, props changed)
   sandbox/contract/example/contracts/has_oldof_inc.cpp (contents, props changed)
   sandbox/contract/example/contracts/macro_commas_symbols_integral_map.cpp (contents, props changed)
   sandbox/contract/example/contracts/macro_commas_symbols_integral_map_seq.cpp (contents, props changed)
   sandbox/contract/example/contracts/macro_commas_symbols_integral_map_seq_nova.cpp (contents, props changed)
   sandbox/contract/example/contracts/member_operator_string.cpp (contents, props changed)
   sandbox/contract/example/contracts/nested_class_bitset.cpp (contents, props changed)
   sandbox/contract/example/contracts/no_contract_ivector.cpp (contents, props changed)
   sandbox/contract/example/contracts/no_contract_postinc.cpp (contents, props changed)
   sandbox/contract/example/contracts/no_pre_post_postinc.cpp (contents, props changed)
   sandbox/contract/example/contracts/nova.hpp (contents, props changed)
   sandbox/contract/example/contracts/params_funcptr_array_apply.cpp (contents, props changed)
   sandbox/contract/example/contracts/params_postinc.cpp (contents, props changed)
   sandbox/contract/example/contracts/post_also_postinc.cpp (contents, props changed)
   sandbox/contract/example/contracts/pre_only_postinc.cpp (contents, props changed)
   sandbox/contract/example/contracts/push_back.cpp (contents, props changed)
   sandbox/contract/example/contracts/push_back_lines.cpp (contents, props changed)
   sandbox/contract/example/contracts/push_back_npaper.cpp (contents, props changed)
   sandbox/contract/example/contracts/pushable.hpp (contents, props changed)
   sandbox/contract/example/contracts/pushable_seq.hpp (contents, props changed)
   sandbox/contract/example/contracts/select_assertion_factorial.cpp (contents, props changed)
   sandbox/contract/example/contracts/static_assertion_memcopy.cpp (contents, props changed)
   sandbox/contract/example/contracts/static_contract_instance_counter.cpp (contents, props changed)
   sandbox/contract/example/contracts/subcontract_identifiers.cpp (contents, props changed)
   sandbox/contract/example/contracts/subcontract_pre_natural_failure.cpp (contents, props changed)
   sandbox/contract/example/contracts/template_params.cpp (contents, props changed)
   sandbox/contract/example/contracts/template_specializations_vector.cpp (contents, props changed)
   sandbox/contract/example/contracts/typed_counter.cpp (contents, props changed)
   sandbox/contract/example/contracts/volatile_contract_shared_instance.cpp (contents, props changed)
   sandbox/contract/example/meyer97/
   sandbox/contract/example/meyer97/gcd.cpp (contents, props changed)
   sandbox/contract/example/meyer97/gcd.e (contents, props changed)
   sandbox/contract/example/meyer97/maxarray.cpp (contents, props changed)
   sandbox/contract/example/meyer97/stack3.cpp (contents, props changed)
   sandbox/contract/example/meyer97/stack4.e (contents, props changed)
   sandbox/contract/example/meyer97/stack4.hpp (contents, props changed)
   sandbox/contract/example/meyer97/stack4_main.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/
   sandbox/contract/example/mitchell02/counter/
   sandbox/contract/example/mitchell02/counter/counter.hpp (contents, props changed)
   sandbox/contract/example/mitchell02/counter/decrement_button.hpp (contents, props changed)
   sandbox/contract/example/mitchell02/counter/push_button.hpp (contents, props changed)
   sandbox/contract/example/mitchell02/counter_main.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/courier.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/courier.hpp (contents, props changed)
   sandbox/contract/example/mitchell02/courier_main.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/customer_manager.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/customer_manager.hpp (contents, props changed)
   sandbox/contract/example/mitchell02/customer_manager_main.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/dictionary.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/name_list.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/name_list.hpp (contents, props changed)
   sandbox/contract/example/mitchell02/name_list_main.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/observer/
   sandbox/contract/example/mitchell02/observer/observer.hpp (contents, props changed)
   sandbox/contract/example/mitchell02/observer/subject.hpp (contents, props changed)
   sandbox/contract/example/mitchell02/observer_main.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/simple_queue.cpp (contents, props changed)
   sandbox/contract/example/mitchell02/stack.cpp (contents, props changed)
   sandbox/contract/example/n1962/
   sandbox/contract/example/n1962/block_invariant.cpp (contents, props changed)
   sandbox/contract/example/n1962/circle.cpp (contents, props changed)
   sandbox/contract/example/n1962/equal.hpp (contents, props changed)
   sandbox/contract/example/n1962/equal_main.cpp (contents, props changed)
   sandbox/contract/example/n1962/equal_not.hpp (contents, props changed)
   sandbox/contract/example/n1962/factorial.cpp (contents, props changed)
   sandbox/contract/example/n1962/sqrt.cpp (contents, props changed)
   sandbox/contract/example/n1962/sqrt.d (contents, props changed)
   sandbox/contract/example/n1962/sum.cpp (contents, props changed)
   sandbox/contract/example/n1962/sum.hpp (contents, props changed)
   sandbox/contract/example/n1962/sum_main.cpp (contents, props changed)
   sandbox/contract/example/n1962/vector.cpp (contents, props changed)
   sandbox/contract/example/n1962/vector.hpp (contents, props changed)
   sandbox/contract/example/n1962/vector_npaper.hpp (contents, props changed)
   sandbox/contract/example/n2081/
   sandbox/contract/example/n2081/add.cpp (contents, props changed)
   sandbox/contract/example/n2081/add.hpp (contents, props changed)
   sandbox/contract/example/n2081/add_error.cpp (contents, props changed)
   sandbox/contract/example/n2081/advance.cpp (contents, props changed)
   sandbox/contract/example/n2081/apply.cpp (contents, props changed)
   sandbox/contract/example/n2081/convert.cpp (contents, props changed)
   sandbox/contract/example/n2081/convert.hpp (contents, props changed)
   sandbox/contract/example/n2081/convert_error.cpp (contents, props changed)
   sandbox/contract/example/n2081/count.cpp (contents, props changed)
   sandbox/contract/example/n2081/deref.cpp (contents, props changed)
   sandbox/contract/example/n2081/equal.cpp (contents, props changed)
   sandbox/contract/example/n2081/equal.hpp (contents, props changed)
   sandbox/contract/example/n2081/equal_error.cpp (contents, props changed)
   sandbox/contract/example/n2081/find.cpp (contents, props changed)
   sandbox/contract/example/n2081/find.hpp (contents, props changed)
   sandbox/contract/example/n2081/find_error.cpp (contents, props changed)
   sandbox/contract/example/n2081/for_each.cpp (contents, props changed)
   sandbox/contract/example/n2081/less_eq.cpp (contents, props changed)
   sandbox/contract/example/n2081/min.cpp (contents, props changed)
   sandbox/contract/example/n2081/min.hpp (contents, props changed)
   sandbox/contract/example/n2081/min_error.cpp (contents, props changed)
   sandbox/contract/example/n2081/transform.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/
   sandbox/contract/example/named_parameters/constructor_named_params_family.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef.py (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/nob_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/nobl_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/noe_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/noei_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/noeo_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/noeoi_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/noeoibl_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/noi_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/nol_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/noo_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/deduced_params_pydef_module/nooi_named_parameters_deduced_params_pydef_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/member_named_params_callable2.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_param_identifiers_failure.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_param_identifiers_positive.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_params_dfs.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass.py (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/nob_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/nobl_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/noe_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/noei_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/noeo_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/noeoi_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/noeoibl_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/noi_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/nol_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/noo_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/named_parameters/named_template_params_pyclass_module/nooi_named_parameters_named_template_params_pyclass_module.cpp (contents, props changed)
   sandbox/contract/example/stroustrup97/
   sandbox/contract/example/stroustrup97/string.cpp (contents, props changed)
   sandbox/contract/example/stroustrup97/string.hpp (contents, props changed)
   sandbox/contract/example/stroustrup97/string_main.cpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/
   sandbox/contract/example/virtual_specifiers/final_class.cpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/final_class.hpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/final_class_error.cpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/final_member.cpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/final_member.hpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/final_member_error.cpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/new_member.cpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/new_member.hpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/new_member_error.cpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/override_member.cpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/override_member.hpp (contents, props changed)
   sandbox/contract/example/virtual_specifiers/override_member_error.cpp (contents, props changed)
   sandbox/contract/include/
   sandbox/contract/include/contract/
   sandbox/contract/include/contract.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/
   sandbox/contract/include/contract/aux_/arg_const.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/bind_old.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/
   sandbox/contract/include/contract/aux_/call/constructor_entry.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/constructor_exit.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/destructor.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/free_function.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/globals.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/impl_/
   sandbox/contract/include/contract/aux_/call/impl_/define.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/impl_/function.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/impl_/include.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/impl_/undef.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/nonstatic_member_function.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/call/static_member_function.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/concept_assert.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/config.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/constructor_inits_eval.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/constructor_try_block_guard.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/copy_result.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/debug.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/has_xxx_member_function.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/identity_equal.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/loop_variant.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/
   sandbox/contract/include/contract/aux_/macro/block_invariant.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/body.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/class.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/class_invariant.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/
   sandbox/contract/include/contract/aux_/macro/code_/assert.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/assertion_func.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/base.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/body.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/class.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/class_concept.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/class_final.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/class_invariant_const.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/class_invariant_const_volatile.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/class_invariant_static.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/const_expr.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/constructor_entry.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/exception_spec.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/final.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/func.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/loop_variant.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/name.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/named_params_/
   sandbox/contract/include/contract/aux_/macro/code_/named_params_/boost_.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/named_params_/constructor.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/named_params_/contracted.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/named_params_/function.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/named_params_class_template.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/named_params_func.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/new.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/oldof.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/oldof_type.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/override.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/postcondition.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/precondition.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/result_type.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/signature.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/subcontract.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/template.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/typename.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/code_/virtual.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/function.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/loop_variant.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/macro/parameter.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/mpl_assert.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/named_params.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/oldof.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/preprocessor/
   sandbox/contract/include/contract/aux_/preprocessor/func_kind.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/preprocessor/iteration/
   sandbox/contract/include/contract/aux_/preprocessor/iteration/arity_1.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/preprocessor/iteration/cv_member_2.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/preprocessor/iteration/params.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/result_const.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/signature_traits.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/subcontract/
   sandbox/contract/include/contract/aux_/subcontract/class_invariant.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/subcontract/from.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/subcontract/has_class_invariant.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/subcontract/oldof.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/subcontract/postcondition.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/subcontract/precondition.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/subcontract/static_class_invariant.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/symbol.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/thread_variable.hpp (contents, props changed)
   sandbox/contract/include/contract/aux_/uninitialized.hpp (contents, props changed)
   sandbox/contract/include/contract/block_invariant.hpp (contents, props changed)
   sandbox/contract/include/contract/body.hpp (contents, props changed)
   sandbox/contract/include/contract/broken.hpp (contents, props changed)
   sandbox/contract/include/contract/class.hpp (contents, props changed)
   sandbox/contract/include/contract/class_invariant.hpp (contents, props changed)
   sandbox/contract/include/contract/config.hpp (contents, props changed)
   sandbox/contract/include/contract/constructor.hpp (contents, props changed)
   sandbox/contract/include/contract/copy.hpp (contents, props changed)
   sandbox/contract/include/contract/destructor.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/
   sandbox/contract/include/contract/detail/preprocessor/
   sandbox/contract/include/contract/detail/preprocessor/array/
   sandbox/contract/include/contract/detail/preprocessor/array/first_n-generate.py (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/array/first_n.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/array/rem.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/array/rest_n-generate.py (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/array/rest_n.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/facilities/
   sandbox/contract/include/contract/detail/preprocessor/facilities/is_digit-generate.py (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/facilities/is_digit.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/
   sandbox/contract/include/contract/detail/preprocessor/keyword/and.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/and_eq.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/asm.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/auto.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/bitand.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/bitor.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/bool.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/break.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/case.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/catch.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/char.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/class.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/compl.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/const.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/const_cast.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/continue.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/contract/
   sandbox/contract/include/contract/detail/preprocessor/keyword/contract/comma.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/contract/deduce.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/contract/extends.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/contract/in.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/contract/initialize.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/contract/out.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/contract/postcondition.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/contract/precondition.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/contract/requires.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cstddef/
   sandbox/contract/include/contract/detail/preprocessor/keyword/cstddef/ptrdiff_t.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cstddef/size_t.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/char16_t.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/char32_t.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/constexpr.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/cstddef/
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/cstddef/nullptr_t.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/decltype.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/final.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/nullptr.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/override.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/cxx11/static_assert.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/default.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/delete.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/do.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/double.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/dynamic_cast.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/else.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/enum.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/explicit.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/export.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/extern.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/facilities/
   sandbox/contract/include/contract/detail/preprocessor/keyword/facilities/add.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/facilities/is.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/facilities/remove.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/false.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/float.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/for.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/friend.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/goto.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/if.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/inline.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/int.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/long.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/mutable.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/namespace.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/new.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/not.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/not_eq.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/operator.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/or.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/or_eq.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/private.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/protected.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/public.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/register.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/reinterpret_cast.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/return.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/short.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/signed.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/sizeof.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/static.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/static_cast.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/struct.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/switch.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/template.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/this.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/throw.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/true.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/try.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/typedef.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/typeid.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/typename.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/union.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/unsigned.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/using.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/virtual.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/void.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/volatile.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/wchar_t.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/while.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/xor.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/keyword/xor_eq.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/list/
   sandbox/contract/include/contract/detail/preprocessor/list/to_array.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/punctuation/
   sandbox/contract/include/contract/detail/preprocessor/punctuation/curly.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/punctuation/has_paren.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/seq/
   sandbox/contract/include/contract/detail/preprocessor/seq/to_list.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/
   sandbox/contract/include/contract/detail/preprocessor/traits/assertion.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/apply-generate.py (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/apply.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/apply_1.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/assertion.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/comma.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/keyword.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/list-generate.py (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/list.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/list_1.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/name.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/nil.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/oldof.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/select_assertion.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/select_assertion_-generate.py (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/select_assertion_1.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/select_assertion_2.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/select_assertion_3.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/select_assertion_4.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/select_assertion_5.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/aux_/type.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/base/
   sandbox/contract/include/contract/detail/preprocessor/traits/base.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/base/access.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/base/type.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/base/virtual.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/body.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/
   sandbox/contract/include/contract/detail/preprocessor/traits/class.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/access.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/bases.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/concepts.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/export.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/final.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/friend.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/kind.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/name.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/specializations.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class/template.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/class_invariant.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/const_expr.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/
   sandbox/contract/include/contract/detail/preprocessor/traits/func.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/access.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/catches-generate.py (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/catches.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/concepts.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/const.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/exceptions.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/explicit.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/export.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/extern.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/final.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/friend.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/initializers.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/inline.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/name.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/new.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/override.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/param_concepts.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/params.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/postconditions-generate.py (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/postconditions.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/preconditions.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/result_type.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/static.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/template.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/virtual.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func/volatile.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func_param/
   sandbox/contract/include/contract/detail/preprocessor/traits/func_param.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func_param/classifier.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func_param/default.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func_param/name.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/func_param/type.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/oldof/
   sandbox/contract/include/contract/detail/preprocessor/traits/oldof.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/oldof/assignment.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/oldof/expr.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/oldof/type.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/params/
   sandbox/contract/include/contract/detail/preprocessor/traits/params.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/params/group.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/params/namespace.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/params/void.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/static_assert.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/template_param/
   sandbox/contract/include/contract/detail/preprocessor/traits/template_param.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/template_param/default.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/template_param/kind.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/template_param/name.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/traits/template_param/requirement.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/tuple/
   sandbox/contract/include/contract/detail/preprocessor/tuple/split-generate.py (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/tuple/split.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/variadic/
   sandbox/contract/include/contract/detail/preprocessor/variadic/eat.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/variadic/is.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/variadic/rem.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/variadic/size.hpp (contents, props changed)
   sandbox/contract/include/contract/detail/preprocessor/variadic/to_seq.hpp (contents, props changed)
   sandbox/contract/include/contract/function.hpp (contents, props changed)
   sandbox/contract/include/contract/limits.hpp (contents, props changed)
   sandbox/contract/include/contract/loop_variant.hpp (contents, props changed)
   sandbox/contract/include/contract/oldof.hpp (contents, props changed)
   sandbox/contract/include/contract/parameter.hpp (contents, props changed)
   sandbox/contract/include/generate.py (contents, props changed)
   sandbox/contract/index.html (contents, props changed)
   sandbox/contract/logo.png (contents, props changed)
   sandbox/contract/screenshot1.png (contents, props changed)
   sandbox/contract/screenshot2.png (contents, props changed)
   sandbox/contract/screenshot3.png (contents, props changed)
   sandbox/contract/tools/
   sandbox/contract/tools/boost_setup/
   sandbox/contract/tools/boost_setup/cygwin-boost-env.sh (contents, props changed)
   sandbox/contract/tools/boost_setup/cygwin-user-config.jam (contents, props changed)
   sandbox/contract/tools/boost_setup/linux-boost-env.sh (contents, props changed)
   sandbox/contract/tools/boost_setup/linux-user-config.jam (contents, props changed)
   sandbox/contract/tools/boost_setup/windows-boost-env.bat (contents, props changed)
   sandbox/contract/tools/boost_setup/windows-user-config.jam (contents, props changed)
   sandbox/contract/tools/copyright_header.py (contents, props changed)
   sandbox/contract/tools/release_instructions.txt (contents, props changed)
   sandbox/contract/tools/sh.py (contents, props changed)

Added: sandbox/contract/COPYRIGHT.txt
==============================================================================
--- (empty file)
+++ sandbox/contract/COPYRIGHT.txt 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,5 @@
+Copyright (C) 2008-2012 Lorenzo Caminiti
+Distributed under the Boost Software License, Version 1.0
+(see accompanying file LICENSE_1_0.txt or a copy at
+http://www.boost.org/LICENSE_1_0.txt)
+Home at http://sourceforge.net/projects/contractpp

Added: sandbox/contract/Jamroot
==============================================================================
--- (empty file)
+++ sandbox/contract/Jamroot 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,26 @@
+
+# Copyright (C) 2008-2012 Lorenzo Caminiti
+# Use, modification, and distribution is subject to the
+# Boost Software License, Version 1.0 (see accompanying file
+# LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+# Documentation at http://contractpp.sourceforge.net.
+
+import os ;
+
+if ! [ os.environ BOOST_ROOT ]
+{
+ exit "Error: Set BOOST_ROOT environment variable to the Boost root directory" ;
+}
+local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;
+echo "Using Boost libraries from:" $(BOOST_ROOT) ;
+
+use-project boost : $(BOOST_ROOT) ;
+
+project
+ : requirements
+ # Add this library headers to include path.
+ <include>"./include"
+ # Add Boost library headers to include path.
+ <include>$(BOOST_ROOT)
+ ;
+

Added: sandbox/contract/LICENSE_1_0.txt
==============================================================================
--- (empty file)
+++ sandbox/contract/LICENSE_1_0.txt 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,23 @@
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.

Added: sandbox/contract/README.txt
==============================================================================
--- (empty file)
+++ sandbox/contract/README.txt 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,29 @@
+
+Contract++
+
+Contract Programming Library for C++
+
+DESCRIPTION
+
+C++ Contract Programming (a.k.a. Design by Contract or DbC).
+All Eiffel features supported: subcontracting, postcondition old and result
+values, optional contract compilation, customizable action on assertion
+failure, block invariants, loop variants, etc.
+Plus virtual specifiers, concept checking, named parameters.
+See: http://contractpp.sourceforge.net
+
+FEATURES
+
+* Support for preconditions, postconditions, class invariants, block
+ invariants, and loop variants.
+* Subcontract derived classes (with support for pure virtual functions and
+ multiple inheritance).
+* Access expression old values and function return value in postconditions.
+* Optional compilation and checking of preconditions, postconditions, class
+ invariants, block invariants, and loop variants.
+* Customizable actions on contract assertion failure (terminate by default but
+ it can throw, exit, etc).
+* Virtual specifiers.
+* Concept checking.
+* Named parameters.
+

Added: sandbox/contract/doc/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/Jamfile.v2 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,65 @@
+
+# Copyright (C) 2008-2012 Lorenzo Caminiti
+# Distributed under the Boost Software License, Version 1.0
+# (see accompanying file LICENSE_1_0.txt or a copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+# Home at http://sourceforge.net/projects/contractpp
+
+import quickbook ;
+using boostbook ;
+
+doxygen reference
+ :
+ ../include/contract/function.hpp
+ ../include/contract/constructor.hpp
+ ../include/contract/destructor.hpp
+ ../include/contract/class.hpp
+ ../include/contract/class_invariant.hpp
+ ../include/contract/body.hpp
+ ../include/contract/block_invariant.hpp
+ ../include/contract/loop_variant.hpp
+ ../include/contract/parameter.hpp
+ ../include/contract/oldof.hpp
+ ../include/contract/copy.hpp
+ ../include/contract/broken.hpp
+ ../include/contract/config.hpp
+ ../include/contract/limits.hpp
+ :
+ <reftitle>"Reference"
+ <prefix>contract # Strip path prefix.
+ <doxygen:param>PREDEFINED="DOXYGEN"
+ <doxygen:param>QUIET=YES
+ <doxygen:param>WARN_IF_UNDOCUMENTED=NO
+ <doxygen:param>HIDE_UNDOC_MEMBERS=YES
+ <doxygen:param>HIDE_UNDOC_CLASSES=YES
+ <doxygen:param>SHORT_NAMES=NO
+ <doxygen:param>ALIASES=" Params=\"<b>Parameters:</b> <table border="0">\" Param{2}=\"<tr><td><b><tt>\\1</tt></b></td><td>\\2</td></tr>\" EndParams=\"</table>\" Returns=\"<b>Returns:</b>\" Note=\"<b>Note:</b>\" Warning=\"<b>Warning:</b>\" SeeAlso=\"<b>See also:</b>\" RefSect{2}=\"\\xmlonly<link linkend='contract__.\\1'>\\2</link>\\endxmlonly\" RefClass{1}=\"\\xmlonly<computeroutput><classname alt='\\1'>\\1</classname></computeroutput>\\endxmlonly\" RefFunc{1}=\"\\xmlonly<computeroutput><functionname alt='\\1'>\\1</functionname></computeroutput>\\endxmlonly\" RefMacro{1}=\"\\xmlonly<computeroutput><macroname alt='\\1'>\\1</macroname></computeroutput>\\endxmlonly\" RefEnum{1}=\"\\xmlonly<computeroutput><enumname alt='\\1'>\\1</enumname></computeroutput>\\endxmlonly\" "
+ ;
+
+xml contractpp : contractpp.qbk
+ : <dependency>reference
+ ;
+
+boostbook bjampy : contractpp
+ : <location>html
+ <xsl:param>toc.max.depth=1
+ <xsl:param>boost.defaults=Boost
+ <xsl:param>boost.root=../../
+ <xsl:param>admon.graphics.path=../../doc/src/images/
+ <xsl:param>html.stylesheet=../../doc/src/boostbook.css
+ <format>pdf:<xsl:param>admon.graphics.extension=".svg"
+ <format>pdf:<xsl:param>img.src.path=html/
+ <format>pdf:<xsl:param>draft.more="no"
+ <format>pdf:<xsl:param>page.orientation="landscape"
+ <format>pdf:<xsl:param>paper.type="A3"
+ ;
+
+explicit bjampy contractpp reference ;
+
+echo """
+Usage: python bjam.py [bjam-options-and-targets]
+Build documentation using Bjam via Python (to customize navbar, etc).
+
+NOTE: Use `python bjam.py pdf` to update PDF documentation.
+""" ;
+

Added: sandbox/contract/doc/acknowledgments.qbk
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/acknowledgments.qbk 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,33 @@
+
+[/ Copyright (C) 2008-2012 Lorenzo Caminiti ]
+[/ Distributed under the Boost Software License, Version 1.0 ]
+[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
+[/ http://www.boost.org/LICENSE_1_0.txt) ]
+[/ Home at http://sourceforge.net/projects/contractpp ]
+
+[section Acknowledgments]
+
+This section aims to recognize the contributions of /all/ the different people that participated directly or indirectly to the design and development of this library.
+
+Sincere thanks to my parents for their support with my education and my studies in computer science.
+
+Sincere thanks to Marina for her kindness and continuous support.
+
+Many thanks to Bertrand Meyer for his pioneering and thorough work on Contract Programming in __Meyer97__.
+
+Many thanks to Thorsten Ottosen for his work with __N1962__ (and previous revisions) and for clarifying the __N1962__ requirements directly with the library authors when needed.
+
+Many thanks to Andrzej Krzemienski for reviewing earlier versions of this library providing valuable insights, for exchanging ideas on implementing assertion requirements, and for suggesting to support named parameters.
+
+Many thanks to Vicente J. Botet Escriba for reviewing earlier versions of this library providing valuable insights and for suggesting to use `contract::copy`.
+
+Thanks to Steven Watanabe for providing valuable insights on C++ and for hinting to use template meta-programming introspection to detect if a base class has a given member function (technique which turned out to be essential to fully automate subcontracting).
+
+Thanks to Dave Abrahams for providing valuable comments on the library syntax and especially on the syntax to support named parameters.
+
+Thanks to David Maley for having shared source code form his inspiring work in __Maley99__ on emulating Contract Programming in C++.
+
+Finally, many thanks to the entire __Boost__ community and [@http://lists.boost.org mailing list] for providing valuable comments about this library and great insights on the C++ programming language.
+
+[endsect]
+

Added: sandbox/contract/doc/advanced_topics.qbk
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/advanced_topics.qbk 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,835 @@
+
+[/ Copyright (C) 2008-2012 Lorenzo Caminiti ]
+[/ Distributed under the Boost Software License, Version 1.0 ]
+[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
+[/ http://www.boost.org/LICENSE_1_0.txt) ]
+[/ Home at http://sourceforge.net/projects/contractpp ]
+
+[section Advanced Topics]
+
+This section explains advanced usages of this library in programming contracts.
+See the __Grammar__ section for a complete guide on this library syntax.
+
+[section Commas and Leading Symbols in Macros]
+
+C++ macros cannot correctly parse a macro parameter if it contains a comma `,` that is not wrapped within round parenthesis `()` (because the preprocessor interprets such a comma as separation between two distinct macro parameters instead that as part of one single macro parameter, see also __Boost_Utility_IdentityType__).
+Furthermore, syntactic elements specified to this library macros cannot start with a non-alphanumeric symbol (`-1`, `1.23`, `"abc"`, `::`, etc).
+[footnote
+Note that for the preprocessor a number with decimal period `1.23`, `0.12`, `.34` is considered a symbol (because its concatenation will not result in a valid macro identifier).
+]
+For example, the parameter type `::std::pair<OtherKey, OtherT> const&` cannot be passed to this library for two reasons: It starts with the non-alphanumeric symbol `::` and it contains the comma `OtherKey, OtherT` which is not wrapped by round parenthesis.
+
+The __Boost_Utility_IdentityType__ macro `BOOST_IDENTITY_TYPE` can be used as usual to overcome this issue.
+However, using the `BOOST_IDENTITY_TYPE` macro presents two limitations: It makes the syntax of this library macros more cumbersome and, more importantly, it does not allow C++ to automatically deduce function template parameters (see __Boost_Utility_IdentityType__ for more information).
+Therefore, the syntax of this library provides an alternative to `BOOST_IDENTITY_TYPE` to handle commas and leading symbols within macro parameters:
+
+# Commas and leading symbols can be used freely within elements of the syntax that already require wrapping parenthesis (e.g., non-fundamental parameter types `(::std::pair<OtherKey, OtherT> const&)`).
+# Extra parenthesis can always be used to wrap elements of the syntax that might contain commas and leading symbols (e.g, the base class type `public (::sizeable<Key, T>)`).
+# Extra parenthesis can always be used to wrap value expressions so they can contain commas and leading symbols (e.g., a class invariants assertion `(::sizeable<Key, T>::max_size >= size())`).
+
+For example (see also [file example/contracts macro_commas_symbols_integral_map.cpp]):
+
+[import ../example/contracts/macro_commas_symbols_integral_map.cpp]
+[macro_commas_symbols_integral_map]
+
+(Concepts and other advanced constructs used in this example are explained in the rest of this section and in later sections of this documentation.)
+
+All these extra wrapping parenthesis are optional when there is no unwrapped comma and no leading symbol.
+Programmers could chose to always program the extra parenthesis for consistency but it is the authors' opinion that the syntax is harder to read with the extra parenthesis so it is recommended to use them only when strictly necessary.
+
+It is also recommended to avoid using commas and leading symbols whenever possible so to limit the cases when it is necessary to use the extra wrapping parenthesis.
+For example, in many cases the leading symbol `::` might not be necessary and leading symbols like `!` can be replaced by the alternative keywords like `not`.
+Furthermore, in some cases `typedef` can be programmed just before class and function declarations to avoid passing types within multiple template parameters separated by commas.
+Declarations of class templates and function templates are the most common cases were commas cannot be avoided and extra wrapping parenthesis are necessarily used.
+
+[warning
+Preconditions, postconditions, and class invariants composed of one single assertion that needs to be wrapped within extra parenthesis need to use double parenthesis (this should be a relatively rare case).
+[footnote
+*Rationale.*
+This limitation is introduced by the need to support also the sequence syntax for preprocessor without variadic macros (see the __No_Variadic_Macros__ section).
+]
+This is the case in the above example for `precondition( ((!full())) )` (but note that these extra parenthesis could have been avoided all together simply using `not` instead of `!` as in the more readable `precondition( not full() )`).
+]
+
+[endsect]
+
+[section Static Assertions]
+
+This library allows to use [@http://en.wikipedia.org/wiki/C%2B%2B11#Static_assertions /static assertions/] to program preconditions, postconditions, class invariants, and block invariants so that they are checked at compile-time instead of at run-time.
+The __CXX11__ syntax is used (but __Boost_MPL__ `BOOST_MPL_ASSERT_MSG` is used to implement static assertions so no __CXX11__ feature is required):
+
+ static_assert(``/constant-boolean-condition/``, ``/constant-string-literal/``)
+
+For example (see also [file example/contracts static_assertion_memcopy.cpp]):
+
+[import ../example/contracts/static_assertion_memcopy.cpp]
+[static_assertion_memcopy]
+
+Static assertions are always checked at compile-time (regardless of them appearing in preconditions, postconditions, etc).
+However, static assertions can be selectively disabled depending on where they are specified using [macroref CONTRACT_CONFIG_NO_PRECONDITIONS], [macroref CONTRACT_CONFIG_NO_POSTCONDITIONS], etc so it is still important to logically associate them with preconditions, postconditions, etc.
+
+The string message passed as the second parameter of `static_assert` is ignored by the current implementation of this library (but it could be used by future revisions of this library that take advantage of __CXX11__ features).
+It is recommended to always specify meaningful messages for static assertions to increase the readability and documentation of contracts.
+Similarly, it might be useful to put a short code comment following each assertions (`// pointer not null`, etc) to increase contract readability and documentation.
+[footnote
+*Rationale.*
+__Eiffel__ supports /assertion labeling/ to further document assertions.
+However, when designing this library for C++, the authors judged that it is sufficient to add a short code comment after each assertion to achieve a similar effect.
+]
+
+In case of a static assertion failure, this library will generated a compile-time error containing text similar to the following:
+
+[pre
+static_assertion_memcopy.cpp:18 ... ERROR_statically_checked_precondition_number_1_failed_at_line_18 ...
+]
+
+This message is similar to the run-time assertion errors generated by this library, note how it contains all the information to uniquely identify the assertion that failed.
+
+[endsect]
+
+[section Constant Assertions]
+
+As explained in the __Constant_Correctness__ section, contract assertions shall not change the state of the program because contracts are only supposed to check (and not to alter) the state of the program.
+This library automatically makes member functions, function parameters, function result, and old values constant so the compiler will correctly generate an error if assertions mistakenly try to change the object, the function parameters, the function result, or the old values (this should be sufficient in most cases when programming contracts).
+
+[important
+This library cannot automatically make constant other variables that might be accessible by the contract assertions (e.g., global and static variables).
+[footnote
+*Rationale.*
+The library needs to know at least the variable name in order to make it constant.
+There is no way for this library to know the name of a global variable that is implicitly accessible from the contract assertion scope so such a variable cannot be automatically made constant.
+Non-static data members are automatically made constant by making constant the member function that checks the contract, but that does not apply to static data members.
+Not even __CXX11__ lambda implicit captures could be used in this context because they make variables constant only when captured by value and that introduces a __CopyConstructible__ requirement of the captured variable types.
+]
+]
+
+This library provides /constant assertions/ that can be used by programmers to explicitly make constant the variables used by the asserted boolean expression:
+
+ const( ``/variable1/``, ``/variable2/``, ...) ``/boolean-expression-using-variable1-variable2-.../``
+
+The following example calculates the next even and odd numbers that are stored (for some reason) in a global variable and static data member respectively (see also [file example/contracts const_assertion_number.cpp]):
+
+[import ../example/contracts/const_assertion_number.cpp]
+[const_assertion_number]
+
+Note know the postconditions use constant assertions to force the `even` and `odd` variables to be constant within each boolean expression that evaluates the assertion.
+If for example the assignment operator `=` were mistakenly used instead of the equality operator `==` in the above postconditions, the compiler would correctly generate an error.
+
+[endsect]
+
+[section Select Assertions]
+
+In the __Tutorial__ section we have used the ternary operator `:?` to program assertions that are guarded by a boolean condition:
+
+ old_found ? true : std::find(begin(), end(), id) != end(),
+ old_found ? true : size() == old_size + 1
+
+However, in cases like this one when the same boolean condition guards multiple assertions, it might be more efficient to evaluate the guard condition only once using one /select assertion/ instead of multiple ternary operators `:?`.
+In addition, some programmers might find the select assertion syntax more readable than the ternary operator `:?`.
+For example, the above guarded assertions could have been programmed using select assertions as:
+
+ if(not old_found) ( // Guard condition evaluated only once.
+ std::find(begin(), end(), id) != end(),
+ size() == old_size + 1
+ )
+
+Select assertion allow to specify an optional else-block:
+
+ if(``/boolean-condition/``) ( // Round parenthesis `()`.
+ ... // Comma-separated assertions.
+ ) else ( // Else optional as usual.
+ ... // Comma-separated assertions.
+ )
+
+Note that round parenthesis `( ... )` are used to program the then-block and else-block instead of the usual C++ curly parenthesis `{ ... }`:
+Select assertions can be nested into one another (the [macroref CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS] macro specifies the maximum nesting level for select assertions).
+
+For example, consider the postconditions of the following function which calculates the factorial of a natural number (see also [file example/contracts select_assertion_factorial.cpp]):
+
+[import ../example/contracts/select_assertion_factorial.cpp]
+[select_assertion_factorial]
+
+Using the same syntax used for constant assertions, it is possible to force all variables (global, static, etc) used to evaluate the if-condition of the select assertion to be constant (see also [file example/contracts const_select_assertion_factorial.cpp]):
+
+[import ../example/contracts/const_select_assertion_factorial.cpp]
+[const_select_assertion_factorial]
+
+[endsect]
+
+[section Assertion Statements]
+
+Only assertions can be programmed within the contracts while normal C++ statements are not allowed.
+This is keeps contracts simple making programming errors within the contracts less likely and therefore increasing the probably that error-free contracts can properly check the correctness of the implementation.
+
+However, `using` directives, `namespace` aliases, and `typedef` statements are allowed within the contracts because they only affect compilation (not altering the state of the program at run-time) and they can be used to write more readable contracts (for example, shortening namespaces within contract assertions).
+When used, these statements have effect only locally within the preconditions, postconditions, class invariants, etc where they appear.
+[footnote
+Assertion statements might be especially useful because contracts appear with the class and function declarations usually in header files where `using` directives and `namespace` aliases should only be used with extreme care and, for example, at local scope as assertion statements allow to do.
+]
+
+For example (see also [file example/contracts assertion_statement_ialloc.cpp]):
+
+[import ../example/contracts/assertion_statement_ialloc.cpp]
+[assertion_statement_ialloc]
+
+These statements follow their usual C++ syntax but they are terminated with a comma `,` instead of a semicolon `;`.
+(The `BOOST_IDENTITY_TYPE` macro can be used to wrap eventual commas within the `typedef` statement.)
+
+[endsect]
+
+[section Assertion Requirements]
+
+In general, programming contract assertions can introduce a new set of requirements on the types used by the program.
+Some of these type requirements might be necessary only to program the assertions and they might not be required by the implementation itself.
+In such cases, if the code is compiled with contracts disabled ([macroref CONTRACT_CONFIG_NO_PRECONDITIONS], etc), the program might compile but it might no longer compile when contracts are enabled because some of the types do not provide all the operations necessary to check the contract assertions.
+
+# More in general, in some cases it might be acceptable or even desirable to cause a compile-time error when a program uses types that do not provide all the operations needed to check the contracts (because it is not possible to fully check the correctness of the program).
+In these cases, programmers specify contract assertions as we have seen so far (and maybe even use concepts to explicitly specify the contract type requirements, see the __Concepts__ section).
+# However, in other cases it might be desirable that adding contracts to a program does not change its type requirements and that assertions are simply not checked when the types do not provide all the operations necessary to evaluate the asserted conditions.
+In these cases, programmers can use /assertion requirements/ to disable compilation and run-time checking of specific assertions:
+[footnote
+*Rationale.*
+The assertion requirement syntax takes a constant boolean expression instead of a nullary boolean meta-function because the authors have found no reason to use a meta-function in this context.
+Furthermore, constant boolean expressions can be manipulated via the usual operators `not`, `and`, etc, therefore more naturally than boolean meta-functions which need to use `boost::mpl::not_`, `boost::mpl::and_`, etc instead.
+]
+
+ ``/assertion/``, requires ``/constant-boolean-expression/``
+
+(The constant boolean expression of an assertion requirement can be wrapped within round parenthesis `()` if it contains unwrapped commas.)
+
+Let's consider the STL `std::vector<T>` class template.
+This template normally does not require the value type `T` to be __EqualityComparable__ (i.e., to have an equality operator `==`), it only requires `T` to be __CopyConstructible__ (i.e., to have a copy constructor).
+However, in order to check the following `std::vector<T>::push_back` postcondition the type `T` must to be __EqualityComparable__:
+
+ back() == value // Compiler error if not `EqualityComparable<T>`.
+
+Therefore, the __EqualityComparable__ requirement on `T` is introduced only by the contract assertions and it is not required by the `std::vector<T>` implementation.
+
+In some cases, programmers might want compilation to fail when `T` is not __EqualityComparable__ because in these cases it is not possible to fully check the `std::vector<T>` contracts and therefore its correctness (in these cases programmers do not specify assertion requirements and let the compilation fail, or even better programmers can explicitly specify the assertion type requirements using concepts which will also fail compilation but hopefully with more informative error messages, see the __Concepts__ section).
+
+However, in other cases programmers might want to use the contracted version of `std::vector<T>` exactly as they use the non-contracted version of the template and therefore without failing compilation if `T` is not __EqualityComparable__.
+This can be achieved specifying assertion requirements for the `std::vector<T>::push_back` postcondition:
+
+ back() == value, requires boost::has_equal_to<T>::value // No error if not `EqualityComparable<T>`.
+
+This postcondition will be checked only when `T` is __EqualityComparable__, otherwise the postcondition will be ignored causing no compilation error.
+
+For example (see also [file example/contracts assertion_requirements_push_back.cpp]):
+[footnote
+Future revisions of this library might provide wrappers that program contracts for the STL in appropriate header files =contract/std/vector.hpp=, =contract/std/algorithm.hpp=, etc (see also [@http://www.sgi.com/tech/stl/ SGI STL] and [@http://sourceforge.net/apps/trac/contractpp/ticket/47 Ticket 47]).
+However, given that STL implementations are usually considered to be ["correct], it is not clear if STL class invariants and postconditions would add any value, maybe programmers would only find STL preconditions useful.
+]
+
+[import ../example/contracts/assertion_requirements_push_back.cpp]
+[assertion_requirements_push_back]
+[assertion_requirements_push_back_call]
+
+The `i.push_back(123)` call will check the postcondition `back() == value` because `int` is __EqualityComparable__ and the assertion requirement `boost::has_equal_to<int>::value` is true.
+However, the `n.push_back(num(123))` call will not check, and in fact not even compile, the postconditions `back() == value` because `num` is not __EqualityComparable__ and the assertion requirement `boost::has_equal_to<num>::value` is false.
+[footnote
+Assertion requirements where first introduced by this library and they are not supported by __N1962__, __D__, or __Eiffel__ (even if they all allow to write contracts for templates).
+Based on the authors' experience, assertion requirements are necessary for a language that make extensive use of templates like C++.
+Furthermore, C++ does not automatically define equality operators `==` while it automatically defines copy constructors and that makes the use of the assertion requirements for __EqualityComparable__ a rather common practise (in __Eiffel__ instead types can be both copied and compared for equality by default).
+It has been argued that it is not possible to check a program for correctness if types that are copyable cannot also be compared for equality and the authors experience with programming contracts confirms such an argument.
+]
+
+The __Boost_TypeTraits__ library provides a set of meta-functions that are very useful to program assertion requirements.
+[footnote
+As of __Boost__ 1.50, `boost::has_equal_to` and similar traits always return true for an STL container even if the value type of the container does not have an operator `==`.
+This is arguably a defect of the STL that always defines an operator `==` for its containers even when a container template is instantiated with a value type that has no operator `==`, in which case the container operator `==` will produce a compiler error (the STL should instead use __SFINAE__ to disable the declaration of the container operator `==` when the value type has no operator `==`).
+Future versions of __Boost_TypeTraits__ will probably specialize `boost::has_equal_to` and similar traits to work around this behaviour of the STL.
+In the meanwhile, programmers can specialize these traits themselves if needed:
+``
+// Header: std_has_equal_to.hpp
+#include <boost/type_traits/has_equal_to.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/mpl/and.hpp>
+#include <vector>
+
+// STL defines `operator==` only between two identical containers (same value
+// type, allocator, etc) and returning a type convertible to `bool`.
+
+namespace boost {
+
+// Specializations for `std::vector`.
+
+template< typename T, class Alloc >
+struct has_equal_to < std::vector<T, Alloc>, std::vector<T, Alloc> > :
+ has_equal_to<T, T, bool>
+{};
+
+template< typename T, class Alloc, typename Ret >
+struct has_equal_to < std::vector<T, Alloc>, std::vector<T, Alloc>, Ret > :
+ mpl::and_<
+ has_equal_to<T, T, bool>
+ , is_convertible<Ret, bool>
+ >
+{};
+
+// ... specialize `has_equal_to` for more STL containers.
+
+} // namespace
+``
+]
+However, C++ does not allow to inspect every trait of a type so there might be some assertion requirements that unfortunately cannot be programmed within the language.
+
+Another interesting use of assertion requirements is to model assertion computational complexity.
+In some cases, checking assertions can be as computationally expensive as executing the function body or even more.
+While preconditions, postconditions, etc can be disabled in groups at compile-time to improve performance (using [macroref CONTRACT_CONFIG_NO_PRECONDITIONS], [macroref CONTRACT_CONFIG_NO_POSTCONDITIONS], etc), it is also useful to be able to disable only specific assertions that are very computationally expensive while keeping all other preconditions, postconditions, etc enabled.
+For example (see also [file example/contracts assertion_complexity_factorial.cpp]):
+
+[import ../example/contracts/assertion_complexity_factorial.cpp]
+[assertion_complexity_factorial]
+
+In this case the postcondition `result = n * factorial(n - 1)` has factorial computational complexity and it is compiled and checked at run-time only if the macro `COMPLEXITY_MAX` is defined to be `O_FACTN` or greater.
+Similarly, macros like `O_SMALLER_BODY`, `O_BODY`, and `O_GREATER_BODY` could have been defined to express computational complexity in relative terms with respect to the body computational complexity (see the __Examples__ section).
+[footnote
+__N1866__, an earlier version of __N1962__, introduced the notion of /importance ordering/ that could be used to selectively disable assertions that where too expensive computationally.
+Importance ordering was then dropped by __N1962__.
+Among other things, assertion requirements can be used to achieve the importance ordering functionality.
+]
+
+Assertion requirements can be used with assertions, constant assertions, and static assertions but they cannot be used with assertion statements and with the if-condition of select assertions (however, if select assertions are programmed using the ternary operator `:?` then assertion requirements will disable the entire ternary operator `:?` expression including its if-condition).
+
+[endsect]
+
+[section Old-Of Requirements]
+
+Assertion requirements can be specified also for postconditions that use old values.
+However, old values have the additional requirement that the type of the expression passed to the [macroref CONTRACT_OLDOF] macro must be __ConstantCopyConstructible__.
+If such a requirement is not met:
+
+# Either, programmers want the compiler to error because the postconditions using the old value cannot be evaluated (in which case programmers will not specify assertion requirements and they might explicitly specify type requirements using concepts so to get more informative error messages, see the __Concepts__ section).
+# Or, programmers want the old value declaration that uses the [macroref CONTRACT_OLDOF] macro to have no effect (because the old value cannot be copied) and the postconditions using such an old value to not be evaluated.
+
+Unfortunately, C++ cannot automatically detect if a type has a copy constructor therefore a special trait [classref contract::has_oldof] has to be introduced to support this second case.
+The `contract::has_oldof<T>` trait is a unary boolean meta-function which is `boost::mpl::true_` by default for any type `T` and it must be specialized by programmers for types which old values cannot be copied.
+
+For example, consider the following increment function (see also [file example/contracts has_oldof_inc.cpp]):
+
+[import ../example/contracts/has_oldof_inc.cpp]
+[has_oldof_inc]
+[has_oldof_inc_call]
+
+In this example, the `num` type is non-copyable so the `contract::has_oldof<num>` specialization inherits from `boost::mpl::false_`.
+As a consequence, the call `inc(n, m)` will automatically skip the old value declaration:
+
+ auto old_value = CONTRACT_OLDOF value
+
+The following postcondition will also be skipped because its assertion requirement lists `contract::has_oldof<T>` (where `T` is indeed the type of `value` passed to the [macroref CONTRACT_OLDOF] macro):
+
+ value == old_value + offset, requires contract::has_oldof<T>::value and ...
+
+Note how this postcondition actually requires the type `T` to have an old value, a plus operator `+`, and an equality operator `==` thus all of these requirements are programmed in the assertion requirements.
+
+Finally, return value declarations are never skipped so there is no `has_result` trait.
+[footnote
+*Rationale.*
+The result type needs to be copyable in order for the function itself to return a value so this library can always evaluate return value declarations.
+]
+
+[endsect]
+
+[section Old and Result Value Copies]
+
+This library uses the class template [classref contract::copy] to copy old values and the result value for postconditions.
+
+ namespace contract
+ {
+ template< typename T >
+ class copy
+ {
+ public: copy ( T const& object ) ;
+ public: T const& value ( void ) const ;
+ };
+ } // namespace
+
+The default implementation of the [classref contract::copy] class template requires that the type of the old value expression passed to the [macroref CONTRACT_OLDOF] macro and the result type are __ConstantCopyConstructible__ (i.e., these types provide a copy constructor that copies the object from a constant reference, the reference has to be constant so to ensure the constant-correctness of the copy operations that are executed within the contracts, see also the __Constant_Correctness__ section):
+
+ // `ConstantCopyConstructible<T>` (which implies `CopyConstructible<T>`):
+ T::T ( T const& source ) ; // OK: constant-correct copy constructor.
+
+ // `CopyConstructible<T>` (but not `ConstantCopyConstructible<T>`):
+ T::T ( T& source ) ; // Error, copy constructor is not constant-correct.
+
+Programmers can specialize the [classref contract::copy] class template to allow old value and result value copies even for types that are not __ConstantCopyConstructible__ (in this case it is the programmers' responsibility to make sure that the copy operations that they define are constant-correct, otherwise the contracts will no longer be constant-correct).
+[footnote
+Currently, it is not possible to force constant-correctness of the expression passed to the [macroref CONTRACT_OLDOF] macro.
+Future revisions of this library will support `CONTRACT_OLDOF const( ... ) ...` to allow to make constant all variables (including global, static, etc) used by old value expressions (see also [@http://sourceforge.net/apps/trac/contractpp/ticket/52 Ticket 52]).
+]
+
+In the following example the old and result value declarations use the specialization `contract::copy<num>` so it is possible to access the old and result value of variables of type `num` even if `num` is non-copyable (see also [file example/contracts copy_inc.cpp]):
+
+[import ../example/contracts/copy_inc.cpp]
+[copy_inc]
+[copy_inc_call]
+
+Both calls `inc(i, j)` and `inc(n, m)` check all postconditions.
+The first call copies the old and result values using `int`'s default copy constructor, the second call copies the old and result values using the copy operation implemented by the `contract::copy<num>` specialization.
+
+[endsect]
+
+[section Pure Virtual Functions]
+
+It is possible to program contracts for pure virtual functions.
+Pure virtual functions are specified with the usual `= 0;` symbol replacing the function definition just after the contract macros, for example (see also [file example/contracts pushable.hpp]):
+
+[import ../example/contracts/pushable.hpp]
+[pushable]
+
+Furthermore, using the [macroref CONTRACT_MEMBER_BODY] macro, a derived class can be programmed without using the [macroref CONTRACT_CLASS] and [macroref CONTRACT_FUNCTION] macros even when the base class has pure virtual functions (see also [file example/contracts default_subcontracting_base.cpp]):
+
+[import ../example/contracts/default_subcontracting_base.cpp]
+[default_subcontracting_base]
+
+This use of the [macroref CONTRACT_MEMBER_BODY] macro does not force programmers of derived classes to use the library macros [macroref CONTRACT_CLASS] and [macroref CONTRACT_FUNCTION] which would otherwise introduce the unusual library syntax in the derived class declaration.
+However, in this case the derived class is forced to inherit the base class invariants, preconditions, and postconditions exactly as they are without the possibility to truly subcontract the base class (which is instead possible when the [macroref CONTRACT_CLASS] and [macroref CONTRACT_FUNCTION] macros are used in declaring the derived class).
+[footnote
+*Rationale.*
+Older revisions of this library defined the macro `CONTRACT_MEMBER_BODY(class_type, function_name)` taking two parameters so this macro could not be used in declaring derived classes and the [macroref CONTRACT_CLASS] and [macroref CONTRACT_FUNCTION] macros where required when programming a class inheriting from a base class with contracts.
+However, the authors prefer to leave the choice of programming full contracts for derived classes to the derived class programmers because of the unusual declaration syntax introduced by this library might not be necessary when derived classes do not need to alter the base's class contract.
+]
+Correctly, the derived class can never avoid checking the base class contracts neither when declared using the [macroref CONTRACT_CLASS] and [macroref CONTRACT_FUNCTION] macros, nor when declared using the [macroref CONTRACT_MEMBER_BODY] macro.
+
+[endsect]
+
+[section Subcontracting Preconditions]
+
+While subcontracting is theoretically sound and justified by the __substitution_principle__, in practise subcontracted preconditions might be confusing for programmers because of the implications of evaluating overriding preconditions in __logic_or__ with overridden preconditions (this is not the case for subcontracted postconditions and class invariants which usually behave as programmers expect because they are evaluated in __logic_and__).
+
+For example, consider the following base class `integer` which holds an integral value and its derived class `natural` which holds a natural (i.e., non-negative integer) value (see also [file example/contracts subcontract_pre_natural_failure.cpp]):
+
+[import ../example/contracts/subcontract_pre_natural_failure.cpp]
+[subcontract_pre_natural_failure]
+
+From reading the contracts we conclude that:
+
+* `integer::get` returns the latest value set (as specified by `integer::set` postconditions).
+* There is no constraint on the integer value that is passed to `integer::set` (because `integer::set` has no precondition).
+* `natural::get` always returns a non-negative value (as specified by the `natural` class invariants).
+* Only non-negative values can be passed to `natural::set` (as specified by `natural::set` preconditions).
+
+This last conclusion is incorrect!
+Negative values can be passed to `natural::set` because they can be passed to its base virtual function `integral::set` (preconditions cannot only be weakened).
+The complete set of `natural::set` preconditions is given by its base virtual function `integer::set` preconditions (which are always `true` because they are not specified) evaluated in __logic_or__ with the preconditions explicitly specified by `natural::set` (i.e., `value >= 0`):
+
+ (true) or (value >= 0)
+
+Obviously, this always evaluates to `true` regardless of `value` being non-negative.
+This is correct in accordance with the __substitution_principle__ for which `natural::set` can be called in any context where `integer::set` is called because `natural` inherits from `integer`.
+Given that `integer::set` can be called regardless of `value` being non-negative (because it has no precondition) there is no precondition that we can later specify for `natural::set` that will change that and in fact `natural::set` can also be called with negative values without failing its subcontracted preconditions.
+For example, the call:
+
+[subcontract_pre_natural_failure_call]
+
+Fails the class invariants checked while exiting `natural::set`:
+
+[pre
+class invariant (on exit) number 1 "get() >= 0" failed: file "natural_subcontractpre.cpp", line 30
+]
+
+Ideally, this call would have failed much earlier at `natural::set` preconditions (in fact, the `natural::set` body is executed with the logically invalid negative value `-123` which could in general lead to catastrophic errors and mysterious bugs).
+
+The issue here is in the design.
+A natural number is not an integer number because while it is valid to use an integer number in a context where it is assigned to a negative number, it is not valid to use a natural number in such a context so a natural number should not inherit from an integer number.
+Inheritance models the [@http://en.wikipedia.org/wiki/Is-a /is-a/] relationship which should not be used in this case as the contracts and the __substitution_principle__ are telling us.
+
+[note
+Note that if a virtual member function has no preconditions, it means that it is always valid to call it, and (in accordance with the __substitution_principle__) this semantic cannot be changed by the contracts of any overriding function no matter what preconditions we specify for it.
+Similarly, if an overriding member function has no preconditions, it means that is is always valid to call it regardless of possible preconditions specified by any function that it overrides.
+]
+
+An overriding function can specify `precondition( false )` if it wants to keep the same preconditions of the functions that is overriding.
+A pure virtual function can specify `precondition( false )` to indicate that overriding functions will specify preconditions (this only makes sense for pure virtual functions because a function with `precondition( false )` can never be called successfully unless it is overridden and its preconditions are weakened, that might be acceptable for pure virtual because they must always be overridden).
+
+If programmers find subcontracted preconditions confusing, this library allows to forbid them by defining the configuration macro [macroref CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS].
+When this macro is defined, the library will generate a compile-time error if a derived class tries to override preconditions of member functions of any of its base classes (this is also the subcontracting behaviour specified by __N1962__).
+However, note that in case of multiple-inheritance preconditions from the overridden function from all bases classes will always be checked in __logic_or__ with each other so preconditions from a base class could still be weaken by the preconditions of another base class even when the [macroref CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS] macro is defined.
+By default the [macroref CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS] macro is not defined and this library allows to override preconditions (as specified by for __Eiffel__ by __Meyer97__ and in accordance with the __substitution_principle__).
+
+Another difference between subcontracted preconditions and subcontracted postconditions or class invariants is that subcontracted preconditions will always report a failure of the overridden preconditions.
+For example, consider a set of base classes [^b['N]] and a derived class `d`:
+
+ CONTRACT_CLASS(
+ struct (a)
+ ) {
+ ... // No member function `f`.
+ };
+
+ CONTRACT_CLASS(
+ struct (b``/N/``)
+ ) {
+ CONTRACT_CLASS_INVARIANT( ... )
+
+ CONTRACT_FUNCTION(
+ public virtual void (f) ( void ) // Overridden function.
+ precondition( ... )
+ postcondition( ... )
+ ) {}
+
+ ...
+ };
+
+ CONTRACT_CLASS(
+ struct (c)
+ ) {
+ ... // No member function `f`.
+ };
+
+ CONTRACT_CLASS(
+ struct (d) extends( b1, a, b2, c, b3 )
+ ) {
+ CONTRACT_CLASS_INVARIANT( ... )
+
+ CONTRACT_FUNCTION(
+ public virtual void (f) ( void ) // Overriding function.
+ precondition( ... )
+ postcondition( ... )
+ ) {}
+
+ ...
+ };
+
+When `d::f` is called, its subcontracted class invariants, postconditions, and preconditions are evaluated using the following expressions (the base classes `a` and `c` do not declare a virtual function `f` so they are automatically excluded from `d::f` subcontracting):
+
+ b1::``/class-invariants/`` and b2::``/class-invariants/`` and b3::``/class-invariants/`` and d::``/class-invariants/`` // `d::f` subcontracted class invariants.
+ b1::f::``/postconditions/`` and b2::f::``/postconditions/`` and b3::f::``/postconditions/`` and d::f::``/postconditions/`` // `d::f` subcontracted postconditions.
+ b1::f::``/preconditions/`` or b2::f::``/preconditions/`` or b3::f::``/preconditions/`` or d::f::``/preconditions/`` // `d::f` subcontracted preconditions.
+
+When subcontracted class invariants or subcontracted postconditions fail, this library reports the first failed condition which can in general be in the base class contracts because they are checked first in the __logic_and__ chain (this can report a failure from any subcontracted class invariants [^b['N]::/class-invariants/] or [^d::/class-invariants/], and subcontracted postconditions [^b['N]::f::/postconditions/] or [^d::f::/postconditions/]).
+However, when subcontracted preconditions fail it means that all overridden preconditions as well as the overriding preconditions have failed (because subcontracted preconditions are evaluated in __logic_or__).
+In this case, this library will report the last evaluated failure which will always be in the overriding preconditions (always report a failure from [^d::f::/preconditions/]).
+If programmers want instead the library to report the failure from the first overridden precondition that failed, they can define the configuration macro [macroref CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE] (always report a failure from [^b1::f::/preconditions/]).
+
+[endsect]
+
+[section Static Member Functions]
+
+It is possible to program contracts for static member functions.
+Static member functions cannot access the object therefore their preconditions and postconditions also cannot access the object and they can only access other static members.
+This library allows to specify a subset of class invariants called /static class invariants/ which do not access the object and that are checked at entry and exit of every constructor, destructor, and member functions even if static.
+(Non-static class invariants are instead not checked at constructor entry, at destructor exit, and at entry and exit of static member functions because they require accessing the object, see also the __Contract_Programming_Overview__ section.)
+
+Static class invariants are empty (`void`) by default unless they are explicitly specified within the [macroref CONTRACT_CLASS_INVARIANT] macro using the following syntax:
+[footnote
+Static class invariants are not part of __N1962__ and they were first introduced by this library.
+]
+
+ static class( ``/assertion1/``, ``/assertion2/``, ... )
+
+For example (see also [file example/contracts static_contract_instance_counter.cpp]):
+
+[import ../example/contracts/static_contract_instance_counter.cpp]
+[static_contract_instance_counter]
+
+In this example there is only one static class invariant assertion `count() >= 0` and it is checked at entry and exit of every constructor, destructor, and member function including the static member function `count`.
+If the static member function `count` had preconditions or postconditions, they would not be able to access the object (i.e., preconditions and postconditions will also be executed in static context).
+
+[endsect]
+
+[section Volatile Member Functions]
+
+It is possible to program contracts for volatile member functions.
+Volatile member functions access the object as volatile therefore their preconditions and postconditions also access the object as volatile and can only access other volatile members.
+This library allows to specify a different set of class invariants called /volatile class invariants/ which can only access the object as volatile and that are checked at entry and exit of every volatile member function.
+(Constructors and destructors never access the object as volatile so volatile class invariants are not checked by constructors and destructors, see also the __Contract_Programming_Overview__ section.)
+
+Volatile class invariants are assumed to be the same as non-volatile class invariants unless they are explicitly specified within the [macroref CONTRACT_CLASS_INVARIANT] macro using the following syntax:
+[footnote
+Volatile class invariants are not part of __N1962__ and they were first introduced by this library.
+It is not clear if there are real applications for volatile class invariants mainly because real applications of `volatile` itself are not clear in C++.
+One very interesting use of `volatile` has been to [@http://www.drdobbs.com/cpp/184403766 avoid race conditions] in concurrent programming (but contracts are not useful for such an application of `volatile`).
+]
+
+
+ volatile class( ``/assertion1/``, ``/assertion2/``, ... )
+
+In most cases, it will be necessary to explicitly specify volatile class invariants when using volatile member functions (unless volatile overloads are provided for every member function that is used by the non-volatile class invariants).
+
+For example (see also [file example/contracts volatile_contract_shared_instance.cpp]):
+
+[import ../example/contracts/volatile_contract_shared_instance.cpp]
+[volatile_contract_shared_instance]
+
+As usual, contracts are checked in constant-correct context therefore only `const volatile` members can be accessed from volatile class invariants, preconditions, and postconditions.
+
+[endsect]
+
+[section Operators]
+
+It is possible to program contracts for operators (both member function operators and free function operators).
+The operator name must be specified using the following syntax when passed to the [macroref CONTRACT_FUNCTION], [macroref CONTRACT_FREE_BODY], and [macroref CONTRACT_MEMBER_BODY] macros:
+
+ operator(``/symbol/``)(``/arbitrary-alphanumeric-name/``)
+
+The first parameter is the usual operator symbol (`==`, `+`, etc) the second parameter is an arbitrary but alphanumeric name (`equal`, `plus`, etc).
+The operator `new`, the operator `delete`, and implicit type conversion operators for fundamental types containing no symbol can also be specified simply as:
+
+ operator new
+ operator delete
+ operator ``/fundamental-type-without-symbols/``
+
+The comma operator must be specified as:
+[footnote
+*Rationale.*
+The comma operator cannot be specified using the comma symbol as in `operator(,)(my_comma_operator)` because the preprocessor uses commas to separate macro parameters so it is not possible to distinguish that from an implicit type conversion operator like `operator(std::vector<T, Allocator>)(std_vector)` (note that the operator name is arbitrary so it also cannot be used to distinguish these two cases).
+]
+
+ operator comma
+
+For example (see also [file example/contracts member_operator_string.cpp]):
+
+[import ../example/contracts/member_operator_string.cpp]
+[member_operator_string]
+
+The memory operators `new`, `delete`, `new[]`, and `delete[]` must always be specified `static` when they are programmed as member function operators.
+[footnote
+*Rationale.*
+C++ automatically promotes memory member operators to static members so the `static` keyword is optional for these member operators.
+However, this library cannot inspect the operator symbol using the preprocessor to check if the operator is a memory member operator or not because the symbol contains non-alphanumeric tokens (which cannot be concatenated by the preprocessor).
+Therefore, this library always requires memory member operators to be explicitly declared as static member functions.
+]
+
+Free function operators are programmed using the same syntax for the operator names.
+
+[endsect]
+
+[section Nested Classes]
+
+It is possible to program contracts for nested classes noting that:
+
+# The access level `public`, `protected`, or `private` must be specified for contracted members and therefore also for nested classes.
+# The `_TPL` macros must be used within templates so the [macroref CONTRACT_CLASS_TPL] macro needs to be used when programming a class nested within a class template.
+
+For example (see also [file example/contracts nested_class_bitset.cpp] and the __Concepts__ section):
+
+[import ../example/contracts/nested_class_bitset.cpp]
+[nested_class_bitset]
+
+[endsect]
+
+[section Friends]
+
+It is possible to program contracts for friend classes and friend functions.
+Classes can be declared friends and later contracted using the [macroref CONTRACT_CLASS] macro as usual:
+
+ CONTRACT_CLASS( // Not even necessary to contract this class.
+ class (x)
+ ) {
+ CONTRACT_CLASS_INVARIANT( void )
+
+ friend class y ;
+
+ // ...
+ };
+
+ CONTRACT_CLASS(
+ class (y)
+ ) {
+ CONTRACT_CLASS_INVARIANT( void )
+
+ // ...
+ };
+
+Friend functions that are declared and defined within the enclosing class use the `friend` keyword within the [macroref CONTRACT_FUNCTION] macro (note that the access level `public`, `protected`, or `private` is optional in this case because these friend functions are not member functions).
+Friend functions that are either forward declared friends or that are defined friends within the enclosing class, must use the [macroref CONTRACT_FREE_BODY] macro.
+For example (see also [file example/contracts friend_counter.cpp]):
+
+[import ../example/contracts/friend_counter.cpp]
+[friend_counter]
+
+The class enclosing the friend declarations might or might not be contracted.
+
+[endsect]
+
+[section Template Specializations]
+
+It is possible to program contracts for class template specializations.
+The generic class template might or might not be contracted (see also [file example/contracts template_specializations_vector.cpp]):
+
+[import ../example/contracts/template_specializations_vector.cpp]
+[template_specializations_vector]
+
+The template specialization types follow the class name as usual but they are wrapped within round parenthesis `( bool, Allocator )` instead than angular parenthesis `< bool, Allocator >` as in the following partial specialization:
+
+[template_specializations_vector_bool_allocator]
+
+The syntax `template( void )` must be used instead of `template< >` to indicate explicit specializations:
+
+[template_specializations_vector_bool]
+
+[endsect]
+
+[section Exception Specifications and Function-Try Blocks]
+
+It is possible to program exception specifications and function-try blocks for constructors, destructors, member functions, and free functions with contracts.
+Exception specifications are part of the function declarations therefore they are programmed within the contract macros but the special syntax `throw( void )` must be used instead of `throw( )` to specify that no exception is thrown:
+
+ throw( ``/exception-type1/``, ``/exception-type2/``, ... ) // As usual.
+ throw( void ) // Instead of `throw( )`.
+
+Function-try blocks are part of the function definition so they are normally programmed outside the contract macros.
+However, for constructors with member initializers, the member initializers must be programmed within the [macroref CONTRACT_CONSTRUCTOR] macro and therefore also the function-try blocks must be programmed within the macro using the following syntax:
+
+ try initialize( ``/initializer1/``, ``/initializer2/``, ... )
+ catch(``/exception-declaration1/``) ( ``/instruction1/``; ``/instruction2/``; ... )
+ catch(``/exception-declaration2/``) ( ``/instruction1/``; ``/instruction2/``; ... )
+ catch(...) ( ``/instruction1/``; ``/instruction2/``; ... )
+
+As usual, only one catch statement must be specified and the other catch statements are optional plus `catch(...)` can be used to catch all exceptions.
+Note however that round parenthesis `( ... )` are used instead of curly parenthesis `{ ... }` to wrap the catch statement instructions (then the catch instructions are programmed with the usual syntax and separated by semicolons `;`).
+(The maximum number of catch statements that can be programmed for constructor-try blocks is specified by the [macroref CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES] macro.)
+
+In the following example the constructor uses a function-try block to throw only `out_of_memory` and `error` exceptions while the destructor uses exception specifications to throw no exception (see also [file example/contracts exception_array.cpp]):
+
+[import ../example/contracts/exception_array.cpp]
+[exception_array]
+
+(The `BOOST_IDENTITY_TYPE` macro can be used to wrap the catch statement exception declaration types if they contain unwrapped commas.)
+
+Exception specifications and function-try blocks apply only to exceptions thrown by the function body and not to exceptions thrown by the contracts themselves (if any) and by the contract checking code generated by this library macros.
+[footnote
+*Rationale.*
+__N1962__ specifies that function-try blocks should only apply to the body code and not to the contract code.
+No explicit requirement is stated in __N1962__ for exception specifications but the authors have decided to adopt the same requirement that applies to function-try blocks (because it seemed of little use for the contract to throw an exception just so it is handled by the exception specification).
+]
+
+[endsect]
+
+[section Specifying Types (no Boost.Typeof)]
+
+This library uses __Boost_Typeof__ to automatically deduces postcondition old value types and constant assertion variable types.
+If programmers do not want the library to use __Boost_Typeof__ they can explicitly specify these types.
+
+The types of postcondition old values are specified instead of using `auto` and they must be wrapped within round parenthesis unless they are fundamental types containing no symbol (these must match the type of the specified old-of expressions):
+
+ (``/type/``) ``/variable/`` = CONTRACT_OLDOF ``/oldof-expression/``
+
+The types of constant assertion variables are specified just before each variable name and they also must be wrapped within round parenthesis unless they are fundamental types containing no symbol:
+
+ const( (``/type1/``) ``/variable1/``, (``/type2/``) ``/variable2/``, ... ) ``/boolean-expression/``
+
+For example (see also [file example/contracts typed_counter.cpp]):
+
+[import ../example/contracts/typed_counter.cpp]
+[typed_counter]
+
+Note that postcondition result values are always specified using `auto`:
+
+ auto ``/result-variable/`` = return
+
+This is because the function return type is know by the library as specified in the function declaration within the [macroref CONTRACT_FUNCTION] macro.
+Therefore, the postcondition result value type is never explicitly specified by programmers (but __Boost_Typeof__ is never used to deduce it).
+
+[note
+It is recommended to not specify these types explicitly and let the library internally use __Boost_Typeof__ to deduce them because the library syntax is more readable without the explicit types.
+However, all types must be properly registered with __Boost_Typeof__ as usual in order to use type-of emulation mode on __CXX03__ compilers that do not support native type-of (see __Boost_Typeof__ for more information).
+]
+
+[endsect]
+
+[section Block Invariants and Loop Variants]
+
+/Block invariants/ can be used anywhere within the function body and they are used to assert correctness conditions of the implementation (very much like `assert`).
+They are programmed specifying a list of assertions to the [macroref CONTRACT_BLOCK_INVARIANT] macro (including static, constant, and select assertions):
+
+ CONTRACT_BLOCK_INVARIANT( ``/assertion1/``, ``/assertion2/``, ... )
+
+When block invariants are used within a loop, they are also called /loop invariants/ (e.g., __Eiffel__ uses this terminology).
+
+Furthermore, this library allows to specify [@http://en.wikipedia.org/wiki/Loop_variant ['loop variants]].
+A loop variant is a non-negative monotonically decreasing number that is updated at each iteration of the loop.
+The specified loop variant expression is calculated by this library at each iteration of the loop and it is automatically asserted to be non-negative (`>= 0`) and to decrease monotonically from the previous loop iteration.
+Because the loop variant monotonically decreases and it cannot be smaller than zero, either the loop terminates or one of the two library assertions will eventually fail in which case the library will call the [funcref contract::loop_variant_broken] handler therefore detecting and stopping infinite loops.
+Each given loop can only have one variant which is specified using the [macroref CONTRACT_LOOP_VARIANT] macro.
+The enclosing loop (`while`, `for`, `do`, etc) must be declared using the [macroref CONTRACT_LOOP] macro:
+
+ CONTRACT_LOOP( ``/loop-declaration/`` ) {
+ CONTRACT_LOOP_VARIANT( ``/non-negative-monotonically-decreasing-expression/`` )
+ ...
+ }
+
+Note that the library cannot automatically make constant any of the variables within the function body therefore constant block invariant assertions and constant loop variant expressions should be used by programmers if they want to enforce constant-correctness for block invariants and loop variants.
+
+The following example uses a loop to calculate the [@http://en.wikipedia.org/wiki/Greatest_common_divisor Greatest Common Divisor (GCD)] of two integral numbers (see also [file example/contracts blockinv_loopvar_gcd.cpp]):
+
+[import ../example/contracts/blockinv_loopvar_gcd.cpp]
+[blockinv_loopvar_gcd]
+
+__Eiffel__ supports loop variants but __N1962__ does not.
+Loop variants might not be very useful especially if __Boost_Foreach__ or similar constructs are used to ensure loop termination.
+
+[endsect]
+
+[section Contract Broken Handlers (Throw on Failure)]
+
+When a contract assertion fails, this library prints a message on the standard error `std::cerr` and it terminates the program calling `std::terminate`.
+Programmers can change this behavior customizing the actions that the library takes on contract assertion failure by setting the contract broken handler functions.
+By default the library terminates the program because a contract failure indicates that the program is in an invalid state that programmers specified it should never happen (so the only sensible assumption is that the program execution should not continue).
+However, in some cases programmers might need to handle even such catastrophic failures by executing some fail-safe code instead of terminating the program and that can be done customizing the contract broken handlers.
+
+The library functions [funcref contract::set_precondition_broken], [funcref contract::set_postcondition_broken], [funcref contract::set_class_invariant_broken], [funcref contract::set_block_invariant_broken], and [funcref contract::set_loop_variant_broken] can be used to customize the action to taken in case of precondition, postcondition, class invariant, block invariant, and loop variant failure respectively.
+Furthermore, class invariants are checked at entry, at normal exit, and at exit but when exceptions are thrown so more granular handlers can be set for each of these cases using [funcref contract::set_class_invariant_broken_on_entry], [funcref contract::set_class_invariant_broken_on_exit], and [funcref contract::set_class_invariant_broken_on_throw] (using [funcref contract::set_class_invariant_broken] is equivalent to setting all these class invariant broken handles to the same handler).
+[footnote
+__N1962__ does not allow to configure class invariant broken handlers differently for entry, exit, and throw.
+]
+
+This library passes a parameter of type [enumref contract::from] to the contract broken handler functions indicating the context that failed the contract assertion (e.g., this parameter will be set to `contract::FROM_DESTRUCTOR` if the contract assertion failed from a destructor):
+[footnote
+The `contract::from` parameter was not part of __N1962__ contract broken handlers but the proposal hinted that it might be needed (need that was confirmed by the implementation of this library).
+]
+
+ void ``/contract-broken-handler/`` ( contract::from const& context )
+
+[important
+In order to comply with the STL exception safety requirements, destructors should never throw.
+Therefore, even if programmers customize the contract broken handlers to throw exceptions instead of terminating, the handlers should never throw when contract assertions fail from a destructor (and the [enumref contract::from] parameter can be used to discriminate this case).
+]
+
+The contract broken handlers are always invoked with an active exception that refers to the exception that failed the contract:
+[footnote
+*Rationale.*
+Exceptions are used to signal a contract assertion failure because it is not possible to directly call the contract broken handler ([funcref contract::precondition_broken], etc) instead of throwing the exception in oder to properly implement subcontracting.
+For example, if an overriding precondition fails but the overridden precondition is true then the library will not call the broken handler even if the overriding precondition threw an exception (as required by subcontracting).
+Contract assertion failures are critical error conditions so it is actually natural that the library uses exceptions to signal them (note that the library will always handle the exceptions by calling the contract broken handlers which terminate the program by default so the fact that the library signals contract assertion failures using exceptions does not imply that an exception will be thrown if a contract assertion fails, that is entirely decided by the implementation of the broken handlers).
+]
+
+# Either an exception that was explicitly thrown by the user from the contract (e.g. `not_a_number` in the example blow).
+# Or, an exception that was thrown ["behind the scene] while evaluating a contract assertion (e.g., the assertion calls an STL algorithm and that throws `std::bad_alloc`).
+# Or, an exception automatically thrown by this library in case a contract assertion is evaluated to be false (these exceptions are always [classref contract::broken] objects and they contained detailed information about the contract assertion that was evaluated to be false: file name, line number, assertion number, and assertion code).
+[footnote
+The assertion number is meaningful only within a specific handler.
+For example, if assertion number `2` failed within the class invariant broken handler that mean that the class invariant number `2` failed.
+Therefore, the assertion number is not useful if a single handler is programmed for all types of contracts because such an handler can no longer distinguish between class invariants, preconditions, postconditions, etc.
+]
+
+In all these cases the contract assertion is considered failed because it was not evaluated to be true (and that is the case not only for assertions that are evaluated to be false but also for assertions that throw exceptions while being evaluated).
+[footnote
+*Rationale.*
+Threating an exception thrown while evaluating an assertion as a failure of the contract assertion is a clear policy established by this library under the principle that a contract assertion fails unless it is evaluated to be true.
+__N1962__ does not completely clarify this point.
+]
+The customized contract broken handlers can re-throw the active exception and catch it so to inspect it for logging or for any other customized behaviour that might need to be implemented by the programmers.
+
+The following example customizes the contract broken handlers to throw exceptions (both user-defined exceptions like `not_a_number` and the [classref contract::broken] exception that the library automatically throws in case of a contract assertion failure).
+However, the customized handlers never throw from within a destructor to comply with STL exception safety requirements (see also [file example/contracts broken_handler_sqrt.cpp]):
+[footnote
+In this example, contract failures from destructors are logged and then simply ignored.
+That might be acceptable in this simple example but it is probably a very bad idea in general.
+]
+
+[import ../example/contracts/broken_handler_sqrt.cpp]
+[broken_handler_sqrt]
+
+Note how the ternary operator `:?` can be used to program assertions that throw exceptions on failure:
+
+ x >= 0.0 ? true : throw not_a_number
+
+Then the contract broken handlers are customized to propagate the exceptions instead of handling them by calling `std::terminate` (default behaviour).
+
+See also [file example/contracts contract_failure.cpp] for a more complex example that redefines the contract broken handlers to throw exceptions in order to automatically check that the correct contract broken handlers are called when assertions fail in accordance with the call semantics explained in the __Contract_Programming_Overview__ section.
+
+[endsect]
+
+[endsect]
+

Added: sandbox/contract/doc/bibliography.qbk
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/bibliography.qbk 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,77 @@
+
+[/ Copyright (C) 2008-2012 Lorenzo Caminiti ]
+[/ Distributed under the Boost Software License, Version 1.0 ]
+[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
+[/ http://www.boost.org/LICENSE_1_0.txt) ]
+[/ Home at http://sourceforge.net/projects/contractpp ]
+
+[section Bibliography]
+
+[#Bright04_anchor] [Bright04] W. Bright. [@http://www.digitalmars.com/d/2.0/dbc.html /Contract Programming for the D Programming Language/]. 2004.
+
+[#Bright04b_anchor] [Bright04b] W. Bright. [@http://www.digitalmars.com/ctg/contract.html /Contract Programming for the Digital Mars C++ Compiler/]. 2004.
+
+[#C2_anchor] [C2] Aechmea. [@http://www.programmersheaven.com/app/news/DisplayNews.aspx?NewsID=3843 /C^2 Contract Programming add-on for C++/]. 2005.
+
+[#Chrome02_anchor] [Chrome02] RemObjects. [@http://blogs.remobjects.com/blogs/mh/2008/05/01/p216 /Chrome: Contract Programming for Object Pascal in .NET/]. 2002.
+
+[#Clarke06_anchor] [Clarke06] L. A. Clarke and D. S. Rosenblum. [@http://discovery.ucl.ac.uk/4991/1/4991.pdf /A Historical Perspective on Runtime Assertion Checking in Software Development/]. Newsletter ACM SIGSOFT Software Engineering Notes, 2006.
+
+[#Cline90_anchor] [Cline90] M. Cline and D. Lea. /The Behaviour of C++ Classes/ and [@http://surface.syr.edu/cgi/viewcontent.cgi?article=1116&context=eecs /Using Annotated C++/]. Proc. of the Symposium on Object Oriented Programming Emphasizing Practical Applications, Maris College, 1990.
+
+[#Ellis90_anchor] [Ellis90] M. A. Ellis and B. Stroustrup. /The Annotated C++ Reference Manual/. ANSI Base Document, Addison Wesley, 1990.
+
+[#Gautron92_anchor] [Gautron92] P. Gautron. /An Assertion Mechanism Based on Exceptions/. Fourth C++ Technical Conference, 1992.
+
+[#Hoare73_anchor] [Hoare73] C. A. R. Hoare. /Hints on Programming Language Design/. Stanford University Artificial Intelligence memo AIM-224/STAN-CS-73-403, pages 193-216, 1973.
+
+[#CodeContracts_anchor] [CodeContracts] Microsoft Research. [@http://research.microsoft.com/en-us/projects/contracts/ /Code Contracts: Design-By-Contract Programming for All .NET Programming Languages/]. 2012.
+
+[#iContract_anchor] [iContract] O. Enseling. [@http://www.javaworld.com/javaworld/jw-02-2001/jw-0216-cooltools.html /iContract: Contract Programming for Java/]. 2001.
+
+[#Jcontract_anchor] [Jcontract] Parasoft. [@http://www.parasoft.com/jsp/products/article.jsp?label=product_info_Jcontract /Jcontract: Contract Programming for Java/].
+
+[#Lindrud04_anchor] [Lindrud04] J. Lindrud. [@http://www.codeproject.com/Articles/8293/Design-by-Contract-in-C /Design by Contract in C++/]. 2004.
+
+[#Maley99_anchor] [Maley99] D. Maley and I. Spence. [@http://www.computer.org/portal/web/csdl/doi/10.1109/TOOLS.1999.779000 /Emulating Design by Contract in C++/]. Proceedings of TOOLS, IEEE Computer Society, 1999.
+
+[#Meyer97_anchor] [Meyer97] B. Meyer. /Object Oriented Software Construction/. Prentice-Hall, 2nd edition, 1997.
+
+[#Mitchell02_anchor] [Mitchell02] R. Mitchell and J. McKim. /Design by Contract, by Example/. Addison-Wesley, 2002.
+
+[#N1613_anchor] [N1613] T. Ottosen. [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2004/n1613.pdf /Proposal to add Design by Contract to C++/]. The C++ Standards Committee, N1613, 2004.
+
+[#N1653_anchor] [N1653] C. Nelson. [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm /Working draft changes for C99 preprocessor synchronization/]. C++ Standards Committee, N1653, 2004.
+
+[#N1669_anchor] [N1669] T. Ottosen. [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2004/n1669.html /Proposal to add Contract Programming to C++ (revision 1)/]. The C++ Standards Committee, N1669, 2004.
+
+[#N1773_anchor] [N1773] D. Abrahams, L. Crowl, T. Ottosen, and J. Widman. [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1773.html /Proposal to add Contract Programming to C++ (revision 2)/]. The C++ Standards Committee, N1773, 2005.
+
+[#N1866_anchor] [N1866] L. Crowl and T. Ottosen. [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1866.html /Proposal to add Contract Programming to C++ (revision 3)/]. The C++ Standards Committee, N1866, 2005.
+
+[#N1895_anchor] [N1895] H. Sutter and F. Glassborow. [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1895.pdf /Delegating Constructors (revision 2)/]. C++ Standards Committee, N1895, 2005.
+
+[#N1962_anchor] [N1962] L. Crowl and T. Ottosen. [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1962.html /Proposal to add Contract Programming to C++ (revision 4)/]. The C++ Standards Committee, N1962, 2006.
+
+[#N2081_anchor] [N2081] D. Gregor, B. Stroustrup. [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf /Concepts (revision 1)/]. The C++ Standards Committee, N2081, 2006.
+
+[#N2914_anchor] [N2914] P. Becker. [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2914.pdf /Working Draft, Standard for Programming Language C++/]. The C++ Standards Committee, N2914, 2009.
+
+[#N2906_anchor] [N2906] B. Stroustrup. [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2906.pdf /Simplifying the sue of concepts/]. The C++ Standards Committee, N2906, 2009.
+
+[#Rosenblum95_anchor] [Rosenblum95] D. S. Rosenblum. [@http://www.cs.toronto.edu/~chechik/courses06/csc410/rosenblum_assert95.pdf /A practical Approach to Programming With Assertions/]. IEEE Transactions on Software Engineering, 1995.
+
+[#SPARKAda_anchor] [SPARKAda] Praxis. [@http://www.praxis-his.com/sparkada/language.asp /SPARKAda (Ada-like Language with Contract Programming)/].
+
+[#SpecSharp_anchor] [SpecSharp] Microsoft. [@http:://research.microsoft.com/en-us/projects/specsharp/ /Spec# (C# Extension)/].
+
+[#Stroustrup94_anchor] [Stroustrup94] B. Stroustrup. /The Design and Evolution of C++/. Addison Wesley, 1994.
+
+[#Stroustrup97_anchor] [Stroustrup97] B. Stroustrup. /The C++ Programming Language/. Prentice-Hall, 2nd Edition, 1997.
+
+[#Tandin04_anchor] [Tandin04] A. Tandin. [@http://www.codeproject.com/KB/macros/DbC_and_Doxygen.aspx /Design by Contract macros for C++ and link to Doxygen/]. 2004.
+
+[#Wilson06_anchor] [Wilson06] M. Wilson. [@http://www.artima.com/cppsource/deepspace.html /Contract Programming 101 - The Nuclear Reactor and the Deep Space Probe/]. The C++ Source, 2006.
+
+[endsect]
+

Added: sandbox/contract/doc/bjam.py
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/bjam.py 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,42 @@
+
+# Copyright (C) 2008-2012 Lorenzo Caminiti
+# Distributed under the Boost Software License, Version 1.0
+# (see accompanying file LICENSE_1_0.txt or a copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+# Home at http://sourceforge.net/projects/contractpp
+
+import os
+import sys
+import shutil
+
+# Simple script that customizes Boost's navbar before building the docs.
+# Unfortunately, Boost does not have mechanism to customize its navbar
+# (essentially only on/off is supported), this script replaces files manually.
+
+BOOST_ROOT = os.getenv("BOOST_ROOT")
+boost_navbar = BOOST_ROOT + "/tools/boostbook/xsl/navbar.xsl"
+backup_navbar = "navbar.xsl.bak"
+my_navbar = "navbar.xsl"
+
+args = " "
+for i in range(1, len(sys.argv)): args = args + sys.argv[i] + " "
+
+print 'Saving Boost "navbar.xsl"...'
+shutil.copyfile(boost_navbar, backup_navbar)
+
+try:
+ print 'Installing customized "navbar.xsl"...'
+ shutil.copyfile(my_navbar, boost_navbar)
+ print 'Building documentation...'
+ print
+ os.system("bjam" + args + " bjampy")
+ print
+except:
+ print 'Error: Unable to build documentation'
+
+try:
+ print 'Restoring Boost "navbar.xsl"...'
+ shutil.copyfile(backup_navbar, boost_navbar)
+except:
+ print 'Error: Unable to restore Boost "navbar.xsl"'
+

Added: sandbox/contract/doc/concepts.qbk
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/concepts.qbk 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,219 @@
+
+[/ Copyright (C) 2008-2012 Lorenzo Caminiti ]
+[/ Distributed under the Boost Software License, Version 1.0 ]
+[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
+[/ http://www.boost.org/LICENSE_1_0.txt) ]
+[/ Home at http://sourceforge.net/projects/contractpp ]
+
+[section Concepts]
+
+This section explains how to use this library to check concepts.
+Concepts are part of the program specifications because they enforce requirements on generic types at compile-time and therefore they are within the scope of this library.
+
+Concepts were proposed for addition to __CXX11__ but they were unfortunately never adopted (see __N2081__).
+The concepts that are checked using this library need to be defined using the __Boost_ConceptCheck__ library.
+This library does not add any extra functionality with respect to the concept checking features already provided by __Boost_ConceptCheck__ but it allows to specify both concepts and contracts together within a unified syntax.
+
+[section Class Templates]
+
+It is possible to list the concepts to check for class templates using `requires` within the [macroref CONTRACT_CLASS] macro, after the template parameter declarations (see also the __Grammar__ section):
+
+ template( ``/template-parameter1/``, ``/template-parameter2/``, ... ) requires( ``/concept1/``, ``/concept2/``, ... )
+
+The following example requires that the generic type `T` specified for the class template `vector` is always __CopyConstructible__ and it uses the `boost::CopyConstructible` concept defined by __Boost_ConceptCheck__ (see also [file example/concepts class_member_concept_vector.hpp], [file example/concepts class_member_concept_vector_error.cpp], and [file example/concepts class_member_concept_vector.cpp]):
+
+[import ../example/concepts/class_member_concept_vector.hpp]
+[class_member_concept_vector_class]
+
+If the class template `vector` is instantiated on a type `T` that is not __CopyConstructible__, the compiler will generate an error (with the usual format of __Boost_ConceptCheck__ errors).
+
+[endsect]
+
+[section Function Templates]
+
+It is possible to list concepts to check for function templates using `requires` within the [macroref CONTRACT_FUNCTION] macro, after the template parameter declarations (see also the __Grammar__ section).
+
+For example, for a constructor function template (see also [file example/concepts class_member_concept_vector.hpp], [file example/concepts class_member_concept_vector_constructor_error.cpp], and [file example/concepts class_member_concept_vector.cpp]):
+
+[class_member_concept_vector_constructor]
+
+And, for a member function template (see also [file example/concepts class_member_concept_vector.hpp], [file example/concepts class_member_concept_vector_member_error.cpp], and [file example/concepts class_member_concept_vector.cpp]):
+
+[class_member_concept_vector_member]
+
+If the `vector` constructor template or the `vector::insert` member function template are instantiated on a type `Iterator` that is not an __InputIterator__, the compiler will generate an error (with the usual format of __Boost_ConceptCheck__ errors).
+
+So far we have used concepts that are predefined by __Boost_ConceptCheck__ but it is also possible to check user-defined concepts as long as they are defined using __Boost_ConceptCheck__.
+For example, consider the following user-defined `Addable` concept (see also [file example/concepts free_concept_operator_preinc.hpp], [file example/concepts free_concept_operator_preinc_error.cpp], and [file example/concepts free_concept_operator_preinc.cpp]):
+
+[import ../example/concepts/free_concept_operator_preinc.hpp]
+[free_concept_operator_preinc]
+
+If this templated operator `++` is instantiated on a type `T` that is not __Assignable__ or not `Addable`, the compiler will generate an error (with the usual format of __Boost_ConceptCheck__ error).
+
+Note that concepts can also be specified for free function templates, for free operator templates, and for member operator templates (as illustrated in some of the above examples).
+
+[endsect]
+
+[section Concept Definitions (Not Implemented)]
+
+Using the preprocessor parsing techniques introduced by the library, it should be possible to implement the following syntax to define [@http://en.wikipedia.org/wiki/Concepts_(C%2B%2B) concepts].
+Note how this syntax resembles the syntax proposed by __N2081__ for adding concepts to __CXX11__ (__N2081__ and concepts were unfortunately not adopted by the standard committee).
+
+ CONTRACT_CONCEPT( // A concept definition.
+ auto concept (LessThanComparable) ( typename T )
+ (
+ bool operator(<)(less) ( T , T )
+ )
+ )
+
+ CONTRACT_CONCEPT( // Concepts with multiple parameters.
+ auto concept (Convertible) ( typename T, typename U )
+ (
+ operator(U)(U_type) ( T const& )
+ )
+ )
+
+ CONTRACT_CONCEPT( // Concept composition.
+ concept (InputIterator) ( typename Iterator, typename Value )
+ (
+ requires Regular<Iterator>,
+
+ (Value) operator(*)(deref) ( Iterator const& ),
+ (Iterator&) operator(++)(preinc) ( Iterator& ),
+ (Iterator) operator(++)(postinc) ( Iterator&, int )
+ )
+ )
+
+ CONTRACT_CONCEPT( // Derived concepts.
+ concept (ForwardIterator) ( typename Iterator, typename Value )
+ extends( InputIterator<Iterator, Value> )
+ (
+ // Other requirements here...
+ )
+ )
+
+ CONTRACT_CONCEPT( // Typenames within concepts.
+ concept (InputIterator) ( typename Iterator )
+ (
+ typename value_type,
+ typename reference,
+ typename pointer,
+ typename difference_type,
+
+ requires Regular<Iterator>,
+ requires (Convertible<reference, value_type>),
+
+ (reference) operator(*)(deref) ( const Iterator& ),
+ (Iterator&) operator(++)(preinc) ( Iterator& ),
+ (Iterator) operator(++)(postinc) ( Iterator&, int )
+ )
+ )
+
+ CONTRACT_CONCEPT( // Concept maps.
+ concept_map (InputIterator<char*>)
+ (
+ typedef char value_type,
+ typedef (char&) reference,
+ typedef (char*) pointer,
+ typedef ptrdiff_t difference_type
+ )
+ )
+
+ CONTRACT_CONCEPT( // Concept maps can be templated.
+ template( typename T )
+ concept_map (InputIterator) ( T* )
+ (
+ typedef (T&) value_type,
+ typedef (T&) reference,
+ typedef (T*) pointer,
+ typedef ptrdiff_t difference_type
+ )
+ )
+
+ CONTRACT_CONCEPT( // Concept maps as mini-types.
+ concept (Stack) ( typename X )
+ (
+ typename value_type,
+
+ void (push) ( X&, value_type const& ),
+ void (pop) ( X& ),
+ (value_type) (top) ( X const& ),
+ bool (empty) ( X const& )
+ )
+ )
+
+ CONTRACT_CONCEPT( // Concept maps as mini-types (specializations).
+ template( typename T )
+ concept_map (Stack) ( std::vector<T> )
+ (
+ typedef (T) value_type,
+
+ void (push) ( (std::vector<T>&) v, (T const&) x )
+ (
+ v.push_back(x);
+ ),
+
+ void (pop) ( (std::vector<T>&) v )
+ (
+ v.pop_back();
+ ),
+
+ (T) (top) ( (std::vector<T> const&) v )
+ (
+ return v.back();
+ ),
+
+ bool (empty) ( (std::vector<T> const&) v )
+ (
+ return v.emtpy();
+ )
+ )
+ )
+
+ CONTRACT_CONCEPT( // Axioms.
+ concept (Semigroup) ( typename Op, typename T )
+ extends( CopyConstructible<T> )
+ (
+ (T) operator(())(call) ( Op, T, T ),
+
+ axiom (Associativity) ( (Op) op, (T) x, (T) y, (T) z )
+ (
+ op(x, op(y, z)) == op(op(x, y), z);
+ )
+ )
+ )
+
+Note that:
+
+# Parenthesis around function parameter types can be always allowed but they should be required only when the parameter name is also specified.
+# The function bodies need to be specified within the macros and that will make compiler errors very hard to use (because the errors will all refer to the same line number, the line number on which the `CONTRACT_CONCEPT` macro expanded).
+However, concept definitions, including possible function bodies, might be simple enough for this not to be a major issue at least in the most common cases (the authors do not have enough experience with programming concept definitions to truly assess this).
+
+The authors /think/ this syntax can be implemented and parsed using the preprocessor however the authors have not tried to implement this yet.
+If this syntax can indeed be implemented, it should then be investigated if the actual concept definitions can be programmed from the parsed concept traits using C++ (this seems possible at least for __CXX11__ based on some work done for the [@http://zao.se/~zao/boostcon/11/slides/Boost.Generic.pdf Generic] library).
+
+The authors recognize that implementing concept definitions would be a nice addition to this library (again, concepts are parts of the program specifications, they are contracts on the type system that are checked at compile-time, so both concept checking and concept definition are within the scope of this library).
+However, at the moment there are no concrete plans for extending this library with the concept definitions (see also [@https://sourceforge.net/apps/trac/contractpp/ticket/49 Ticket 49]).
+
+The following is a side-by-side comparison of this possible concept definition syntax with the syntax proposed by __N2081__:
+
+[import ../example/concepts/concept_def.cpp]
+[import ../example/concepts/concept_def_npaper.cpp]
+[table
+[ [Possible Extension of This Library (not implemented)] [\[N2081\] Proposal (not part of C++)] ]
+[ [[concept_def]] [[concept_def_npaper]] ]
+]
+
+Note that:
+
+# Extra wrapping parenthesis are used when expressions contain unwrapped commas `,` or leading symbols.
+# The specifiers `constructor`, `destructor`, and `member` follow the same syntax as the [macroref CONTRACT_CONSTRUCTOR_BODY] and [macroref CONTRACT_DESTRUCTOR_BODY], and they serve a purpose similar to these macros in naming the constructors, destructors, and member functions outside class declarations.
+
+If concept definitions were added to this library, concepts would still be checked using the `requires` specifier in class and function declarations as we have seen so far (it might even be possible for concepts defines using __Boost_ConceptCheck__ to be still specified using some type tagging of this library concept types to internally distinguish between __Boost_ConceptCheck__ concepts and concepts define using this library).
+Furthermore, this library could provide all the standard concepts defined in __N2914__ in an header file =contract/std/concept.hpp=.
+
+[endsect]
+
+[endsect]
+

Added: sandbox/contract/doc/contract_programming_overview.qbk
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/contract_programming_overview.qbk 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,528 @@
+
+[/ Copyright (C) 2008-2012 Lorenzo Caminiti ]
+[/ Distributed under the Boost Software License, Version 1.0 ]
+[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
+[/ http://www.boost.org/LICENSE_1_0.txt) ]
+[/ Home at http://sourceforge.net/projects/contractpp ]
+
+[section Contract Programming Overview]
+
+[:['["It is absurd to make elaborate security checks on debugging runs, when no trust is put in the results, and then remove them in production runs, when an erroneous result could be expensive or disastrous. What would we think of a sailing enthusiast who wears his life-jacket when training on dry land but takes it off as soon as he goes to sea?]]]
+[:['-- Charles Antony Richard Hoare (see __Hoare73__)]]
+
+This section gives an overview of Contract Programming (see __Meyer97__, __Mitchell02__, and __N1613__ for a detailed introduction to Contract Programming).
+
+[note
+The objective of this library is /not/ to convince programmers to use Contract Programming.
+It is assumed that programmes understand the benefits and trade-offs associated with Contract Programming and they have already decided to use this methodology to formally program specifications.
+Then, this library aims to be the best Contract Programming library for C++.
+]
+
+[section Assertions]
+
+Contract Programming is characterized by the following type of assertion mechanisms.
+
+[table
+[ [Assertion] [Purpose] ]
+[ [Preconditions] [
+These are logical conditions that programmers expect to be true when the function is called (e.g., to check constraints on the function arguments).
+] ]
+[ [Postconditions] [
+These are logical conditions that programmers expect to be true when the function has ended normally (e.g., to check the result and any side effect that a function might have).
+Postconditions can usually access the function result value (for non-void functions) and /old values/ that expressions had before the body execution.
+] ]
+[ [Class Invariants] [
+These are logical conditions that programmers expect to be true after the constructor has been executed successfully, before and after the execution of every non-static public member function, and before the destructor is executed (e.g, class invariants can define valid states of all objects of a class).
+It is possible to describe a different set of class invariants for volatile member functions but /volatile class invariants/ are assumed to be same as class invariants unless differently specified.
+It is also possible to describe /static class invariants/ which are excepted to be true before and after the execution of any public member function (even if static), including constructor entry and destructor exit.
+[footnote
+*Rationale.*
+Static and volatile class invariants were first introduced by this library to reflect the fact that C++ support both static and volatile member functions.
+Static and volatile class invariants are not part of __N1962__.
+]
+] ]
+[ [Subcontracting] [
+Subcontracting is defined using the __substitution_principle__ and it predicates that: Preconditions cannot be strengthen, postconditions and class invariants cannot be weaken.
+] ]
+[ [Block Invariants] [
+These are logical conditions that programmers except to be true every time the execution reaches the point where the condition is asserted.
+When used within a loop (i.e., a block of code that can be executed in iteration), block invariants are also called /loop invariants/ and they assert conditions that are expected to be true for every loop iteration.
+] ]
+[ [Loop Variants] [
+For a given loop, a [@http://en.wikipedia.org/wiki/Loop_variant loop variant] is a non-negative integer expression (`>= 0`) with a value that is expected to decrease at every subsequent loop iteration.
+Loop variants are used to ensure that loops terminate avoiding infinite iterations.
+] ]
+]
+
+It is a common Contract Programming requirement to disable other contracts while a contract assertions is being evaluated (in order to avoid infinite recursive calls).
+This library implement this feature however it should be noted that in order to globally disable assertions while checking another assertion, some type of global variable needs to be used.
+In multi-threaded environments, programmers can define the [macroref CONTRACT_CONFIG_THREAD_SAFE] configuration macro to protect such a global variable from racing conditions (but that will effectively introduce a global lock in the program).
+
+A limited form of Contract Programming is the use of the C++ `assert` macro.
+Using `assert` is common practice for many programmers but unfortunately it suffers from the following problems (that are instead resolved by using Contract Programming):
+
+# `assert` is used within the implementation therefore the asserted conditions are not easily visible to the caller which is only familiar with the class and function declarations.
+# `assert` does not distinguish between preconditions and postconditions.
+In well-tested production code, postconditions can be disabled trusting the correctness of the implementation while preconditions might still need to remain enabled because of the evolution of the calling code.
+Using `assert` it is not possible to selectively disable only postconditions and all assertions must be disabled at once.
+# `assert` requires to manually program extra code to check class invariants (e.g., extra member functions and try blocks).
+# `assert` does not support subcontracting.
+
+[endsect]
+
+[section Benefits]
+
+The main use of Contract Programming is to improve software quality.
+__Meyer97__ discusses how Contract Programming can be used as the basic tool to write ["correct] software.
+Furhtermore, __Stroustrup97__ discusses the key importance of class invariants plus advantages and disadvantages of preconditions and postconditions.
+The following is a short summary of the benefits associated with Contract Programming mainly taken from __N1613__.
+
+[table
+[ [#] [Topic] [Benefit] ]
+[ [1.] [Preconditions and Postconditions] [
+Using function preconditions and postconditions, programmers can give a precise semantic description of what a function requires at its entry and what it ensures under its (normal) exit.
+In particular, using postcondition old values, Contract Programming provides a mechanism that allows programmers to compare values of an expression before and after the function body execution.
+This mechanism is powerful enough to enable programmers to express many constraints within the code, constraints that would otherwise have to be captured at best only informally by the code documentation.
+] ]
+[ [2.] [Class Invariants] [
+Using class invariants, programmers can describe what to expect from a class and the logic dependencies between the class members.
+It is the job of the constructor to ensure that the class invariants are satisfied when the object is first created.
+Then the implementation of the member functions can be largely simplified as they can be written knowing that the class invariants are satisfied because Contract Programing checks them before and after the execution of every member function.
+Finally, the destructor makes sure that the class invariants hold for the entire life of the object, checking the class invariants one last time before the object is destructed.
+] ]
+[ [3.] [Self-Documenting Code] [
+Contracts are part of the source code, they are executed and verified at run-time so they are always up to date with the code itself.
+Therefore the specifications, as documented by the contracts, can be trusted to always be up to date with the implementation code.
+] ]
+[ [4.] [Easier Debugging] [
+Contract Programming can provide a powerful debugging facility because, if contracts are well written, bugs will cause contract assertions to fail exactly where the problem first occurs instead than at some later stage of the program execution in an apparently unrelated manner.
+Note that a precondition failure points to a bug in the function caller, a postcondition failure points instead to a bug in the function implementation.
+Furthermore, in case of contract failure, this library provides detailed error messages that greatly helps debugging.
+[footnote Of course, if the contract is ill written then Contract Programming is of little use.
+However, it is less likely to have a bug in both the function body and the contract than in the function body only.
+For example, consider the validation of a result in postconditions.
+Validating the return value might seem redundant, but in this case we actually want that redundancy.
+When programmers write a function, there is a certain probability that they make a mistake in implementing the function body.
+When programmers specify the result of the function in the postconditions, there is also a certain probability that they make a mistake in writing the contract.
+However, the probability that programmers make a mistake twice (in both the body /and/ the contract) is lower than the probability that the mistake is made just once (in either the body or the contract).]
+] ]
+[ [5.] [Easier Testing] [
+Contract Programming facilitates testing because a contract naturally specifies what a test should check.
+For example, preconditions of a function state which inputs cause the function to fail and postconditions state which outputs are produced by the function on normal exit.
+] ]
+[ [6.] [Formal Design] [
+Contract Programming can serve to reduce the gap between designers and programmers by providing a precise and unambiguous specification language.
+Moreover, contracts can make code reviews easier.
+] ]
+[ [7.] [Formal Inheritance] [
+Contract Programming formalizes the virtual function overriding mechanism using subcontracting as justified by the __substitution_principle__.
+This keeps the base class programmers in control as overriding functions still have to fully satisfy the base class contracts.
+] ]
+[ [8.] [Replace Defensive Programming] [
+Contract Programming assertions can replace [@http://en.wikipedia.org/wiki/Defensive_programming Defensive Programming] checks localizing these checks within the contract and making the code more readable.
+] ]
+]
+
+[endsect]
+
+[section Costs]
+
+Contract Programming benefits come to the cost of performance as discussed in detail by both __Stroustrup97__ and __Meyer97__.
+However, while performance trade-offs should be carefully considered depending on the specific application domain, software quality cannot be sacrificed (it is difficult to see the value of software that quickly and efficiently provides an incorrect result).
+
+The run-time performances are negatively impacted by Contract Programming mainly because of the following:
+
+# The extra processing required to check the assertions.
+# The extra processing required by the additional function calls (additional functions are invoked to check preconditions, postconditions, class invariants, etc).
+# The extra processing required to copy expression results when old values that are used in postconditions.
+
+To mitigate the run-time performance impact, programmers can selectively turn off some of the contract compilation and the related run-time checking.
+Programmers will have to decide based on the performance trade-offs required by their applications but a reasonable approach usually is to:
+
+* Always write contracts to clarify the semantics of the design embedding the specifications directly into the code and making the code self-documenting.
+* Enable preconditions, postconditions, and class invariants compilation and checking during initial testing.
+* Enable only preconditions (and possibly class invariants) during release testing and for the final release (see also [macroref CONTRACT_CONFIG_NO_PRECONDITIONS], [macroref CONTRACT_CONFIG_NO_POSTCONDITIONS], and [macroref CONTRACT_CONFIG_NO_CLASS_INVARIANTS]).
+
+This approach is usually reasonable because in well-tested production code, validating the function body implementation using postconditions and class invariants is rarely needed since the function has shown itself to be ["correct] during testing.
+On the other hand, checking function arguments using postconditions is always needed because of the evolution of the calling code.
+Furthermore, postconditions are usually computationally more expensive to check (see the __Assertion_Requirements__ section for a mechanism to selectively enable assertions also based on their computational complexity).
+
+Compile-time performances are also impacted by this library mainly because:
+
+# The contracts appear in class and function declarations (usually header files) so they have to be re-compiled for each translation unit.
+# The library implementation extensively uses preprocessor and template meta-programming which significantly stress compiler performances.
+
+[#compilation_time_warning_anchor]
+[warning
+Unfortunately, the current implementation of this library significantly slows down compilation.
+For example, for a project with 122 files and 15,471 lines of code, adding contracts to a total of 50 classes and 302 functions increased compilation time from 1 minute to 26 minutes when compilation was enabled for all contracts, and from 1 minute to 2 minutes when contracts were left in the code but contract compilation was disabled using this library configuration macros `CONTRACT_CONFIG_NO_...`.
+[footnote
+This library macros always need to expand to generate the class and function declarations even when contract compilation is disabled.
+That is why there is a compile-time overhead, even if significantly smaller, also when contracts are all disabled (in this case however there is zero run-time overhead).
+The compilation time overhead when all contracts are turned off could be further reduced by optimizing the library implementation to not include internal headers that are not required when contracts are off (this type of optimizations will be a major focus on future releases).
+]
+
+On compilers that support [@http://en.wikipedia.org/wiki/Precompiled_header pre-compiled headers] (GCC, MSVC, etc), these can be used to reduce re-compilation time.
+For example, re-compilation time of [link contract__.examples.__n1962___vector__comparison_with_c___proposed_syntax =vector.cpp=] from the __Examples__ section is reduced from 44 seconds to 24 seconds (55% faster) when its header [link contract__.examples.__n1962___vector__comparison_with_c___proposed_syntax =vector.hpp=] is pre-compiled (with all contracts enabled).
+[footnote
+There is essentially no gain in pre-compiling this library headers because most of the compilation time is taken by expanding and compiling this library macros as they appear in the user code (and not by the library implementation code itself).
+Furthermore, pre-compiled headers should be used with the usual care because they can complicate the build system and they introduce extra dependencies that might limit the amount of targets that can be built simultaneously in a parallel build.
+However, if properly used, pre-compiled headers can significantly reduce re-compilation time when using this library.
+]
+
+The authors have not done a detailed preprocessing-time and compile-time analysis of the performances of this library.
+Therefore, the authors have not yet tried to optimize this library compilation-time.
+Reducing compilation-time will be a major focus of future releases (see also [@https://sourceforge.net/apps/trac/contractpp/ticket/48 Ticket 48]).
+]
+
+Finally, Contract Programming should be seen as a tool to complement (and not to substitute) testing.
+
+[endsect]
+
+[section Free Function Calls]
+
+A /free function/
+[footnote
+In C++, a free function is any function that is not a member function.
+]
+call executes the following steps:
+
+# Check the function preconditions.
+# Execute the function body.
+# Check the function postconditions.
+
+[endsect]
+
+[section Member Function Calls]
+
+A member function call executes the following steps:
+
+# Check the static class invariants.
+# Check the non-static class invariants (in __logic_and__ with the base class invariants when subcontracting).
+These are checked only for non-static member functions.
+[footnote
+Static member functions cannot be virtual so they cannot be overridden and they do not subcontract.
+]
+Volatile member functions check volatile class invariants instead.
+# Check the function preconditions (in __logic_or__ with the overridden function preconditions when subcontracting).
+# Execute the function body.
+# Check the static class invariants (even if the body throws an exception).
+# Check the non-static class invariants (in __logic_and__ with the base class invariants when subcontracting).
+These are checked only for non-static member functions and even if the body throws an exception.
+Volatile member functions check volatile class invariants instead.
+# Check the function postconditions (in __logic_and__ with the overridden function postconditions when subcontracting).
+These are checked only if the body does not throw an exception.
+
+[#logic_and_anchor] [#logic_or_anchor]
+In this documentation __logic_and__ and __logic_or__ are the logic /and/ and /or/ operations evaluated in short-circuit:
+
+* `p` __logic_and__ `q` is true if and only if both `p` and `q` are true but `q` is evaluated only when `p` is true.
+* `p` __logic_or__ `q` is true if and only if either `p` or `q` is true but `q` is evaluated only when `p` is false.
+
+Class invariants are checked before preconditions and postconditions so that preconditions and postconditions assertions can be simplified by being programmed under the assumption that class invariants are satisfied (e.g., if class invariants assert that a pointer cannot be null then preconditions and postconditions can safety dereference the pointer without additional checking).
+Similarly, subcontracting checks contracts of base classes before checking the derived class contracts so that the base class contract can be programmed under the assumption that the base class contracts are satisfied.
+When a member function overrides more than one virtual base function because of multiple inheritance:
+
+* Class invariants are checked in __logic_and__ with the class invariants of all base classes following the inheritance order.
+* Preconditions are checked in __logic_or__ with the preconditions of all overridden functions following the inheritance order.
+* Postconditions are checked in __logic_and__ with the postconditions of all overridden functions following the inheritance order.
+
+Note that:
+
+* Preconditions and postconditions of static member functions cannot access the object.
+* Preconditions, postconditions, and volatile class invariants of volatile member functions access the object as (constant) volatile.
+
+[endsect]
+
+[section Constructor Calls]
+
+A constructor call executes the following steps:
+
+# Check the constructor preconditions.
+# Initialize base classes and members executing the constructor member initialization list if present.
+# Check the static class invariants (but not the non-static class invariants).
+# Execute the constructor body.
+# Check the static class invariants (even if the body throws an exception).
+# Check the non-static class invariants, but only if the body did not throw an exception.
+# Check the constructor postconditions, but only if the body did not throw an exception.
+
+Preconditions are checked before initializing base classes and members so that these initializations can relay on preconditions to be true (for example to validate constructor arguments before they are used to initialize member variables).
+C++ object construction mechanism will automatically check base class contracts when subcontracting.
+
+Note that:
+
+* Non-static class invariants are not checked at constructor entry (because there is no object before the constructor body is executed).
+* Preconditions cannot access the object (because there is no object before the constructor body is executed).
+* Postconditions cannot access the object old value (because there was no object before the constructor body was executed).
+* The object is never volatile within constructors so constructors do not check volatile class invariants.
+
+[endsect]
+
+[section Destructor Calls]
+
+A destructor call executes the following steps:
+
+# Check the static class invariants.
+# Check the non-static class invariants.
+# Execute the destructor body.
+# Check the static class invariants (even if the body throws an exception).
+[footnote
+For generality, this library does not require the destructor body to not throw exceptions.
+However, in order to comply with the STL exception safety requirements, destructors should never throw.
+]
+# Check the non-static class invariants, but only if the body threw an exception.
+
+C++ object destruction mechanism will automatically check base class contracts when subcontracting.
+
+Note that:
+
+* Destructors have no parameter and they can be called at any time after object construction so they have no preconditions.
+* After the destructor body is executed, the object no longer exists so non-static class invariants do not have to be true and they are not checked at destructor exit.
+* Destructors have no postconditions because they have no parameter and after the body execution there is no object.
+[footnote
+In theory, destructors could have static postconditions (i.e., postconditions that are not allowed to access the object which no longer exists after destruction).
+Still destructors shall never have preconditions because a destructor can be called at any point after the object is constructed as long the class invariants hold.
+None of the Contract Programming references that the authors have studied propose static postconditions for destructor (neither __N1962__ nor __Meyer97__, but __Eiffel__ has no static data member).
+Future revisions of this library might implement destructor static postconditions (e.g., a destructor postconditions of a class that counts object instances could assert that the instance counter stored in a static data member should be decreased of one because the object has been destructed, see also [@https://sourceforge.net/apps/trac/contractpp/ticket/41 Ticket 41]).
+]
+* The object is never volatile within destructors so destructors do not check volatile class invariants.
+
+[endsect]
+
+[section Constant-Correctness]
+
+Contracts are only responsible to check the program state in oder to ensure its compliance with the specifications.
+Therefore, contracts should not be able to modify the program state and exclusively "read-only" operations (or /queries/) should be used to program contracts.
+
+This library enforces this constraint at compile-time using C++ `const` qualifier.
+[footnote
+As usual in C++, constant-correctness can be enforced at compile-time only as long as programmers do not use `const_cast` and `mutable`.
+]
+Contracts only have access to the object, function arguments, and function return value via constant references `const&` or pointers `const*`.
+Other variables (static data members, global variables, etc) can be explicitly made constant using /constant assertions/ (see the __Advanced_Topics__ section).
+
+[endsect]
+
+[section Specification vs. Implementation]
+
+Contracts are part of the program specification and not of its implementation.
+Therefore, contracts should appear within C++ declarations and not within definitions.
+[footnote
+This is a major conceptual difference with respect to [@http://en.wikipedia.org/wiki/Defensive_programming Defensive Programming] and using `assert` because they program assertions within the function body instead that with the function declaration.
+]
+
+Contracts are most useful when they assert conditions only using public members.
+For example, the caller of a member function cannot in general make sure that the member function preconditions are satisfied if these preconditions use private members that are not accessible by the caller.
+Therefore, a failure in the preconditions will not necessarily indicate a bug in the caller given that the caller was not able to fully check the preconditions before calling the member function.
+In most cases, the need of using non-public members to check contracts indicates an error in the design of the class.
+However, given that C++ provides programmers ways around access level restrictions (e.g., `friend` and function pointers), this library leaves it up to the programmers to make sure that only public members are used in contract assertions (__N1962__ follows the same approach not forcing contracts to only use public members, __Eiffel__ instead generates a compiler error if preconditions use non-public members).
+[footnote
+*Rationale.*
+In theory, if C++ [@http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#45 defect 45] were not fixed, this library could have generated a compile-time error for preconditions that use non-public members.
+]
+
+Finally, only public member functions shall check class invariants.
+Private and protected member functions are allowed to brake class invariants because private and protected member are part of the class implementation and not of its specification.
+
+[endsect]
+
+[section Broken Contracts]
+
+After programmers specify contracts, this library automatically checks preconditions, postconditions, class invariants, block invariants, and loop variants at run-time.
+If a precondition, postcondition, class invariant, block invariants, or loop variant is checked to be false or throws an exception then the library invokes the [funcref contract::precondition_broken], [funcref contract::postcondition_broken], [funcref contract::class_invariant_broken_on_entry] or [funcref contract::class_invariant_broken_on_exit] or [funcref contract::class_invariant_broken_on_throw], [funcref contract::block_invariant_broken], and [funcref contract::loop_variant_broken] function respectively.
+
+These function invoke `std::terminate()` by default but programmers can redefine them to take a different action (throw an exception, exit the program, etc) using [funcref contract::set_precondition_broken], [funcref contract::set_postcondition_broken], [funcref contract::set_class_invariant_broken], [funcref contract::set_block_invariant_broken], and [funcref contract::set_loop_variant_broken] (this mechanism is similar to the one of C++'s `std::terminate()`).
+See the __Contract_Broken_Handlers__ section for an example.
+
+[endsect]
+
+[section Features]
+
+The design of this library was largely based on __N1962__ and on the __Eiffel__ programming language as specified by __Meyer97__.
+The following table compares features between this library, the proposal for adding Contract Programming to the C++ standard __N1962__, the __Eiffel__ programming language __Meyer97__, and the __D__ programming language __Bright04__.
+
+[table
+[
+ [Feature]
+ [This Library (C++03)]
+ [\[N1962\] Proposal (not part of C++)]
+ [ISE Eiffel 5.4]
+ [D]
+][
+ [['Keywords and Specifiers]]
+ [`precondition`, `postcondition`, `extends`, `initialize`, `requires`, `in`, `out`, `deduce`, `comma` (these are specifiers and not keywords, they have special meaning only in specific positions within the declarations passed to this library macros)]
+ [`invariant`, `precondition`, `postcondition`, `oldof`]
+ [=invariant=, =require=, =ensure=, =do=, =require else=, =ensure then=, =old=, =result=, =variant=]
+ [=invariant=, =in=, =out=, =assert=, =static=]
+][
+ [['On contract failure]]
+ [Default to `std::terminate()` (but can be customized to exit, abort, throw exceptions, etc).]
+ [Default to `std::terminate()` (but can be customized to exit, abort, throw exceptions, etc).]
+ [Throw exceptions]
+ [Throw exceptions]
+][
+ [['Result value in postconditions]]
+ [Yes, `auto `[^['result-variable-name]]` = return`.]
+ [Yes, `postcondition (`[^['result-variable-name]]`)`.]
+ [Yes, =result= keyword.]
+ [No.]
+][
+ [['Old values in postconditions]]
+ [Yes, `auto `[^['old-variable-name]]` = CONTRACT_OLDOF `[^['oldof-expression]].]
+ [Yes, `oldof `[^['oldof-expression]].]
+ [Yes, [^old ['old-expression]].]
+ [No.]
+][
+ [['Subcontracting]]
+ [Yes, also support multiple base contracts for multiple inheritance (can force preconditions to be specified only by base classes using [macroref CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS]).]
+ [Yes, also support multiple base contracts but only base classes can specify preconditions.]
+ [Yes.]
+ [Yes.]
+][
+ [['Contracts for pure virtual functions]]
+ [Yes.]
+ [Yes.]
+ [Yes (contracts for abstract functions).]
+ [No (but planned).]
+][
+ [['Arbitrary code in contracts]]
+ [No, assertions only.]
+ [No, assertions only.]
+ [No, assertions only plus preconditions can only access public members.]
+ [Yes.]
+][
+ [['Constant-correct]]
+ [Yes.]
+ [Yes.]
+ [Yes.]
+ [No.]
+][
+ [['Function code ordering]]
+ [Preconditions, postconditions, body.]
+ [Preconditions, postconditions, body.]
+ [Preconditions, body, postconditions.]
+ [Preconditions, postconditions, body.]
+][
+ [['Static assertions]]
+ [Yes, can use `static_assert` (internally implemented using `BOOST_MPL_ASSERT_MSG`, no __CXX11__ required).]
+ [Yes, can use __CXX11__ `static_assert`.]
+ [No.]
+ [Yes.]
+][
+ [['Block invariants]]
+ [Yes, [macroref CONTRACT_BLOCK_INVARIANT].]
+ [Yes, `invariant`.]
+ [Yes (`check` instruction and loop invariants).]
+ [No (just `assert`).]
+][
+ [['Loop variants]]
+ [Yes, [macroref CONTRACT_LOOP_VARIANT].]
+ [No.]
+ [Yes.]
+ [No.]
+][
+ [['Disable assertion checking within assertions checking]]
+ [
+ Yes (use [macroref CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION] for preconditions to disable no assertion).
+ Use [macroref CONTRACT_CONFIG_THREAD_SAFE] to make the implementation of this feature thread-safe in multi-threaded programs (but it will introduce a global lock).
+ ]
+ [Yes for class invariants and postconditions but preconditions disable no assertion.]
+ [Yes.]
+ [No.]
+][
+ [['Assertion requirements]]
+ [Yes (compilation and run-time checking of single assertions can be disabled when specific assertion requirements are not met).]
+ [No.]
+ [No (but all types are __CopyConstructible__, __Assignable__, and __EqualityComparable__ in __Eiffel__ so there is not a real need for this).]
+ [No.]
+][
+ [['Nested member function calls]]
+ [
+ Disable nothing.
+ [footnote
+ *Rationale.*
+ Older versions of this library automatically defined a data member used to disable checking of class invariants within member function calls.
+ However, this feature, which was required by older revisions of __N1962__, is no longer required by __N1962__, it complicates the implementation, and in multi-thread programs would introduce a lock that synchronizes all member functions calls for a given object so it was removed in the current revision of the library.
+ ]
+ ]
+ [Disable nothing.]
+ [Disable all checks.]
+ [Disable nothing.]
+][
+ [['Non-static class invariants checking]]
+ [
+ At constructor exit, at destructor entry, and at public member function entry, exit, and on throw (but only if programmers declare these functions using this library macros).
+ Same for volatile class invariants.]
+ [At constructor exit, at destructor entry, and at public member function entry, exit, and on throw (volatile class invariants not supported).]
+ [At constructor exit, and around public member functions.]
+ [At constructor exit, at destructor entry, an around public member functions.]
+][
+ [['Static class invariants checking]]
+ [At entry and exit of any (also static) member function, constructor, and destructor.]
+ [No.]
+ [No (but __Eiffel__ does not have static members).]
+ [No.]
+][
+ [['Removable from object code]]
+ [Yes, using any combination of [macroref CONTRACT_CONFIG_NO_PRECONDITIONS], [macroref CONTRACT_CONFIG_NO_POSTCONDITIONS], [macroref CONTRACT_CONFIG_NO_CLASS_INVARIANTS], [macroref CONTRACT_CONFIG_NO_BLOCK_INVARIANTS], and [macroref CONTRACT_CONFIG_NO_LOOP_VARIANTS].]
+ [Yes.]
+ [Yes (but predefined combinations only).]
+ [Yes.]
+]
+]
+
+Contract Programming is also provided by the following references.
+
+[table
+[ [Reference] [Language] [Notes] ]
+[ [__Bright04b__] [C++] [
+The Digital Mars C++ compiler extends C++ adding Contract Programming language support (among many other features).
+] ]
+[ [__Lindrud04__] [C++] [
+This supports class invariants and old values but it does not support subcontracting, contracts are specified within definitions instead of declarations, assertions are not constant-correct (unfortunately, these missing features are all essential to Contract Programming).
+] ]
+[ [__Tandin04__] [C++] [
+Interestingly, these contract macros automatically generate __Doxygen__ documentation
+[footnote
+*Rationale.*
+Older versions of this library used to automatically generate __Doxygen__ documentation from the contract macros.
+This functionality was abandoned for a number of reasons: this library macros became too complex and the __Doxygen__ preprocessor is no longer able to expand them; the __Doxygen__ documentation was just a repeat of the contract code (so programmers can directly look at contracts in the header files), __Doxygen__ might not necessarily be the documentation tool chosen by all programmers.
+]
+but old values, class invariants, and subcontracting are not supported plus contracts are specified within definitions instead of declarations (unfortunately, these missing features are all essential to Contract Programming).
+] ]
+[ [__Maley99__] [C++] [
+This supports Contract Programming including subcontracting but with some limitations (e.g., programmers need to manually build an inheritance tree using artificial template parameters), it does not use macros so programmers are required to write by hand a significant amount of boiler-plate code.
+(The authors have found this work very inspiring when they started to develop this library.)
+] ]
+[ [__C2__] [C++] [
+This uses an external preprocessing tool (the authors could no longer find this project code-base to evaluate it).
+] ]
+[ [__iContract__] [Java] [
+This uses an external preprocessing tool.
+] ]
+[ [__Jcontract__] [Java] [
+This uses an external preprocessing tool.
+] ]
+[ [__CodeContracts__] [.NET] [
+Microsoft Contract Programming for .NET programming languages.
+] ]
+[ [__SpecSharp__] [C#] [
+This is a C# extension with Contract Programming language support.
+] ]
+[ [__Chrome02__] [Object Pascal] [
+This is the .NET version of Object Pascal and it has language support for Contract Programming.
+] ]
+[ [__SPARKAda__] [Ada] [
+This is an Ada-like programming language with Contract Programming support.
+] ]
+]
+
+Typically, preprocessing tools external to the language work by transforming specially formatted code comments into contract code that is then checked at run-time.
+One of this library primary goals was to support Contract Programming entirely within C++ and without using any tool external to the standard language (C++ macros were used instead of external preprocessing tools).
+
+To the authors' knowledge, this the only library that fully support Contract Programming for C++ (see the __Bibliography__ section for the complete list of Contract Programming references studied by the authors).
+
+[endsect]
+
+[endsect]
+

Added: sandbox/contract/doc/contractpp.qbk
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/contractpp.qbk 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,137 @@
+
+[/ Copyright (C) 2008-2012 Lorenzo Caminiti ]
+[/ Distributed under the Boost Software License, Version 1.0 ]
+[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
+[/ http://www.boost.org/LICENSE_1_0.txt) ]
+[/ Home at http://sourceforge.net/projects/contractpp ]
+
+[library Contract++
+ [quickbook 1.5]
+ [version 0.4.1]
+ [authors [Caminiti <email>lorcaminiti_at_[hidden]</email>, Lorenzo]]
+ [copyright 2008-2012 Lorenzo Caminiti]
+ [license Distributed under the Boost Software License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at [@http://www.boost.org/LICENSE_1_0.txt])]
+ [/ purpose Contract Programming for C++]
+ [/ category Correctness and Testing]
+]
+
+[template file[dir name] '''<ulink url="../../'''[dir]'''/'''[name]'''">'''[^[name]]'''</ulink>''']
+
+[def __CXX03__ [@http://en.wikipedia.org/wiki/C%2B%2B C++03]]
+[def __CXX11__ [@http://en.wikipedia.org/wiki/C%2B%2B11 C++11]]
+[def __C99__ [@http://en.wikipedia.org/wiki/C99 C99]]
+[def __Java__ [@http://en.wikipedia.org/wiki/Java_(programming_language) Java]]
+[def __Ada__ [@http://en.wikipedia.org/wiki/Ada_(programming_language) Ada]]
+[def __Python__ [@http://www.python.org/ Python]]
+[def __Eiffel__ [@http://en.wikipedia.org/wiki/Eiffel_(programming_language) Eiffel]]
+[def __D__ [@http://dlang.org D]]
+[def __substitution_principle__ [@http://en.wikipedia.org/wiki/Liskov_substitution_principle substitution principle]]
+[def __Doxygen__ [@http://www.doxygen.org Doxygen]]
+[def __SFINAE__ [@http://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error SFINAE]]
+
+[def __Boost__ [@http://www.boost.org Boost]]
+[def __Boost_ConceptCheck__ [@http://www.boost.org/doc/libs/release/libs/concept_check Boost.ConceptCheck]]
+[def __Boost_Config__ [@http://www.boost.org/doc/libs/release/libs/config Boost.Config]]
+[def __Boost_Foreach__ [@http://www.boost.org/doc/libs/release/libs/foreach Boost.Foreach]]
+[def __Boost_Function__ [@http://www.boost.org/doc/libs/release/libs/function Boost.Function]]
+[def __Boost_Graph__ [@http://www.boost.org/doc/libs/release/libs/graph Boost.Graph]]
+[def __Boost_Jam__ [@http://www.boost.org/doc/libs/release/doc/html/jam.html Boost.Jam]]
+[def __Boost_LocalFunction__ [@http://www.boost.org/doc/libs/release/libs/local_function Boost.LocalFunction]]
+[def __Boost_MPL__ [@http://www.boost.org/doc/libs/release/libs/mpl Boost.MPL]]
+[def __Boost_Parameter__ [@http://www.boost.org/doc/libs/release/libs/parameter Boost.Parameter]]
+[def __Boost_Phoenix__ [@http://www.boost.org/doc/libs/release/libs/phoenix Boost.Phoenix]]
+[def __Boost_Preprocessor__ [@http://www.boost.org/doc/libs/release/libs/preprocessor Boost.Preprocessor]]
+[def __Boost_Python__ [@http://www.boost.org/doc/libs/release/libs/python Boost.Python]]
+[def __Boost_Typeof__ [@http://www.boost.org/doc/libs/release/libs/typeof Boost.Typeof]]
+[def __Boost_TypeTraits__ [@http://www.boost.org/doc/libs/release/libs/type_traits Boost.TypeTraits]]
+[def __Boost_Utility_IdentityType__ [@http://www.boost.org/doc/libs/release/libs/utility/identity_type Boost.Utility/IdentityType]]
+
+[def __Bright04__ [link Bright04_anchor \[Bright04\]]]
+[def __Bright04b__ [link Bright04b_anchor \[Bright04b\]]]
+[def __C2__ [link C2_anchor \[C2\]]]
+[def __Chrome02__ [link Chrome02_anchor \[Chrome02\]]]
+[def __Cline90__ [link Cline90_anchor \[Cline90\]]]
+[def __CodeContracts__ [link CodeContracts_anchor \[CodeContracts\]]]
+[def __iContract__ [link iContract_anchor \[iContract\]]]
+[def __Hoare73__ [link Hoare73_anchor \[Hoare73\]]]
+[def __Jcontract__ [link Jcontract_anchor \[Jcontract\]]]
+[def __Lindrud04__ [link Lindrud04_anchor \[Lindrud04\]]]
+[def __Maley99__ [link Maley99_anchor \[Maley99\]]]
+[def __Meyer97__ [link Meyer97_anchor \[Meyer97\]]]
+[def __Mitchell02__ [link Mitchell02_anchor \[Mitchell02\]]]
+[def __N1613__ [link N1613_anchor \[N1613\]]]
+[def __N1866__ [link N1866_anchor \[N1866\]]]
+[def __N1962__ [link N1962_anchor \[N1962\]]]
+[def __N2081__ [link N2081_anchor \[N2081\]]]
+[def __N2914__ [link N2914_anchor \[N2914\]]]
+[def __SPARKAda__ [link SPARKAda_anchor \[SPARKAda\]]]
+[def __SpecSharp__ [link SpecSharp_anchor \[SpecSharp\]]]
+[def __Stroustrup97__ [link Stroustrup97_anchor \[Stroustrup97\]]]
+[def __Stroustrup94__ [link Stroustrup94_anchor \[Stroustrup94\]]]
+[def __Tandin04__ [link Tandin04_anchor \[Tandin04\]]]
+
+[def __Introduction__ [link contract__.introduction Introduction]]
+[def __Full_Table_of_Contents__ [link contract__.full_table_of_contents Full Table of Contents]]
+[def __Getting_Started__ [link contract__.getting_started Getting Started]]
+[def __Contract_Programming_Overview__ [link contract__.contract_programming_overview Contract Programming Overview]]
+[def __Costs__ [link contract__.contract_programming_overview.costs Costs]]
+[def __Free_Function_Calls__ [link contract__.contract_programming_overview.free_function_calls Free Function Calls]]
+[def __Member_Function_Calls__ [link contract__.contract_programming_overview.member_function_calls Member Function Calls]]
+[def __Constructor_Calls__ [link contract__.contract_programming_overview.constructor_calls Constructor Calls]]
+[def __Destructor_Calls__ [link contract__.contract_programming_overview.destructor_calls Destructor Calls]]
+[def __Constant_Correctness__ [link contract__.contract_programming_overview.constant_correctness Constant-Correctness]]
+[def __Specification_vs__Implementation__ [link contract__.contract_programming_overview.specification_vs__implementation Specification vs. Implementation]]
+[def __Broken_Contracts__ [link contract__.contract_programming_overview.broken_contracts Broken Contracts]]
+[def __Features__ [link contract__.contract_programming_overview.features Features]]
+[def __Tutorial__ [link contract__.tutorial Tutorial]]
+[def __Forward_Declarations_and_Body_Definitions__ [link contract__.tutorial.forward_declarations_and_body_definitions Forward Declarations and Body Definitions]]
+[def __Advanced_Topics__ [link contract__.advanced_topics Advanced Topics]]
+[def __Assertion_Requirements__ [link contract__.advanced_topics.assertion_requirements Assertion Requirements]]
+[def __Contract_Broken_Handlers__ [link contract__.advanced_topics.contract_broken_handlers__throw_on_failure_ Contract Broken Handlers]]
+[def __Virtual_Specifiers__ [link contract__.virtual_specifiers Virtual Specifiers]]
+[def __Concepts__ [link contract__.concepts Concepts]]
+[def __Named_Parameters__ [link contract__.named_parameters Named Parameters]]
+[def __Parameter_Identifiers__ [link contract__.named_parameters.parameter_identifiers Parameter Identifiers]]
+[def __Examples__ [link contract__.examples Examples]]
+[def __Grammar__ [link contract__.grammar Grammar]]
+[def __Differences_with_CXX_Syntax__ [link contract__.grammar.differences_with_c___syntax Differences with C++ Syntax]]
+[def __No_Variadic_Macros__ [link contract__.no_variadic_macros No Variadic Macros]]
+[def __Reference__ [link contract__.reference Reference]]
+[def __Bibliography__ [link contract__.bibliography Bibliography]]
+[def __Release_Notes__ [link contract__.release_notes Release Notes]]
+[def __Acknowledgments__ [link contract__.acknowledgments Acknowledgments]]
+
+[def __logic_and__ [link logic_and_anchor logic-and]]
+[def __logic_or__ [link logic_or_anchor logic-or]]
+[def __Assignable__ [@http://www.boost.org/doc/libs/release/libs/utility/Assignable.html [^Assignable]]]
+[def __ConstantCopyConstructible__ [link contract__.advanced_topics.old_and_result_value_copies [^ConstantCopyConstructible]]]
+[def __CopyConstructible__ [@http://www.boost.org/doc/libs/release/libs/utility/CopyConstructible.html [^CopyConstructible]]]
+[def __DefaultConstructible__ [@http://www.sgi.com/tech/stl/DefaultConstructible.html [^DefaultConstructible]]]
+[def __EqualityComparable__ [@http://www.sgi.com/tech/stl/EqualityComparable.html [^EqualityComparable]]]
+[def __InputIterator__ [@http://www.sgi.com/tech/stl/InputIterator.html [^InputIterator]]]
+
+[:['["Our field needs more formality, but the profession has not realized it yet.]]]
+[:['-- Bertrand Meyer (see __Meyer97__ page 400)]]
+
+This library implements Contract Programming for the C++ programming language.
+In addition, the library implements virtual specifiers (`final`, `override`, and `new`, see __CXX11__), concept checking, and named parameters.
+
+Consult this documentation in [@index.html HTML] or [@contractpp.pdf PDF] format.
+
+[include introduction.qbk]
+[include full_table_of_contents.qbk]
+[include getting_started.qbk]
+[include contract_programming_overview.qbk]
+[include tutorial.qbk]
+[include advanced_topics.qbk]
+[include virtual_specifiers.qbk]
+[include concepts.qbk]
+[include named_parameters.qbk]
+[include examples.qbk]
+[include grammar.qbk]
+[include no_variadic_macros.qbk]
+[xinclude reference.xml]
+[include release_notes.qbk]
+[include bibliography.qbk]
+[include acknowledgments.qbk]
+

Added: sandbox/contract/doc/examples.qbk
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/examples.qbk 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,318 @@
+
+[/ Copyright (C) 2008-2012 Lorenzo Caminiti ]
+[/ Distributed under the Boost Software License, Version 1.0 ]
+[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
+[/ http://www.boost.org/LICENSE_1_0.txt) ]
+[/ Home at http://sourceforge.net/projects/contractpp ]
+
+[section Examples]
+
+This section lists non-trivial examples programmed using this library.
+The listed examples are taken from the foloowing sources (which are referenced in the title of each example).
+
+[table
+[ [Sources] [Notes] ]
+[ [__N1962__] [
+Examples from the proposal to add Contract Programming to __CXX11__ submitted to the standard committee (unfortunately, this proposal was never accepted into the standard).
+] ]
+[ [__N2081__] [
+Examples from the proposal to add concepts to __CXX11__ submitted to the standard committee (unfortunately, this proposal was never accepted into the standard).
+These examples have been extended to specify both concepts and contracts.
+] ]
+[ [__Meyer97__ __Mitchell02__] [
+Examples using the __Eiffel__ programming language and reprogrammed using this library for C++.
+] ]
+[ [__Cline90__] [
+Examples from a very early proposal called Annotated C++ (A++) to add Contract Programming to C++ (A++ was never implemented or proposed for addition to the standard).
+] ]
+[ [__Stroustrup97__] [
+One example that shows the importance of class invariants and how to configure this library to throw exceptions instead of terminating the program when contracts are broken.
+] ]
+]
+
+The followings are among the most interesting examples:
+
+[table
+[ [Key Example] [Topic] ]
+[ [[link contract__.examples.__n1962___vector__comparison_with_c___proposed_syntax \[N1962\] Vector]] [
+A comparison between this library syntax and the syntax for contract and concept checking proposed by __N1962__ and __N2081__ respectively.
+] ]
+[ [[link contract__.examples.__n2081___add__generic_addition_algorithm \[N2081\] Add]] [
+Contracts and user-defined concepts.
+] ]
+[ [[link contract__.examples.__mitchell02___counter__subcontracting_and_virtual_specifiers__final__override__new__and_pure_virtual_ \[Mitchell02\] Counter]] [
+Subcontracting and __CXX11__-like virtual specifiers `final`, `override`, `new`, and pure virtual.
+] ]
+[ [[link contract__.examples.__meyer97___stack4__comparison_with_eiffel_syntax \[Meyer97\] Stack4]] [
+A comparison between this library and __Eiffel__ syntax for preconditions, postconditions, and class invariants.
+] ]
+[ [[link contract__.examples.__meyer97___gcd__loop_variants_and_invariants_plus_comparison_with_eiffel_syntax \[Meyer97\] GCD]] [
+A comparison between this library and __Eiffel__ syntax for loop variants and block invariants.
+] ]
+[ [[link contract__.examples.__cline90___vector__comparison_with_a___proposed_syntax \[Cline90\] Vector]] [
+A comparison between this library and A++ syntax.
+] ]
+]
+
+[section \[N1962\] Vector: Comparison with C++ proposed syntax]
+[import ../example/n1962/vector.hpp]
+[import ../example/n1962/vector.cpp]
+[import ../example/n1962/vector_npaper.hpp]
+[table
+ [ [This Library (C++03)] [\[N1962\] and \[N2081\] Proposals (not part of C++)] ]
+ [ [[n1962_vector]] [[n1962_vector_npaper]] ]
+ [ [[n1962_vector_main]] [] ]
+]
+[endsect]
+
+[section \[N1962\] Circle: Subcontracting]
+[import ../example/n1962/circle.cpp]
+[n1962_circle]
+[endsect]
+
+[section \[N1962\] Factorial: Recursion and assertion computational complexity]
+[import ../example/n1962/factorial.cpp]
+[n1962_factorial]
+[endsect]
+
+[section \[N1962\] Equal: Operators]
+[import ../example/n1962/equal.hpp]
+[n1962_equal_header]
+[import ../example/n1962/equal_not.hpp]
+[n1962_equal_not_header]
+[import ../example/n1962/equal_main.cpp]
+[n1962_equal_main]
+[endsect]
+
+[section \[N1962\] Sum: Separated body definitions]
+[import ../example/n1962/sum.hpp]
+[n1962_sum_header]
+[import ../example/n1962/sum.cpp]
+[n1962_sum]
+[import ../example/n1962/sum_main.cpp]
+[n1962_sum_main]
+[endsect]
+
+[section \[N1962\] Square Root: Default parameters and comparison with D syntax]
+[import ../example/n1962/sqrt.cpp]
+[import ../example/n1962/sqrt.d]
+[table
+ [ [This Library (C++03)] [The D Programming Language] ]
+ [ [[n1962_sqrt]] [[n1962_sqrt_d]] ]
+]
+[endsect]
+
+[section \[N1962\] Block: Block invariants]
+[import ../example/n1962/block_invariant.cpp]
+[n1962_block_invariant]
+[endsect]
+
+[section \[N2081\] Add: Generic addition algorithm]
+[import ../example/n2081/add.hpp]
+[n2081_add_header]
+[import ../example/n2081/add.cpp]
+[n2081_add]
+[import ../example/n2081/add_error.cpp]
+[n2081_add_error]
+[endsect]
+
+[section \[N2081\] Advance: Concept-based iterator overloading (emulated using tags)]
+[import ../example/n2081/advance.cpp]
+[n2081_advance]
+[endsect]
+
+[section \[N2081\] Find: Generic find algorithm]
+[import ../example/n2081/find.hpp]
+[n2081_find_header]
+[import ../example/n2081/find.cpp]
+[n2081_find]
+[import ../example/n2081/find_error.cpp]
+[n2081_find_error]
+[endsect]
+
+[section \[N2081\] Apply: Overloaded invocation of functors]
+[import ../example/n2081/apply.cpp]
+[n2081_apply]
+[endsect]
+
+[section \[N2081\] For Each: Generic for-each algorithm]
+[import ../example/n2081/for_each.cpp]
+[n2081_for_each]
+[endsect]
+
+[section \[N2081\] Transform: Generic binary transformation algorithm]
+[import ../example/n2081/transform.cpp]
+[n2081_transform]
+[endsect]
+
+[section \[N2081\] Count: Generic counting algorithm]
+[import ../example/n2081/count.cpp]
+[n2081_count]
+[endsect]
+
+[section \[N2081\] Convert: Conversion between two types]
+[import ../example/n2081/convert.hpp]
+[n2081_convert_header]
+[import ../example/n2081/convert.cpp]
+[n2081_convert]
+[import ../example/n2081/convert_error.cpp]
+[n2081_convert_error]
+[endsect]
+
+[section \[N2081\] Equal: Generic equality comparison]
+[import ../example/n2081/equal.hpp]
+[n2081_equal_header]
+[import ../example/n2081/equal.cpp]
+[n2081_equal]
+[import ../example/n2081/equal_error.cpp]
+[n2081_equal_error]
+[endsect]
+
+[section \[N2081\] Less Equal: Generic less-than or equal-to comparison]
+[import ../example/n2081/less_eq.cpp]
+[n2081_less_eq]
+[endsect]
+
+[section \[N2081\] De-Ref: Generic iterator dereferencing]
+[import ../example/n2081/deref.cpp]
+[n2081_deref]
+[endsect]
+
+[section \[N2081\] Min: Generic minimum algorithm]
+[import ../example/n2081/min.hpp]
+[n2081_min_header]
+[import ../example/n2081/min.cpp]
+[n2081_min]
+[import ../example/n2081/min_error.cpp]
+[n2081_min_error]
+[endsect]
+
+[section \[Meyer97\] Stack4: Comparison with Eiffel syntax]
+[import ../example/meyer97/stack4.hpp]
+[import ../example/meyer97/stack4_main.cpp]
+[import ../example/meyer97/stack4.e]
+[table
+ [ [This Library (C++03)] [The Eiffel Programming Language] ]
+ [ [[meyer97_stack4_header]] [[meyer97_stack4_e]] ]
+ [ [[meyer97_stack4_main]] [] ]
+]
+[endsect]
+
+[section \[Meyer97\] Stack3: Error codes instead of preconditions]
+[import ../example/meyer97/stack3.cpp]
+[meyer97_stack3]
+[endsect]
+
+[section \[Meyer97\] GCD: Loop variants and invariants plus comparison with Eiffel syntax]
+[import ../example/meyer97/gcd.cpp]
+[import ../example/meyer97/gcd.e]
+[table
+ [ [This Library (C++03)] [The Eiffel Programming Language] ]
+ [ [[meyer97_gcd]] [[teletype] [meyer97_gcd_e] [c++]] ]
+]
+[endsect]
+
+[section \[Meyer97\] Max-Array: Nested loop variants and invariants]
+[import ../example/meyer97/maxarray.cpp]
+[meyer97_maxarray]
+[endsect]
+
+[section \[Mitchell02\] Name List: Relaxed subcontracts]
+[import ../example/mitchell02/name_list.hpp]
+[mitchell02_name_list_header]
+[import ../example/mitchell02/name_list.cpp]
+[mitchell02_name_list]
+[import ../example/mitchell02/name_list_main.cpp]
+[mitchell02_name_list_main]
+[endsect]
+
+[section \[Mitchell02\] Dictionary: Simple key-value map]
+[import ../example/mitchell02/dictionary.cpp]
+[mitchell02_dictionary]
+[endsect]
+
+[section \[Mitchell02\] Courier: Subcontracting and static class invariants]
+[import ../example/mitchell02/courier.hpp]
+[mitchell02_courier_header]
+[import ../example/mitchell02/courier.cpp]
+[mitchell02_courier]
+[import ../example/mitchell02/courier_main.cpp]
+[mitchell02_courier_main]
+[endsect]
+
+[section \[Mitchell02\] Stack: Simple stack dispenser]
+[import ../example/mitchell02/stack.cpp]
+[mitchell02_stack]
+[endsect]
+
+[section \[Mitchell02\] Simple Queue: Simple queue dispenser]
+[import ../example/mitchell02/simple_queue.cpp]
+[mitchell02_simple_queue]
+[endsect]
+
+[section \[Mitchell02\] Customer Manager: Contracts instead of Defensive Programming]
+[import ../example/mitchell02/customer_manager.hpp]
+[mitchell02_customer_manager_header]
+[import ../example/mitchell02/customer_manager.cpp]
+[mitchell02_customer_manager]
+[import ../example/mitchell02/customer_manager_main.cpp]
+[mitchell02_customer_manager_main]
+[endsect]
+
+[section \[Mitchell02\] Observer: Contracts for pure virtual functions]
+[import ../example/mitchell02/observer/observer.hpp]
+[mitchell02_observer_header]
+[import ../example/mitchell02/observer/subject.hpp]
+[mitchell02_subject_header]
+[import ../example/mitchell02/observer_main.cpp]
+[mitchell02_observer_main]
+[endsect]
+
+[section \[Mitchell02\] Counter: Subcontracting and virtual specifiers (final, override, new, and pure virtual)]
+[import ../example/mitchell02/counter/push_button.hpp]
+[mitchell02_push_button_header]
+[import ../example/mitchell02/counter/decrement_button.hpp]
+[mitchell02_decrement_button_header]
+[import ../example/mitchell02/counter/counter.hpp]
+[mitchell02_counter_header]
+[import ../example/mitchell02/counter_main.cpp]
+[mitchell02_counter_main]
+[endsect]
+
+[section \[Stroustrup97\] String: Throw when contract is broken]
+[import ../example/stroustrup97/string.hpp]
+[stroustrup97_string_header]
+[import ../example/stroustrup97/string.cpp]
+[stroustrup97_string]
+[import ../example/stroustrup97/string_main.cpp]
+[stroustrup97_string_main]
+[endsect]
+
+[section \[Cline90\] Vector: Comparison with A++ proposed syntax]
+[import ../example/cline90/vector.hpp]
+[import ../example/cline90/vector_main.cpp]
+[import ../example/cline90/vector_app.hpp]
+[table
+ [ [This Library (C++03)] [A++ Proposal (not part of C++)] ]
+ [ [[cline90_vector_header]] [[cline90_vector_app_header]] ]
+ [ [[cline90_vector_main]] [] ]
+]
+[endsect]
+
+[section \[Cline90\] Stack: Function-Try blocks and exception specifications]
+[import ../example/cline90/stack.cpp]
+[cline90_stack]
+[endsect]
+
+[section \[Cline90\] Vector-Stack: Subcontracting from Abstract Data Type (ADT)]
+[import ../example/cline90/vstack.cpp]
+[cline90_vstack]
+[endsect]
+
+[section \[Cline90\] Calendar: A very simple calendar]
+[import ../example/cline90/calendar.cpp]
+[cline90_calendar]
+[endsect]
+
+[endsect]
+

Added: sandbox/contract/doc/full_table_of_contents.qbk
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/full_table_of_contents.qbk 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,248 @@
+
+[/ Copyright (C) 2008-2012 Lorenzo Caminiti ]
+[/ Distributed under the Boost Software License, Version 1.0 ]
+[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
+[/ http://www.boost.org/LICENSE_1_0.txt) ]
+[/ Home at http://sourceforge.net/projects/contractpp ]
+
+[section Full Table of Contents]
+
+[link contract__.introduction Introduction]
+
+[link contract__.full_table_of_contents Full Table Of Contents]
+
+[link contract__.getting_started Getting Started]
+[:
+ [link contract__.getting_started.this_documentation This Documentation] [br]
+ [link contract__.getting_started.compilers_and_platforms Compilers and Platforms] [br]
+ [link contract__.getting_started.installation Installation] [br]
+ [link contract__.getting_started.disable_contract_compilation Disable Contract Compilation] [br]
+]
+
+[link contract__.contract_programming_overview Contract Programming Overview]
+[:
+ [link contract__.contract_programming_overview.assertions Assertions] [br]
+ [link contract__.contract_programming_overview.benefits Benefits] [br]
+ [link contract__.contract_programming_overview.costs Costs] [br]
+ [link contract__.contract_programming_overview.free_function_calls Free Function Calls] [br]
+ [link contract__.contract_programming_overview.member_function_calls Member Function Calls] [br]
+ [link contract__.contract_programming_overview.constructor_calls Constructor Calls] [br]
+ [link contract__.contract_programming_overview.destructor_calls Destructor Calls] [br]
+ [link contract__.contract_programming_overview.constant_correctness Constant-Correctness] [br]
+ [link contract__.contract_programming_overview.specification_vs__implementation Specification vs. Implementation] [br]
+ [link contract__.contract_programming_overview.broken_contracts Broken Contracts] [br]
+ [link contract__.contract_programming_overview.features Features] [br]
+]
+
+[link contract__.tutorial Tutorial]
+[:
+ [link contract__.tutorial.free_functions Free Functions] [br]
+ [link contract__.tutorial.preconditions Preconditions] [br]
+ [link contract__.tutorial.postconditions__result_and_old_values_ Postconditions (Result and Old Values)] [br]
+ [link contract__.tutorial.classes_and_class_invariants Classes and Class Invariants] [br]
+ [link contract__.tutorial.constructors Constructors] [br]
+ [link contract__.tutorial.destructors Destructors] [br]
+ [link contract__.tutorial.member_functions Member Functions] [br]
+ [link contract__.tutorial.inheritance_and_subcontracting Inheritance and Subcontracting] [br]
+ [link contract__.tutorial.class_templates Class Templates] [br]
+ [link contract__.tutorial.function_templates Function Templates] [br]
+ [link contract__.tutorial.forward_declarations_and_body_definitions Forward Declarations and Body Definitions] [br]
+]
+
+[link contract__.advanced_topics Advanced Topics]
+[:
+ [link contract__.advanced_topics.commas_and_leading_symbols_in_macros Commas and Leading Symbols in Macros] [br]
+ [link contract__.advanced_topics.static_assertions Static Assertions] [br]
+ [link contract__.advanced_topics.constant_assertions Constant Assertions] [br]
+ [link contract__.advanced_topics.select_assertions Select Assertions] [br]
+ [link contract__.advanced_topics.assertion_statements Assertion Statements] [br]
+ [link contract__.advanced_topics.assertion_requirements Assertion Requirements] [br]
+ [link contract__.advanced_topics.old_of_requirements Old-Of Requirements] [br]
+ [link contract__.advanced_topics.old_and_result_value_copies Old and Result Value Copies] [br]
+ [link contract__.advanced_topics.pure_virtual_functions Pure Virtual Functions] [br]
+ [link contract__.advanced_topics.subcontracting_preconditions Subcontracting Preconditions] [br]
+ [link contract__.advanced_topics.static_member_functions Static Member Functions] [br]
+ [link contract__.advanced_topics.volatile_member_functions Volatile Member Functions] [br]
+ [link contract__.advanced_topics.operators Operators] [br]
+ [link contract__.advanced_topics.nested_classes Nested Classes] [br]
+ [link contract__.advanced_topics.friends Friends] [br]
+ [link contract__.advanced_topics.template_specializations Template Specializations] [br]
+ [link contract__.advanced_topics.exception_specifications_and_function_try_blocks Exception Specifications and Function-Try Blocks] [br]
+ [link contract__.advanced_topics.specifying_types__no_boost_typeof_ Specifying Types (no Boost.Typeof)] [br]
+ [link contract__.advanced_topics.block_invariants_and_loop_variants Block Invariants and Loop Variants] [br]
+ [link contract__.advanced_topics.contract_broken_handlers__throw_on_failure_ Contract Broken Handlers (Throw on Failure)] [br]
+]
+
+[link contract__.virtual_specifiers Virtual Specifiers]
+[:
+ [link contract__.virtual_specifiers.final_classes Final Classes] [br]
+ [link contract__.virtual_specifiers.final_member_functions Final Member Functions] [br]
+ [link contract__.virtual_specifiers.overriding_member_functions Overriding Member Functions] [br]
+ [link contract__.virtual_specifiers.new_member_functions New Member Functions] [br]
+]
+
+[link contract__.concepts Concepts]
+[:
+ [link contract__.concepts.class_templates Class Templates] [br]
+ [link contract__.concepts.function_templates Function Templates] [br]
+ [link contract__.concepts.concept_definitions__not_implemented_ Concept Definitions (Not Implemented)] [br]
+]
+
+[link contract__.named_parameters Named Parameters]
+[:
+ [link contract__.named_parameters.overview Overview] [br]
+ [link contract__.named_parameters.named_function_parameters Named Function Parameters] [br]
+ [link contract__.named_parameters.deduced_function_parameters Deduced Function Parameters] [br]
+ [link contract__.named_parameters.member_function_parameters Member Function Parameters] [br]
+ [link contract__.named_parameters.constructor_parameters Constructor Parameters] [br]
+ [link contract__.named_parameters.class_template_parameters Class Template Parameters] [br]
+ [link contract__.named_parameters.concepts Concepts] [br]
+ [link contract__.named_parameters.parameter_identifiers Parameter Identifiers] [br]
+]
+
+[link contract__.examples Examples]
+[:
+ [link contract__.examples.__n1962___vector__comparison_with_c___proposed_syntax \[N1962\] Vector: Comparison with C++ proposed syntax] [br]
+ [link contract__.examples.__n1962___circle__subcontracting \[N1962\] Circle: Subcontracting] [br]
+ [link contract__.examples.__n1962___factorial__recursion_and_assertion_computational_complexity \[N1962\] Factorial: Recursion and assertion computational complexity] [br]
+ [link contract__.examples.__n1962___equal__operators \[N1962\] Equal: Operators] [br]
+ [link contract__.examples.__n1962___sum__separated_body_definitions \[N1962\] Sum: Separated body definitions] [br]
+ [link contract__.examples.__n1962___square_root__default_parameters_and_comparison_with_d_syntax \[N1962\] Square Root: Default parameters and comparison with D syntax] [br]
+ [link contract__.examples.__n1962___block__block_invariants \[N1962\] Block: Block invariants] [br]
+ [link contract__.examples.__n2081___add__generic_addition_algorithm \[N2081\] Add: Generic addition algorithm] [br]
+ [link contract__.examples.__n2081___advance__concept_based_iterator_overloading__emulated_using_tags_ \[N2081\] Advance: Concept-based iterator overloading (emulated using tags)] [br]
+ [link contract__.examples.__n2081___find__generic_find_algorithm \[N2081\] Find: Generic find algorithm] [br]
+ [link contract__.examples.__n2081___apply__overloaded_invocation_of_functors \[N2081\] Apply: Overloaded invocation of functors] [br]
+ [link contract__.examples.__n2081___for_each__generic_for_each_algorithm \[N2081\] For Each: Generic for-each algorithm] [br]
+ [link contract__.examples.__n2081___transform__generic_binary_transformation_algorithm \[N2081\] Transform: Generic binary transformation algorithm] [br]
+ [link contract__.examples.__n2081___count__generic_counting_algorithm \[N2081\] Count: Generic counting algorithm] [br]
+ [link contract__.examples.__n2081___convert__conversion_between_two_types \[N2081\] Convert: Conversion between two types] [br]
+ [link contract__.examples.__n2081___equal__generic_equality_comparison \[N2081\] Equal: Generic equality comparison] [br]
+ [link contract__.examples.__n2081___less_equal__generic_less_than_or_equal_to_comparison \[N2081\] Less Equal: Generic less-than or equal-to comparison] [br]
+ [link contract__.examples.__n2081___de_ref__generic_iterator_dereferencing \[N2081\] De-Ref: Generic iterator dereferencing] [br]
+ [link contract__.examples.__n2081___min__generic_minimum_algorithm \[N2081\] Min: Generic minimum algorithm] [br]
+ [link contract__.examples.__meyer97___stack4__comparison_with_eiffel_syntax \[Meyer97\] Stack4: Comparison with Eiffel Syntax] [br]
+ [link contract__.examples.__meyer97___stack3__error_codes_instead_of_preconditions \[Meyer97\] Stack3: Error codes instead of preconditions] [br]
+ [link contract__.examples.__meyer97___gcd__loop_variants_and_invariants_plus_comparison_with_eiffel_syntax \[Meyer97\] GCD: Loop variants and invariants plus comparison with Eiffel syntax] [br]
+ [link contract__.examples.__meyer97___max_array__nested_loop_variants_and_invariants \[Meyer97\] Max-Array: Nested loop variants and invariants] [br]
+ [link contract__.examples.__mitchell02___name_list__relaxed_subcontracts \[Mitchell02\] Name List: Relaxed subcontracts] [br]
+ [link contract__.examples.__mitchell02___dictionary__simple_key_value_map \[Mitchell02\] Dictionary: Simple key-value map] [br]
+ [link contract__.examples.__mitchell02___courier__subcontracting_and_static_class_invariants \[Mitchell02\] Courier: Subcontracting and static class invariants] [br]
+ [link contract__.examples.__mitchell02___stack__simple_stack_dispenser \[Mitchell02\] Stack: Simple stack dispenser] [br]
+ [link contract__.examples.__mitchell02___simple_queue__simple_queue_dispenser \[Mitchell02\] Simple Queue: Simple queue dispenser] [br]
+ [link contract__.examples.__mitchell02___customer_manager__contracts_instead_of_defensive_programming \[Mitchell02\] Customer Manager: Contracts instead of Defensive Programming] [br]
+ [link contract__.examples.__mitchell02___observer__contracts_for_pure_virtual_functions \[Mitchell02\] Observer: Contracts for pure virtual functions] [br]
+ [link contract__.examples.__mitchell02___counter__subcontracting_and_virtual_specifiers__final__override__new__and_pure_virtual_ \[Mitchell02\] Counter: Subcontracting and virtual specifiers (final, override, new, and pure virtual)] [br]
+ [link contract__.examples.__stroustrup97___string__throw_when_contract_is_broken \[Stroustrup97\] String: Throw when contract is broken] [br]
+ [link contract__.examples.__cline90___vector__comparison_with_a___proposed_syntax \[Cline90\] Vector: Comparison with A++ proposed syntax] [br]
+ [link contract__.examples.__cline90___stack__function_try_blocks_and_exception_specifications \[Cline90\] Stack: Function-Try blocks and exception specifications] [br]
+ [link contract__.examples.__cline90___vector_stack__subcontracting_from_abstract_data_type__adt_ \[Cline90\] Vector-Stack: Subcontracting from Abstract Data Type (ADT)] [br]
+ [link contract__.examples.__cline90___calendar__a_very_simple_calendar \[Cline90\] Calendar: A very simple calendar] [br]
+]
+
+[link contract__.grammar Grammar]
+[:
+ [link contract__.grammar.preprocessor_dsel Preprocessor DSEL] [br]
+ [link contract__.grammar.differences_with_c___syntax Differences with C++ Syntax] [br]
+ [link contract__.grammar.macro_interface Macro Interface] [br]
+ [link contract__.grammar.lexical_conventions Lexical Conventions] [br]
+ [link contract__.grammar.class_declarations Class Declarations] [br]
+ [link contract__.grammar.base_classes Base Classes] [br]
+ [link contract__.grammar.template_specializations Template Specializations] [br]
+ [link contract__.grammar.template_parameters Template Parameters] [br]
+ [link contract__.grammar.concepts Concepts] [br]
+ [link contract__.grammar.types Types] [br]
+ [link contract__.grammar.function_declarations Function Declarations] [br]
+ [link contract__.grammar.result_type Result Type] [br]
+ [link contract__.grammar.function_and_operator_names Function and Operator Names] [br]
+ [link contract__.grammar.exception_specifications Exception Specifications] [br]
+ [link contract__.grammar.member_initializers Member Initializers] [br]
+ [link contract__.grammar.function_parameters Function Parameters] [br]
+ [link contract__.grammar.result_and_old_values Result and Old Values] [br]
+ [link contract__.grammar.class_invariants Class Invariants] [br]
+ [link contract__.grammar.assertions Assertions] [br]
+ [link contract__.grammar.loop_variants Loop Variants] [br]
+ [link contract__.grammar.named_parameter_declarations Named Parameter Declarations] [br]
+ [link contract__.grammar.terminals Terminals] [br]
+ [link contract__.grammar.alternative_assertion_syntax__not_implemented_ Alternative Assertion Syntax (Not Implemented)] [br]
+]
+
+[link contract__.no_variadic_macros No Variadic Macros]
+[:
+ [link contract__.no_variadic_macros.sequence_syntax Sequence Syntax] [br]
+ [link contract__.no_variadic_macros.commas_and_leading_symbols_in_macros Commas and Leading Symbols in Macros] [br]
+]
+
+[link reference Reference]
+[:
+ [funcref contract::block_invariant_broken] [br]
+ [classref contract::broken] [br]
+ [classref contract::broken_contract_handler] [br]
+ [funcref contract::class_invariant_broken_on_entry] [br]
+ [funcref contract::class_invariant_broken_on_exit] [br]
+ [funcref contract::class_invariant_broken_on_throw] [br]
+ [classref contract::copy] [br]
+ [enumref contract::from] [br]
+ [classref contract::has_oldof] [br]
+ [funcref contract::loop_variant_broken] [br]
+ [funcref contract::postcondition_broken] [br]
+ [funcref contract::precondition_broken] [br]
+ [funcref contract::set_block_invariant_broken] [br]
+ [funcref contract::set_class_invariant_broken] [br]
+ [funcref contract::set_class_invariant_broken_on_entry] [br]
+ [funcref contract::set_class_invariant_broken_on_exit] [br]
+ [funcref contract::set_class_invariant_broken_on_throw] [br]
+ [funcref contract::set_loop_variant_broken] [br]
+ [funcref contract::set_postcondition_broken] [br]
+ [funcref contract::set_precondition_broken] [br]
+ [macroref CONTRACT_BLOCK_INVARIANT] [br]
+ [macroref CONTRACT_BLOCK_INVARIANT_TPL] [br]
+ [macroref CONTRACT_CLASS] [br]
+ [macroref CONTRACT_CLASS_INVARIANT] [br]
+ [macroref CONTRACT_CLASS_INVARIANT_TPL] [br]
+ [macroref CONTRACT_CLASS_TPL] [br]
+ [macroref CONTRACT_CONFIG_ARRAY_DIMENSION_MAX] [br]
+ [macroref CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS] [br]
+ [macroref CONTRACT_CONFIG_FUNCTION_ARITY_MAX] [br]
+ [macroref CONTRACT_CONFIG_INHERITANCE_MAX] [br]
+ [macroref CONTRACT_CONFIG_NO_BLOCK_INVARIANTS] [br]
+ [macroref CONTRACT_CONFIG_NO_CLASS_INVARIANTS] [br]
+ [macroref CONTRACT_CONFIG_NO_LOOP_VARIANTS] [br]
+ [macroref CONTRACT_CONFIG_NO_POSTCONDITIONS] [br]
+ [macroref CONTRACT_CONFIG_NO_PRECONDITIONS] [br]
+ [macroref CONTRACT_CONFIG_OLDOF_MAX] [br]
+ [macroref CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION] [br]
+ [macroref CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE] [br]
+ [macroref CONTRACT_CONFIG_THREAD_SAFE] [br]
+ [macroref CONTRACT_CONSTRUCTOR] [br]
+ [macroref CONTRACT_CONSTRUCTOR_ARG] [br]
+ [macroref CONTRACT_CONSTRUCTOR_BODY] [br]
+ [macroref CONTRACT_CONSTRUCTOR_TPL] [br]
+ [macroref CONTRACT_DESTRUCTOR] [br]
+ [macroref CONTRACT_DESTRUCTOR_BODY] [br]
+ [macroref CONTRACT_DESTRUCTOR_TPL] [br]
+ [macroref CONTRACT_FREE_BODY] [br]
+ [macroref CONTRACT_FUNCTION] [br]
+ [macroref CONTRACT_FUNCTION_TPL] [br]
+ [macroref CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES] [br]
+ [macroref CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS] [br]
+ [macroref CONTRACT_LIMIT_OLDOFS] [br]
+ [macroref CONTRACT_LOOP] [br]
+ [macroref CONTRACT_LOOP_VARIANT] [br]
+ [macroref CONTRACT_LOOP_VARIANT_TPL] [br]
+ [macroref CONTRACT_MEMBER_BODY] [br]
+ [macroref CONTRACT_OLDOF] [br]
+ [macroref CONTRACT_PARAMETER] [br]
+ [macroref CONTRACT_PARAMETER_BODY] [br]
+ [macroref CONTRACT_PARAMETER_TYPEOF] [br]
+ [macroref CONTRACT_TEMPLATE_PARAMETER] [br]
+]
+
+[link contract__.release_notes Release Notes]
+
+[link contract__.bibliography Bibliography]
+
+[link contract__.acknowledgments Acknowledgments]
+
+[endsect]
+

Added: sandbox/contract/doc/getting_started.qbk
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/getting_started.qbk 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,131 @@
+
+[/ Copyright (C) 2008-2012 Lorenzo Caminiti ]
+[/ Distributed under the Boost Software License, Version 1.0 ]
+[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
+[/ http://www.boost.org/LICENSE_1_0.txt) ]
+[/ Home at http://sourceforge.net/projects/contractpp ]
+
+[section Getting Started]
+
+This section explains how to setup a system to use this library.
+
+[section This Documentation]
+
+Programmers should have enough knowledge to use this library after reading the __Introduction__, __Getting_Started__, and __Tutorial__ sections.
+The other sections can be consulted to gain a more in depth knowledge of the library.
+
+Some footnotes are marked by the word "*Rationale*". They explain reasons behind decisions made during the design and implementation of this library.
+
+In most of the examples presented in this documentation the Boost.Detail/LightweightTest macro `BOOST_TEST` is used to assert test conditions (see also =boost/detail/lightweight_test.hpp=).
+The `BOOST_TEST` macro is conceptually similar to C++ `assert` but a failure of the checked condition does not abort the program, instead it makes `boost::report_errors` return a non-zero program exit code.
+[footnote
+*Rationale.*
+Using Boost.Detail/LightweightTest allows to add the examples to the library regression tests so to make sure that they always compile and run correctly.
+]
+
+[endsect]
+
+[section Compilers and Platforms]
+
+The implementation of this library uses preprocessor and template meta-programming (as supported by __Boost_Preprocessor__ and __Boost_MPL__ respectively), templates with partial specializations and function pointers (similarly to __Boost_Function__), and local functions (as supported by __Boost_LocalFunction__).
+The authors originally developed and tested the library on:
+
+# GCC 4.5.3 on Cygwin (with and without __CXX11__ features enabled =-std=c++0x=).
+[footnote
+When using GCC to compile large projects that use this library, it might be necessary to appropriately set the `--param gcc-min-expand` option to avoid internal compiler errors due to excessive virtual memory usage.
+]
+
+# Microsoft Visual C++ (MSVC) 8.0 on Windows XP and Windows 7.
+
+At present, the library has not been tested on other compilers or platforms.
+
+[endsect]
+
+[section Installation]
+
+This library is composed of header files only.
+Therefore there is no pre-compiled object file which needs to be installed or linked.
+Programmers can simply instruct the C++ compiler where to find the library header files and they can start compiling code using this library.
+
+[important
+This library extensively uses __Boost__ libraries.
+__Boost__ version 1.50 must be properly installed in order for this library to compile.
+]
+
+Let ['=ROOT=] be the root directory of this library installation then the directory structure is as follow:
+
+[pre
+['ROOT]/
+ doc/
+ html/ # This documentation.
+ example/ # Examples using this library.
+ include/ # This library source files (headers only).
+]
+
+For example, the following commands can be used to compile code using this library:
+[footnote
+For convenience, a =Jamfile.v2= file is provided in the example directory that can be used to compile and test all the examples using __Boost_Jam__.
+However, it is not necessary to use __Boost_Jam__ to compile code that uses this library.
+]
+
+[pre
+$ g++ -I ['ROOT]/include ... # For GCC.
+> cl /I ['ROOT]\include ... # For MSVC.
+]
+
+All necessary library headers are included in the source code by the following instruction (it is not necessary to include single headers separately):
+
+ #include <contract.hpp> // Include this library headers.
+
+The following symbols are part of the library private interface, they are not documented, and they should not be directly used by programmers:
+[footnote
+*Rationale.*
+This library concatenates symbols specified by programmers (e.g., the function name) with other symbols (e.g., special prefixes and line numbers) to make internal symbols with unique names to avoid name clashes.
+These symbols are separated by the letter `X` when they are concatenated so they read more easily during debugging (unfortunately, the underscore character `_` could not be used instead of the letter `X` because if the original symbol already contained a leading or trailing underscore, the concatenation could result in a symbol with double underscores `__` which is reserved by the C++ standard).
+The ["aux] symbols are internal to the implementation of this library.
+The ["detail] symbols are not officially part of the library public interface and they are not documented however they constitute a separate set of standalone libraries that could be added to the library public interface in the future.
+]
+
+* Any symbol defined by files within the =contract/aux_/= or =contract/detail/= directories (these header files should not be directly included by programmers).
+* Any symbol within the `contract::aux` or `contract::detail` namespace.
+* Any symbol prefixed by `contract_aux_...` or `contract_detail_...` (regardless of its namespace).
+* Any symbol prefixed by `CONTRACT_AUX_...` or `CONTRACT_DETAIL_...` (regardless of its namespace).
+
+Symbols starting with `ERROR_...` are used to report compile-time errors via static assertions and programmers should not use these symbols to define macros or other constructs in the global namespace.
+
+[endsect]
+
+[section Disable Contract Compilation]
+
+Some of the library behaviour can be customized at compile-time by defining special /configuration macros/ (see [headerref contract/config.hpp]).
+In particular, the following configuration macros can be used to selectively turn on or off contract compilation and the related run-time checks:
+
+* Defining the [macroref CONTRACT_CONFIG_NO_PRECONDITIONS] macro turns off compilation and run-time checking of all preconditions.
+* Defining the [macroref CONTRACT_CONFIG_NO_POSTCONDITIONS] macro turns off compilation and run-time checking of all postconditions.
+* Defining the [macroref CONTRACT_CONFIG_NO_CLASS_INVARIANTS] macro turns off compilation and run-time checking of all class invariants.
+* Defining the [macroref CONTRACT_CONFIG_NO_BLOCK_INVARIANTS] macro turns off compilation and run-time checking of all block invariants.
+* Defining the [macroref CONTRACT_CONFIG_NO_LOOP_VARIANTS] macro turns off compilation and run-time checking of all loop variants.
+
+By default, all contracts are compiled and checked at run-time (i.e., all the macros above are not defined).
+
+[important
+In Contract Programming, it is usually important to selectively turn off contract compilation to reduce run-time, binary size, and compilation-time overhead associated with the contracts (see __Meyer97__).
+This library guarantees zero run-time and binary size overhead when all contracts are all turned off (however, even when contracts are all turned off there is a limited compile-time overhead associated with expanding the contract macros to generate the original class and function declarations).
+Note that when contracts are turned off their assertions are completely ignored by the compiler so the assertion code might not even be syntactically correct.
+]
+
+For example, the following commands compile and check preconditions and class invariants, but they do not compile and check postconditions, block invariants, and loop variants:
+
+[pre
+$ g++ -DCONTRACT_CONFIG_NO_POSTCONDITONS -DCONTRACT_CONFIG_NO_BLOCK_INVARIANTS -DCONTRACT_CONFIG_NO_LOOP_VARIANTS ... # For GCC.
+> cl /DCONTRACT_CONFIG_NO_POSTCONDITONS /DCONTRACT_CONFIG_NO_BLOCK_INVARIANTS /DCONTRACT_CONFIG_NO_LOOP_VARIANTS ... # For MSVC.
+]
+
+Other configuration macros are provided to customize other aspects of the library.
+For example, the [macroref CONTRACT_CONFIG_FUNCTION_ARITY_MAX] macro is used to specify the maximum number of function parameters and the [macroref CONTRACT_CONFIG_INHERITANCE_MAX] macro is used to specify the maxim number of base classes.
+All configuration macros have appropriate default values when they are left undefined by programmers.
+
+[endsect]
+
+[endsect]
+

Added: sandbox/contract/doc/grammar.qbk
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/grammar.qbk 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,888 @@
+
+[/ Copyright (C) 2008-2012 Lorenzo Caminiti ]
+[/ Distributed under the Boost Software License, Version 1.0 ]
+[/ (see accompanying file LICENSE_1_0.txt or a copy at ]
+[/ http://www.boost.org/LICENSE_1_0.txt) ]
+[/ Home at http://sourceforge.net/projects/contractpp ]
+
+[def __assertion__ [link assertion_anchor [^['assertion]]]]
+[def __assertion_condition__ [link assertion_condition_anchor [^['assertion-condition]]]]
+[def __assertion_expression__ [link assertion_expression_anchor [^['assertion-expression]]]]
+[def __assertions__ [link assertions_anchor [^['assertions]]]]
+[def __base_classes__ [link base_classes_anchor [^['base-classes]]]]
+[def __boolean_condition__ [link boolean_condition_anchor [^['boolean-condition]]]]
+[def __class_declaration__ [link class_declaration_anchor [^['class-declaration]]]]
+[def __class_invariant__ [link class_invariant_anchor [^['class-invariant]]]]
+[def __class_invariants__ [link class_invariants_anchor [^['class-invariants]]]]
+[def __concepts__ [link concepts_anchor [^['concepts]]]]
+[def __exception_specifications__ [link exception_specifications_anchor [^['exception-specifications]]]]
+[def __function_declaration__ [link function_declaration_anchor [^['function-declaration]]]]
+[def __function_name__ [link function_name_anchor [^['function-name]]]]
+[def __function_parameters__ [link function_parameters_anchor [^['function-parameters]]]]
+[def __fundamental_type__ [link fundamental_type_anchor [^['fundamental-type]]]]
+[def __inscope_variables__ [link inscope_variables_anchor [^['inscope-variables]]]]
+[def __loop_variant__ [link loop_variant_anchor [^['loop-variant]]]]
+[def __member_initializers__ [link member_initializers_anchor [^['member-initializers]]]]
+[def __named_function_parameter__ [link named_function_parameter_anchor [^['named-function-parameter]]]]
+[def __named_function_parameters__ [link named_function_parameters_anchor [^['named-function-parameters]]]]
+[def __named_parameter_declaration__ [link named_parameter_declaration_anchor [^['named-parameter-declaration]]]]
+[def __named_template_parameter__ [link named_template_parameter_anchor [^['named-template-parameter]]]]
+[def __named_template_parameters__ [link named_template_parameters_anchor [^['named-template-parameters]]]]
+[def __named_template_template_parameter__ [link named_template_template_parameter_anchor [^['named-template-template-parameter]]]]
+[def __named_type_template_parameter__ [link named_type_template_parameter_anchor [^['named-type-template-parameter]]]]
+[def __named_value_template_parameter__ [link named_value_template_parameter_anchor [^['named-value-template-parameter]]]]
+[def __oldof_declaration__ [link oldof_declaration_anchor [^['oldof-declaration]]]]
+[def __operator_name__ [link operator_name_anchor [^['operator-name]]]]
+[def __positional_function_parameter__ [link positional_function_parameter_anchor [^['positional-function-parameter]]]]
+[def __positional_function_parameters__ [link positional_function_parameters_anchor [^['positional-function-parameters]]]]
+[def __positional_template_parameter__ [link positional_template_parameter_anchor [^['positional-template-parameter]]]]
+[def __positional_template_parameters__ [link positional_template_parameters_anchor [^['positional-template-parameters]]]]
+[def __positional_template_template_parameter__ [link positional_template_template_parameter_anchor [^['positional-template-template-parameter]]]]
+[def __positional_type_template_parameter__ [link positional_type_template_parameter_anchor [^['positional-type-template-parameter]]]]
+[def __positional_value_template_parameter__ [link positional_value_template_parameter_anchor [^['positional-value-template-parameter]]]]
+[def __result_oldof_assertions__ [link result_oldof_assertions_anchor [^['result-oldof-assertions]]]]
+[def __result_type__ [link result_type_anchor [^['result-type]]]]
+[def __select_assertion__ [link select_assertion_anchor [^['select-assertion]]]]
+[def __template_parameters__ [link template_parameters_anchor [^['template-parameters]]]]
+[def __template_specializations__ [link template_specializations_anchor [^['template-specializations]]]]
+[def __type_keyword__ [link type_keyword_anchor [^['type-keyword]]]]
+[def __type_qualifier__ [link type_qualifier_anchor [^['type-qualifier]]]]
+[def __wrapped_type__ [link wrapped_type_anchor [^['wrapped-type]]]]
+
+[def __boolean_expression__ [link boolean_expression_anchor [^[*boolean-expression]]]]
+[def __boolean_expression_using_inscope_variables__ [link boolean_expression_using_inscope_variables_anchor [^[*boolean-expression-using-inscope-variables]]]]
+[def __boost_concept__ [link boost_concept_anchor [^[*boost-concept]]]]
+[def __catch_declaration__ [link catch_declaration_anchor [^[*catch-declaration]]]]
+[def __catch_instructions__ [link catch_instructions_anchor [^[*catch-instructions]]]]
+[def __class_name__ [link class_name_anchor [^[*class-name]]]]
+[def __class_type__ [link class_type_anchor [^[*class-type]]]]
+[def __constant_boolean_expression__ [link constant_boolean_expression_anchor [^[*constant-boolean-expression]]]]
+[def __constant_string_literal__ [link constant_string_literal_anchor [^[*constant-string-literal]]]]
+[def __exception_type__ [link exception_type_anchor [^[*exception-type]]]]
+[def __function_identifier__ [link function_identifier_anchor [^[*function-identifier]]]]
+[def __inscope_variable__ [link inscope_variable_anchor [^[*inscope-variable]]]]
+[def __loop_declaration__ [link loop_declaration_anchor [^[*loop-declaration]]]]
+[def __member_initializer__ [link member_initializer_anchor [^[*member-initializer]]]]
+[def __named_argument_identifier_name__ [link named_argument_identifier_anchor [^[*named-argument-identifier]]]]
+[def __named_parameter_identifier_namespace__ [link named_parameter_identifier_namespace_anchor [^[*named-parameter-identifier-namespace]]]]
+[def __namespace_alias__ [link namespace_alias_anchor [^[*namespace-alias]]]]
+[def __natural_expression__ [link natural_expression_anchor [^[*natural-expression]]]]
+[def __natural_expression_using_inscope_variables__ [link natural_expression_using_inscope_variables_anchor [^[*natural-expression-using-inscope-variables]]]]
+[def __new_type_name__ [link new_type_name_anchor [^[*new-type-name]]]]
+[def __oldof_expression__ [link oldof_expression_anchor [^[*oldof-expression]]]]
+[def __operator_identifier__ [link operator_identifier_anchor [^[*operator-identifier]]]]
+[def __operator_symbol__ [link operator_symbol_anchor [^[*operator-symbol]]]]
+[def __parameter_default__ [link parameter_default_anchor [^[*parameter-default]]]]
+[def __parameter_name__ [link parameter_name_anchor [^[*parameter-name]]]]
+[def __template_parameter__ [link template_parameter_anchor [^[*template-parameter]]]]
+[def __template_specialization__ [link template_specialization_anchor [^[*template-specialization]]]]
+[def __type__ [link type_anchor [^[*type]]]]
+[def __typedef_type__ [link typedef_type_anchor [^[*typedef-type]]]]
+[def __unary_boolean_metafunction__ [link unary_boolean_metafunction_anchor [^[*unary-boolean-metafunction]]]]
+[def __using_directive__ [link using_directive_anchor [^[*using-directive]]]]
+[def __variable_name__ [link variable_name_anchor [^[*variable-name]]]]
+
+[section Grammar]
+
+[:['["Almost every macro demonstrates a flaw in the programming language, in the program, or in the programmer.]]]
+[:['-- Bjarne Stroustrup (see __Stroustrup97__ page 160)]]
+
+This library uses macros to overcome a limitation of C++, namely the fact that the core language does not support preconditions, postconditions, class invariants, old values, and subcontracting.
+This section lists the complete grammar of the syntax used by this library macros.
+
+[#syntax_error_warning_anchor]
+[warning
+In general, an error in programming this library syntax will generate cryptic compiler errors (often exposing internal code from this library and from __Boost_Preprocessor__).
+[footnote
+Usually, the complexity of C++ definitions is greater than the complexity of C++ declaration and the fact that this library macros only affect declarations would help by preserving the usefulness of the compiler error messages for the definition code.
+However, this library aims to make declarations more complex by adding program specifications to them (preconditions, postconditions, etc).
+Therefore, it can no longer be argued that declarations are significantly simpler than definitions and it would be rather helpful to have sensible compiler error messages at least for the declarations with contracts.
+]
+
+There are intrinsic limitations on the amount of error checking that can be implemented by this library because it uses the preprocessor to parse its syntax (e.g., there is no way the preprocessor can gracefully detect and report unbalanced round parenthesis `( ... /* missing closing parenthesis here */` or an invalid concatenation symbol `BOOST_PP_CAT(xyz, ::std::vector)`).
+In addition, for a given macro all compiler error messages report the same line number (because macros always expand on a single line) so line numbers are not very useful in identifying syntactic errors.
+
+While the preprocessor imposes limits on the error checking that can be implemented, the current version of this library does not focus on providing the best possible syntax error messages (this will be the focus of future releases, see also [@https://sourceforge.net/apps/trac/contractpp/ticket/44 Ticket 44]).
+]
+
+The best way to resolve syntactic errors is for programmers to inspect the code ["by eye] instead of trying to make sense of the compiler errors.
+This section is very useful for programmers to make sure that they are using the syntax correctly.
+
+[section Preprocessor DSEL]
+
+The syntax used by this library macros effectively defies a new language within C++.
+More precisely, this library macros define a [@http://en.wikipedia.org/wiki/Domain-specific_language Domain-Specific Embedded Language (DSEL)] that replaces the usual C++ syntax for class and function declarations.
+This is the ['Language of Contract++] (or ['LC++] for short).
+
+In contrast with other DSEL hosted by C++ which are parsed using template meta-programming (e.g., __Boost_Phoenix__), this library DSEL is parsed ["one meta-programming level higher] using preprocessor meta-programming.
+Using both processor meta-programming and template meta-programming allows this library to implement rules like this:
+
+ ``/if a member function is not public then it does not check the class invariants/``
+
+This rule cannot be implemented using only template meta-programming because it is not possible to check if a function is public using template meta-programming introspection techniques.
+For example, it is not possible to implement a boolean meta-function like the following:
+[footnote
+Using __CXX11__, it /might/ be possible to implement the `is_public` template because __SFINAE__ was extended to support access level (but to the authors' knowledge such a meta-function has not been implemented yet so the authors cannot be sure that `is_public` can be properly implemented even using __CXX11__ __SFINAE__).
+Even if that were possible in __CXX11__, this library still needs declaration traits other than `public` in oder to properly implement Contract Programming (e.g., if a function is `virtual` or not in order to implement subcontracting, and there are examples like that).
+Therefore, the arguments made here for the need to use a preprocessor DSEL in oder to properly implement Contract Programming in C++ hold even if `is_public` could be implemented in __CXX11__.
+]
+
+ template< ... >
+ struct is_public { ... }; // Unfortunately, this cannot be implemented.
+
+Instead a macro can be programmed to parse the following function declarations and expand to `1` if and only if the function is public:
+
+ #define IS_PUBLIC(function_declaration) ... // This can be implemented.
+
+ IS_PUBLIC( public void (f) ( int x ) ) // Expand to 1.
+ IS_PUBLIC( private void (g) ( int y ) ) // Expand to 0.
+ IS_PUBLIC( void (h) ( int z ) ) // Expand to 0.
+
+There are more examples of class and function declaration traits (`virtual`, etc) that need to be known to correctly implement Contract Programming but that cannot be inspected using template meta-programming.
+This library macros can instead parse the specified class and function declarations extracting /any/ declaration trait (if a constructor is `explicit`, if a member function is `virtual`, if a base class is `protected`, if a parameter has a default value, etc).
+
+It should be noted that while the syntax of the DSEL defined by this library macros is rather extensive and complex, macros always define a DSEL that is intrinsically different from the core C++ language.
+For example, consider the following function-like macro:
+
+ #define F(x, y) (int(x) - int(y))
+
+ template< typename X, typename Y >
+ int f ( X const& x, Y const& y ) { return (int(x) - int(y)); }
+
+ int main ( void )
+ {
+ std::cout << F( , 2) << std::endl; // OK, no syntax error, it prints `-2`.
+ std::cout << f( , 2) << std::endl; // Compiler generates a syntax error.
+ return 0;
+ }
+
+Note how it is valid to invoke the macro with an empty parameter `F( , 2)` while it is syntactically invalid to invoke a function with an empty parameter `f( , 2)`.
+This very simple macro already shows fundamental differences between the syntax of macros and the syntax of the core language.
+
+[endsect]
+
+[section Differences with C++ Syntax]
+
+The following is a summary of all the differences between the syntax of this library macros and the usual C++ class and function declaration syntax.
+
+[table
+[ [Rule] [Syntactic Element] [Syntax Differences] ]
+[ [1] [Template Declarations] [
+Use round parenthesis `template( `[^['template-parameters]]` )` instead of angular parenthesis `template< `[^['template-parameters]]` >` to declare templates (note that template instantiations are not template declarations and they use angular parenthesis as usual).
+] ]
+[ [2] [Template Specializations] [
+Use round parenthesis `( `[^['template-specializations]]` )` instead of angular parenthesis `< `[^['template-specializations]]` >` after a class template name to specify template specialization arguments.
+] ]
+[ [3] [Class, Function, and Operator Names] [
+Wrap class and function declaration names within round parenthesis `(`[^['class-name]]`)` and `(`[^['function-name]]`)`.
+Use `operator(`[^['symbol]]`)(`[^['arbitrary-name]]`)` for operators (allowed but not required for `operator new`, `operator delete`, and implicit type conversion operators for fundamental types with no symbol).
+Always use `operator comma` for comma operator.
+Memory member operators must always be explicitly declared `static`.
+] ]
+[ [4] [Base Classes] [
+Use `extends( `[^['base-classes]]` )` instead of the column symbol `: `[^['base-classes]] to inherit from base classes.
+] ]
+[ [5] [Default Parameters] [
+Use `default `[^['parameter-default]] instead of the assignment symbol `= `[^['parameter-default]] to specify template and function parameter default values.
+] ]
+[ [6] [Member Access Levels] [
+Always specify the access level `public`, `protected`, or `private` (note no trailing comma `:`) for every constructor, destructor, member function, and nested class declaration.
+] ]
+[ [7] [Result and Parameter Types] [
+Wrap function result and parameter types within round parenthesis `(`[^['type]]`)`.
+The wrapping parenthesis are allowed but not required for fundamental types containing only alphanumeric tokens (e.g., both `(const unsigned int)` and `const unsigned int` are allowed, only `(int&)` and not `int&` is allowed because of the non-alphanumeric symbol `&`, only `(mytype)` is allowed because `mytype` is not a fundamental type).
+] ]
+[ [8] [Member Initializers] [
+Use `initialize( `[^['member-initializers]]` )` instead of the column symbol `: `[^['member-initializers]] to specify constructor member initializers.
+] ]
+[ [9] [Empty Lists] [
+Specify empty lists (parameters, exception specifications, template specializations, etc) using `( void )` instead of `( )` or `< >`.
+] ]
+[ [10] [Commas and Leading Symbols] [
+Syntactic elements containing commas and leading non-alphanumeric symbols must be wrapped within extra round parenthesis `(...)`.
+(Note that `'a'`, `"abc"`, `1.23`, etc are not alphanumeric so they need to be wrapped as `('a')`, `("abc")`, `(1.23)`, etc when specified as default parameters or similar.)
+] ]
+]
+
+[important
+In general, every token which is not a known keyword (`int` is a known keyword but the function name is not) or that contains a non-alphanumeric symbol (e.g., `int&`) must be wrapped within round parenthesis `(...)` unless it is the very last token of a syntactic element (e.g., the function parameter name).
+]
+
+Sometimes the C++ syntax allows to equivalently specify elements in different orders (e.g., `const volatile` and `volatile const` are both allowed for member functions and they have the same meaning).
+The syntax of this library requires instead to specify the elements exactly in the order listed by this grammar (e.g., only `const volatile` is allowed for member functions).
+[footnote
+*Rationale.*
+This library macros could be implemented to allow to specify syntactic elements in different orders but that would complicate the macro implementation and this grammar with no additional feature for the user.
+]
+
+[endsect]
+
+[section Macro Interface]
+
+This library uses the following macros.
+
+ ``[macroref CONTRACT_CLASS]``(__class_declaration__)
+ ``[macroref CONTRACT_CLASS_TPL]``(__class_declaration__)
+
+ ``[macroref CONTRACT_CLASS_INVARIANT]``(__class_invariants__)
+ ``[macroref CONTRACT_CLASS_INVARIANT_TPL]``(__class_invariants__)
+
+ ``[macroref CONTRACT_FUNCTION]``(__function_declaration__)
+ ``[macroref CONTRACT_FUNCTION_TPL]``(__function_declaration__)
+ ``[macroref CONTRACT_CONSTRUCTOR]``(__function_declaration__)
+ ``[macroref CONTRACT_CONSTRUCTOR_TPL]``(__function_declaration__)
+ ``[macroref CONTRACT_DESTRUCTOR]``(__function_declaration__)
+ ``[macroref CONTRACT_DESTRUCTOR_TPL]``(__function_declaration__)
+
+ ``[macroref CONTRACT_FREE_BODY]``(__function_name__)
+ ``[macroref CONTRACT_MEMBER_BODY]``(__function_name__)
+ ``[macroref CONTRACT_CONSTRUCTOR_BODY]``(__class_type__, __class_name__)
+ ``[macroref CONTRACT_DESTRUCTOR_BODY]``(__class_type__, ~__class_name__)
+
+ ``[macroref CONTRACT_BLOCK_INVARIANT]``(__assertions__)
+ ``[macroref CONTRACT_BLOCK_INVARIANT_TPL]``(__assertions__)
+
+ ``[macroref CONTRACT_LOOP]``(__loop_declaration__)
+ ``[macroref CONTRACT_LOOP_VARIANT]``(__loop_variant__)
+ ``[macroref CONTRACT_LOOP_VARIANT_TPL]``(__loop_variant__)
+
+ ``[macroref CONTRACT_CONSTRUCTOR_ARG]``(__parameter_name__)
+ ``[macroref CONTRACT_PARAMETER_TYPEOF]``(__parameter_name__)
+ ``[macroref CONTRACT_PARAMETER]``(__named_parameter_declaration__)
+ ``[macroref CONTRACT_TEMPLATE_PARAMETER]``(__named_parameter_declaration__)
+ ``[macroref CONTRACT_PARAMETER_BODY]``(__function_name__)
+
+The macros with the trailing `_TPL` must be used when the enclosing scope is type-dependent (e.g., within templates).
+
+[endsect]
+
+[section Lexical Conventions]
+
+The following conventions are used to express this grammar.
+
+[table
+[ [Lexical Expression] [Meaning] ]
+[ [[^['[]tokens['\]]]] [
+Either `tokens` or nothing (optional tokens).
+] ]
+[ [[^['{]expression['}]]] [
+The result of the enclosed expression `expression` (evaluation order).
+] ]
+[ [[^tokens1 ['|] tokens2]] [
+Either `tokens1` or `tokens2` (["or] operation).
+] ]
+[ [[^tokens['*]]] [
+`tokens` repeated zero or more times (repetition starting from zero).
+] ]
+[ [[^tokens['+]]] [
+`tokens` repeated one or more times (repetition starting from one).
+] ]
+[ [[^token, ...]] [
+A comma separated list of tokens that could also have one single element (i.e., `token` or `token1, token2` or `token1, token2, token3`).
+See the __No_Variadic_Macros__ section for compilers that do not support variadic macros.
+] ]
+[ [[^[*tokens]]] [
+Terminal symbols (in bold font).
+] ]
+[ [[^['tokens]]] [
+Non-terminal symbols (in italic font).
+] ]
+]
+
+[endsect]
+
+[section Class Declarations]
+
+ __class_declaration__``: [#class_declaration_anchor]``
+ ``/[/````/[/``export``/]/`` template( __template_parameters__ ) ``/[/``requires( __concepts__ )``/]/````/]/``
+ ``/[/``friend``/]/`` ``/{/``class ``/|/`` struct``/}/`` (__class_name__)``/[/``( __template_specializations__ )``/]/`` ``/[/``final``/]/``
+ ``/[/``extends( __base_classes__ )``/]/``
+
+[endsect]
+
+[section Base Classes]
+
+ __base_classes__``: [#base_classes_anchor]``
+ ``/[/``public ``/|/`` protected ``/|/`` private``/]/`` ``/[/``virtual``/]/`` __class_type__, ...
+
+Note that when specified, `virtual` must appear after the inheritance access level for a base class.
+
+[endsect]
+
+[section Template Specializations]
+
+ __template_specializations__``: [#template_specializations_anchor]``
+ __template_specialization__, ...
+
+[endsect]
+
+[section Template Parameters]
+
+ __template_parameters__``: [#template_parameters_anchor]``
+ void ``/|/``
+ __positional_template_parameters__ ``/|/``
+ __named_template_parameters__
+
+ __positional_template_parameters__``: [#positional_template_parameters_anchor]``
+ __positional_template_parameter__, ...
+ __positional_template_parameter__``: [#positional_template_parameter_anchor]``
+ __positional_type_template_parameter__ ``/|/``
+ __positional_value_template_parameter__ ``/|/``
+ __positional_template_template_parameter__
+ __positional_type_template_parameter__``: [#positional_type_template_parameter_anchor]``
+ ``/{/``class ``/|/`` typename``/}/`` __parameter_name__
+ ``/[/``, default __parameter_default__``/]/``
+ __positional_value_template_parameter__``: [#positional_value_template_parameter_anchor]``
+ __wrapped_type__ __parameter_name__
+ ``/[/``, default __parameter_default__``/]/``
+ __positional_template_template_parameter__``: [#positional_template_template_parameter_anchor]``
+ template( __template_parameter__, ... ) class __parameter_name__
+ ``/[/``, default __parameter_default__``/]/``
+
+ __named_template_parameters__``: [#named_template_parameters_anchor]``
+ ``/[/``using namespace __named_parameter_identifier_namespace__,``/]/``
+ __named_type_template_parameter__, ...
+ __named_type_template_parameter__``: [#named_type_template_parameter_anchor]``
+ ``/[/``deduce``/]/`` in ``/{/``class ``/|/`` typename``/}/``
+ ``/[/``requires(__unary_boolean_metafunction__)``/]/`` __parameter_name__
+ ``/[/``, default __parameter_default__``/]/``
+
+Note that if `typename` appears within __wrapped_type__ for a value template parameter then it will be wrapped within parenthesis `(typename ...)` so it is syntactically distinguishable from the `typename` leading a type template parameter.
+
+Unfortunately, named template parameters only support type template parameters.
+Named value template parameters and named template template parameters are not supported because they are not supported by __Boost_Parameter__ but if they were ever supported, they could follow this syntax:
+
+ __named_template_parameters__``:``
+ __named_template_parameter__, ...
+ __named_template_parameter__``: [#named_template_parameter_anchor]``
+ __named_type_template_parameter__ ``/|/``
+ __named_value_template_parameter__ ``/|/``
+ __named_template_template_parameter__
+ __named_value_template_parameter__``: [#named_value_template_parameter_anchor]``// Not supported.
+ ``/[/``deduce``/]/`` in
+ ``/{/``__wrapped_type__ ``/|/`` auto ``/|/`` requires(__unary_boolean_metafunction__)``/}/`` __parameter_name__
+ ``/[/``, default __parameter_default__``/]/``
+ __named_template_template_parameter__``: [#named_template_template_parameter_anchor]``// Not supported.
+ ``/[/``deduce``/]/`` in template( __positional_template_parameter__, ... ) class
+ ``/[/``requires(__unary_boolean_metafunction__)``/]/`` __parameter_name__
+ ``/[/``, default __parameter_default__``/]/``
+
+ template( // For example...
+ // Named type template parameter (supported).
+ in typename requires(is_const<_>) T, default int
+ // Named value template parameter (not supported).
+ , in requires(is_converible<_, T>) val, default 0
+ // Named template template parameter (not supported).
+ , in template(
+ typename A
+ , template(
+ typename X
+ , typename Y, default int
+ ) class B, default b
+ ) class requires(pred1< _<T> >) Tpl, default tpl
+ )
+
+[endsect]
+
+[section Concepts]
+
+ __concepts__``: [#concepts_anchor]``
+ __boost_concept__, ...
+
+[endsect]
+
+[section Types]
+
+ __wrapped_type__``: [#wrapped_type_anchor]``
+ __fundamental_type__ ``/|/`` (__fundamental_type__) ``/|/`` (__type__)
+
+ __fundamental_type__``: [#fundamental_type_anchor]``
+ __type_qualifier__``/*/`` __type_keyword__ __type_qualifier__``/*/``
+ __type_qualifier__``: [#type_qualifier_anchor]``
+ const ``/|/`` volatile ``/|/`` long ``/|/`` short ``/|/`` signed ``/|/`` unsigned
+ __type_keyword__``: [#type_keyword_anchor]``
+ void ``/|/`` bool ``/|/`` char ``/|/`` double ``/|/`` float ``/|/`` int ``/|/`` wchar_t ``/|/`` size_t ``/|/`` ptrdiff_t
+
+This is the syntax used to specify the function result type, the function parameter types, the types of value template parameters, etc.
+As indicated by the syntax, extra parenthesis around the specified type are always allowed but they are required only for user-defined types `(mytype)` and types containing non-alphanumeric symbols `(int&)` while the parenthesis are optional for fundamental types containing no symbol `unsigned long int const` (or equivalently `(unsigned long int const)`).
+
+[endsect]
+
+[section Function Declarations]
+
+ __function_declaration__``: [#function_declaration_anchor]``
+ ``/[/``public ``/|/`` protected ``/|/`` private``/]/``
+ ``/[/````/[/``export``/]/`` ``/[/``template( __template_parameters__ ) ``/[/``requires( __concepts__ )``/]/````/]/``
+ ``/[/``explicit``/]/`` ``/[/``inline``/]/`` ``/[/``extern``/]/`` ``/[/``static``/]/`` ``/[/``virtual``/]/`` ``/[/``friend``/]/``
+ ``/[/``__result_type__``/]/`` __function_name__ ( __function_parameters__ )
+ ``/[/``requires( __concepts__ )``/]/``
+ ``/[/``const``/]/`` ``/[/``volatile``/]/`` ``/[/``override ``/|/`` new``/]/`` ``/[/``final``/]/``
+ ``/[/``throw( __exception_specifications__ )``/]/``
+ ``/[/``precondition( __assertions__ )``/]/``
+ ``/[/``postcondition( __result_oldof_assertions__ )``/]/``
+ ``/[/``__member_initializers__``/]/``
+
+This is the syntax used to declare all functions: Free functions, member functions, constructors, destructors, and operators.
+The usual constraints of C++ function declarations apply: It is not possible to declare a static virtual member function, only constructors can use the class name as the function name, constructors and destructors have no result type, etc.
+The `static` specifier can only be used for member functions (because it was deprecated for free functions from C to __CXX03__).
+The `volatile` specifier must always appear after `const` when they are both specified.
+
+[endsect]
+
+[section Result Type]
+
+ __result_type__``: [#result_type_anchor]``
+ __wrapped_type__
+
+Note that fundamental types containing no symbol can be specified without extra parenthesis: `void`, `bool`, `int`, `unsigned long const`, etc.
+
+[endsect]
+
+[section Function and Operator Names]
+
+ __function_name__``: [#function_name_anchor]``
+ (__function_identifier__) ``/|/`` (__class_name__) ``/|/`` (~__class_name__) ``/|/`` __operator_name__
+
+ __operator_name__``: [#operator_name_anchor]``
+ operator(__operator_symbol__)(__operator_identifier__) ``/|/`` operator __fundamental_type__ ``/|/``
+ operator new ``/|/`` operator delete ``/|/`` operator comma
+
+Names for free functions, member functions, constructors, and destructors are specified as usual but wrapped within parenthesis.
+
+Operator names are specified wrapping within parenthesis the usual operator symbol followed by an arbitrary but alphanumeric identifier:
+
+ operator([])(at)
+ operator(+)(plus)
+ operator(())(call)
+ operator(new[])(new_array)
+ operator(delete[])(delete_array)
+
+Implicit type conversion operators use the same syntax:
+
+ operator(int*)(int_ptr)
+ operator(mytype const&)(mytype_const_ref)
+ operator(std::map<char, int>)(std_map)
+
+However, if the type is a fundamental type containing no symbol, the identifier is optional:
+
+ operator(const int)(const_int) // Allowed but...
+ operator const int // ... more readable.
+
+Similarly, the parenthesis and identifier are optional for the `new` and `delete` operators:
+
+ operator(new)(new_ptr) // Allowed but...
+ operator new // ... more readable.
+
+ operator(delete)(delete_ptr) // Allowed but...
+ operator delete // ... more readable.
+
+Finally, the comma symbol `,` cannot be used to specify the comma operator
+[footnote
+*Rationale.*
+Within macros a comma `,` has the special meaning of separating the macro parameters so it cannot be used to indicate the comma operator otherwise `operator(,)(mycomma)` and `operator(std::map<char, int>)(stdmap)` could not be distinguished from one another by the preprocessor.
+]
+so the specifier `comma` must always be used to name the comma operator:
+
+ operator comma // OK.
+ operator(,)(comma) // Error.
+
+C++ automatically promotes the memory member operators `operator new`, `operator delete`, `operator new[]`, and `operator delete[]` to be static members so the `static` specifier is allowed but optional for these member operators.
+This library cannot automatically perform such a promotion so the `static` specifier is always required by this library for the memory member operators.
+
+[endsect]
+
+[section Exception Specifications]
+
+ __exception_specifications__``: [#exception_specifications_anchor]``
+ void | __exception_type__, ...
+
+Note that the syntax `throw( void )` is used instead of `throw( )` for no-throw specifications.
+
+Exception specifications apply only to exceptions thrown by the function body and not to exceptions thrown by the contracts themselves (if any) and by the contract checking code generated by this library macros.
+
+[endsect]
+
+[section Member Initializers]
+
+ __member_initializers__``: [#member_initializers_anchor]``
+ ``/[/``try``/]/`` initialize( __member_initializer__, ... )
+ ``/{/``catch(__catch_declaration__) ( __catch_instructions__ )``/}*/``
+
+As indicated by this syntax, it is possible to specify function-try blocks for constructor member initializers:
+
+ struct vector_error { ... };
+
+ CONTRACT_CONSTRUCTOR( // Constructor with member initializers.
+ explicit (vector) ( int count )
+ precondition( count >= 0 )
+ postcondition( size() == count )
+
+ try initialize( ptr_(new T[count]) )
+ catch(std::bad_alloc& ex) (
+ std::cerr << "not enough memory for " << count << " elements vector: " << ex.what() << std::endl;
+ throw vector_error(1);
+ ) catch(std::exception& ex) (
+ std::cerr << "error for " << count << " elements vector: " << ex.what() << std::endl;
+ throw vector_error(2);
+ ) catch(...) (
+ std::cerr << "unknown error for " << count << " elements vector" << std::endl;
+ throw vector_error(3);
+ )
+ ) { // Above function-try block only applies to exceptions thrown by the body (and not by the contracts).
+ ...
+ }
+
+For functions other than constructors and for constructors without member initializers, function-try blocks are programmed outside the macros and around the body definition as usual.
+As specified by __N1962__, function-try blocks apply only to exceptions thrown by the function body and not to exceptions thrown by the contracts themselves (if any) and by the contract checking code generated by the library macros.
+
+Member initializers (and their function-try blocks) are part of the constructor definition and not of the constructor declaration.
+However, __CXX03__ lack of delegating constructors requires member initializers (and their function-try blocks) to be specified within this library macros and constructors must be defined together with their declarations when they use member initializers.
+
+[endsect]
+
+[section Function Parameters]
+
+ __function_parameters__``: [#function_parameters_anchor]``
+ void ``/|/``
+ __positional_function_parameters__ ``/|/``
+ __named_function_parameters__
+
+ __positional_function_parameters__``: [#positional_function_parameters_anchor]``
+ __positional_function_parameter__, ...
+ __positional_function_parameter__``: [#positional_function_parameter_anchor]``
+ ``/[/``auto ``/|/`` register``/]/`` __wrapped_type__ __parameter_name__
+ ``/[/``, default __parameter_default__``/]/``
+
+ __named_function_parameters__``: [#named_function_parameters_anchor]``
+ ``/[/``using namespace __named_parameter_identifier_namespace__,``/]/``
+ __named_function_parameter__, ...
+ __named_function_parameter__``: [#named_function_parameter_anchor]``
+ ``/[/``deduce``/]/`` ``/{/``in ``/|/`` out ``/|/`` in out``/}/``
+ ``/{/``__wrapped_type__ ``/|/`` auto ``/|/`` requires(__unary_boolean_metafunction__)``/}/`` __parameter_name__
+ ``/[/``, default __parameter_default__``/]/``
+
+Note that the positional parameter storage classifier `auto` is supported by this library because it is part of __CXX03__ (but the `auto` keyword changed meaning in __CXX11__ so use it with the usual care when writing code portable to __CXX11__).
+
+[endsect]
+
+[section Result and Old Values]
+
+ __result_oldof_assertions__``: [#result_oldof_assertions_anchor]``
+ ``/[/``auto __variable_name__ = return,``/]/``
+ ``/[/``__oldof_declaration__, ...``/]/``
+ __assertion__, ...
+
+ __oldof_declaration__``: [#oldof_declaration_anchor]``
+ ``/{/``auto ``/|/`` __wrapped_type__``/}/`` __variable_name__ = ``[macroref CONTRACT_OLDOF]`` __oldof_expression__
+
+If present, result and old-of declarations should appear at the very beginning of the postconditions because they will always be visible to all assertions plus these declarations cannot be nested (within select-assertions, etc).
+
+The result declaration type is always `auto` because the function result type is know and already specified by the function declaration (so no result type deduction is ever needed).
+The old-of declaration type is automatically deduced (using __Boost_Typeof__) when its type is specified `auto` instead of __wrapped_type__.
+The macro `CONTRACT_OLDOF` does not require but allows parenthesis around the value expression __oldof_expression__ (this is as specified for the `oldof` operator in __N1962__ and similar to the `sizeof` operator which requires parenthesis when applied to a type expression `sizeof(size_type)` but not when applied to a value expression `sizeof size()`).
+For example, all the followings are valid:
+
+ auto old_size = CONTRACT_OLDOF size()
+ auto old_size = CONTRACT_OLDOF(size()) // Extra parenthesis around expression (optional).
+ (size_type) old_size = CONTRACT_OLDOF size() // Do not use Boost.Typeof.
+ (size_type) old_size = CONTRACT_OLDOF(size()) // No Boost.Typeof and extra parenthesis.
+
+If an old-of copy is performed on a type that is not __ConstantCopyConstructible__, the old-of declaration itself will not fail compilation but it will produce an old variable that will cause a compiler-error as soon as it is used in an assertion (unless the assertion specifies a requirement using a properly specialized [classref contract::has_oldof] trait).
+
+[endsect]
+
+[section Class Invariants]
+
+ __class_invariants__``: [#class_invariants_anchor]``
+ void ``/|/`` __class_invariant__, ...
+
+ __class_invariant__``: [#class_invariant_anchor]``
+ __assertion__ ``/|/``
+ static class( void ``/|/`` __assertion__, ... ) ``/|/``
+ volatile class( void ``/|/`` __assertion__, ... )
+
+Volatile class invariants are assumed to have the same assertions as non-volatile class invariants unless they are explicitly specified.
+Static class invariants are assumed to assert nothing unless they are explicitly specified.
+
+[endsect]
+
+[section Assertions]
+
+ __assertions__``: [#assertions_anchor]``
+ __assertion__, ...
+ __assertion__``: [#assertion_anchor]``
+ using __using_directive__ ``/|/``
+ namespace __namespace_alias__ ``/|/``
+ typedef __typedef_type__ __new_type_name__ ``/|/``
+ __assertion_condition__
+
+ __assertion_condition__``: [#assertion_condition_anchor]``
+ __assertion_expression__ ``/|/``
+ __select_assertion__
+ __assertion_expression__``: [#assertion_expression_anchor]``
+ __boolean_condition__ ``/|/``
+ static_assert(__constant_boolean_expression__, __constant_string_literal__)
+ ``/[/``, requires __constant_boolean_expression__``/]/``
+ __select_assertion__``: [#select_assertion_anchor]``
+ if(__boolean_condition__) ( __assertion_condition__, ... )
+ ``/[/``else ( __assertion_condition__, ... )``/]/``
+
+ __boolean_condition__``: [#boolean_condition_anchor]``
+ __boolean_expression__ ``/|/``
+ const( __inscope_variables__ ) __boolean_expression_using_inscope_variables__
+ __inscope_variables__``: [#inscope_variables_anchor]``
+ ``/[/``__wrapped_type__``/]/`` __inscope_variable__, ...
+
+Some basic name manipulations are allowed at the local scope where the assertions are being declared in case they are ever needed to simplify the assertion expressions.
+Specifically, using-directives, namespace-aliases, and type-definitions are allowed (these will always affect all assertions within the given preconditions, postconditions, etc so it is recommended to always use these statement at the very beginning before the actual assertion conditions).
+Note that these name manipulations have no effect on the program run-time state and therefore they do not compromise the contract constant-correctness requirement.
+
+As indicated by the grammar above, it is not possible to specify assertion requirements (using `requires`) for the entire select assertion if-then-else expression.
+Eventual assertion requirements must be specified for the single assertions within the select assertion if-then-else statement and they will never disable compilation and checking of the select assertion if-condition.
+Programmers can use the ternary operator `?:` instead of a select assertion if they need to specify a guarded assertion with a condition that is also disabled by the assertion requirements:
+
+ ``/boolean-guard/`` ? __boolean_expression__ : true, requires __constant_boolean_expression__
+
+Constant expressions `const( ... ) `[^['expression]] can be used to assert conditions and to check the select assertion if-condition so to fully enforce the assertion constant-correctness requirement.
+However, function arguments, result value, old-of values, and the object `this` are automatically made constant by this library so constant expressions only need to be used to assert conditions on global variables, static variables, etc.
+The type of the in-scope variable __inscope_variable__ is optional and it is automatically deduced using __Boost_Typeof__ when it is not specified.
+
+[endsect]
+
+[section Loop Variants]
+
+ __loop_variant__``: [#loop_variant_anchor]``
+ __natural_expression__ ``/|/``
+ const( __inscope_variables__ ) __natural_expression_using_inscope_variables__
+
+A loop variant must specify a non-negative integral expression that monotonically decreases at each subsequent loop iteration (the library will automatically check these two conditions at each loop iteration and terminate the loop if they are not met by calling the loop variant broken handler).
+The loop variant can be specified using a constant-expression `const( ... ) `[^['expression]] so to fully enforce the contract constant-correctness requirement.
+
+[endsect]
+
+[section Named Parameter Declarations]
+
+ __named_parameter_declaration__``: [#named_parameter_declaration_anchor]``
+ ``/[/``namespace(__named_parameter_identifier_namespace__)``/]/``
+ ``/[/``(__named_argument_identifier_name__)``/]/`` __parameter_name__
+
+[endsect]
+
+[section Terminals]
+
+[table
+[
+[Terminal]
+[Description]
+[If terminal contains unwrapped commas or leading symbols]
+] [
+[__boolean_expression__[#boolean_expression_anchor]]
+[A boolean expression: `x == 1`.]
+[Wrap value within parenthesis: `(vey_sizeof<Key, T>::value)`.]
+] [
+[__boolean_expression_using_inscope_variables__[#boolean_expression_using_inscope_variables_anchor]]
+[A boolean expression that only uses in-scope variables captured as constants by a constant expression `const( ... ) `[^['expression]].]
+[Wrap value within parenthesis: `(key_sizeof<Key, T>::value + x)`.]
+] [
+[__boost_concept__[#boost_concept_anchor]]
+[A concept class defined using __Boost_ConceptCheck__: `boost::CopyConstructible`.]
+[Wrap type within parenthesis: `(boost::Convertible<T, int>)`.]
+] [
+[__catch_declaration__[#catch_declaration_anchor]]
+[The declaration of an exception for a `catch` statement: `std::runtime_error& error`.]
+[Wrap type using __Boost_Utility_IdentityType__: `BOOST_IDENTITY_TYPE((map<char, int>::exception&)) error`.]
+] [
+[__catch_instructions__[#catch_instructions_anchor]]
+[The instructions of a `catch` statement terminated by semicolons `;`: `std::cout << "error" << std::endl; exit(255);`.]
+[Wrap types using __Boost_Utility_IdentityType__ and values within parenthesis: `typedef BOOST_UTILITY_TYPE(std::map<char, int>) mtype; (mtype m, m['a'] = 1);`.]
+] [
+[__class_name__[#class_name_anchor]]
+[The class name: `myclass`. For class templates this must not include the template instantiation parameters: `vector`. (For non-template classes, the class type and name are the same.)]
+[Never the case.]
+] [
+[__class_type__[#class_type_anchor]]
+[The class type, for class templates this must include the template instantiation parameters: `vector<T>`.]
+[Wrap type within parenthesis: `(map<Key, T>)`.]
+] [
+[__constant_boolean_expression__[#constant_boolean_expression_anchor]]
+[A compile-time constant boolean expression: `sizeof(T) >= sizeof(int)`.]
+[Wrap value within parenthesis: `(boost::is_convertible<T, int>::value)`.]
+] [
+[__constant_string_literal__[#constant_string_literal_anchor]]
+[A compile-time constant string literal: `"abc"`.]
+[Do nothing: `"abc"`.]
+] [
+[__exception_type__[#exception_type_anchor]]
+[A type: `std::exception`, `int`, `mytype`.]
+[Wrap type within parenthesis: `(map<char, int>::exception)`.]
+] [
+[__function_identifier__[#function_identifier_anchor]]
+[A valid function name identifier (C++ requires it to be alphanumeric): `f`, `push_back`, `myfunc`.]
+[Never the case.]
+] [
+[__inscope_variable__[#inscope_variable_anchor]]
+[A variable in-scope.]
+[Never the case.]
+] [
+[__loop_declaration__[#loop_declaration_anchor]]
+[A loop declaration: `for(int i = 0; i < 10; ++i)`, `while(i < 10)`.]
+[Never the case.]
+] [
+[__member_initializer__[#member_initializer_anchor]]
+[A member initialization expression: `vector_(count)`.]
+[Wrap object initializations within parenthesis: `(base_map<char, int>())`.]
+] [
+[__named_argument_identifier_name__[#named_argument_identifier_anchor]]
+[The argument name to use at the calling site to pass named and deduced parameter values: `value_arg`, `NumberArg`.]
+[Never the case.]
+] [
+[__named_parameter_identifier_namespace__[#named_parameter_identifier_namespace_anchor]]
+[The internal namespace for named and deduced parameter identifiers: `params`.]
+[Never the case.]
+] [
+[__namespace_alias__[#namespace_alias_anchor]]
+[The argument to pass to namespace aliasing: `mpl = boost::mpl`.]
+[Never the case.]
+] [
+[__natural_expression__[#natural_expression_anchor]]
+[A natural (i.e., non-negative integral) expression: `2 - 1`.]
+[Wrap value within parenthesis: `(key_sizeof<Key, T>::value)`.]
+] [
+[__natural_expression_using_inscope_variables__[#natural_expression_using_inscope_variables_anchor]]
+[A natural (i.e., non-negative integral) expression that only uses in-scope variables captured as constant by a constant-expression: `x + 10`.]
+[Wrap value within parenthesis: `(key_sizeof<Key, T>::value + x)`.]
+] [
+[__new_type_name__[#new_type_name_anchor]]
+[A new type name for `typedef` statement: `myint`.]
+[Never the case.]
+] [
+[__oldof_expression__[#oldof_expression_anchor]]
+[A expression of type __ConstantCopyConstructible__ to pass to the [macroref CONTRACT_OLDOF] macro: `value`, `size()`.]
+[Wrap value within parenthesis: `(x, y)`.]
+] [
+[__operator_identifier__[#operator_identifier_anchor]]
+[An arbitrary but alphanumeric identifier: `equal`, `less`, `call`.]
+[Never the case.]
+] [
+[__operator_symbol__[#operator_symbol_anchor]]
+[The usual operator symbols: `==`, `<=`, `()`.]
+[Do nothing: `std::map<char, int>`.]
+] [
+[__parameter_default__[#parameter_default_anchor]]
+[A function or template parameter default value (either a value, a type, or a template depending on the kind of parameter): `123`.]
+[Wrap value within parenthesis: `("abc")`, `('a')`, `(-123)`, `(1.23)`.]
+] [
+[__parameter_name__[#parameter_name_anchor]]
+[A function or template parameter name: `value`, `T`.]
+[Never the case.]
+] [
+[__template_parameter__[#template_parameter_anchor]]
+[A usual C++ type template parameter, value template parameter, or template template parameter): `typename T`, `class U`, `int Number`, `T Value`, `template< typename X, class Y > class Template`.]
+[Do nothing: `std::map<Key, T> Default`, `template< typename X, class Y > class Template`.]
+] [
+[__template_specialization__[#template_specialization_anchor]]
+[A template specialization argument (type, value, etc) that follow the class name in the declaration to specialize a template: `void (int, T)`.]
+[Wrap types within parenthesis: `(std::map<char, int>)`.]
+] [
+[__type__[#type_anchor]]
+[A type: `int`, `int const&`, `mytype`.]
+[Do nothing: `std::map<char, int>`.]
+] [
+[__typedef_type__[#typedef_type_anchor]]
+[A type: `int`, `mytype`.]
+[Wrap type using __Boost_Utility_IdentityType__: `BOOST_IDENTITY_TYPE((std::map<char, int>))`.]
+] [
+[__unary_boolean_metafunction__[#unary_boolean_metafunction_anchor]]
+[A boolean meta-function that takes one parameter: `boost::is_class<boost::mpl::_>`.]
+[Do nothing: `boost:is_convertible<boost::mpl::_, int>`.]
+] [
+[__using_directive__[#using_directive_anchor]]
+[The argument to pass to a using directive: `namespace std`, `std::vector`.]
+[Never the case.]
+] [
+[__variable_name__[#variable_name_anchor]]
+[A valid name to use to declare a variable: `result`, `old_size`.]
+[Never the case.]
+]
+]
+
+If terminals contain commas not already wrapped by round parenthesis or if they start with a non-alphanumeric symbol (including tokens like `'a'`, `"abc"`, `-123`, and `1.23`),
+[footnote
+The C++ preprocessor cannot concatenate `1.23` because it contains the `.` symbol (even if that symbol is technically not the leading symbol).
+The precise preprocessor requirement is that the concatenated symbol must be a valid macro identifier and concatenating `1.23` with any token will never give a valid macro identifier because of the presence of the dot symbol `.` (e.g., `BOOST_PP_CAT(XYZ, 1.23)` gives `XYZ1.23` which is not a valid macro identifier).
+]
+they need to be wrapped by extra round parenthesis `(...)` or by the __Boost_Utility_IdentityType__ `BOOST_IDENTITY_TYPE((...))` macro.
+Value expressions can always be wrapped within extra around parenthesis in C++.
+Type expressions can always be wrapped using __Boost_Utility_IdentityType__ but that will make the syntax less readable (and it prevents C++ from automatically deducing function template parameters) so this syntax allows to wrap type expressions within extra round parenthesis `(...)` for most terminals, including types, as indicated by the table above.
+
+[endsect]
+
+[section Alternative Assertion Syntax (Not Implemented)]
+
+The following alternative syntax could have been implemented to program the contract assertions:
+
+[table
+[ [This Library Syntax] [Alternative Syntax (not implemented)] ]
+[ [``
+CONTRACT_CLASS(
+ template( typename T )
+ class (vector)
+) {
+ ...
+
+ CONTRACT_FUNCTION_TPL(
+ public (iterator) (erase) ( (iterator) where )
+ precondition(
+ not empty(),
+ where != end(),
+ static_assert(sizeof(T) >= sizeof(int), "large enough")
+ )
+ postcondition(
+ auto result = return,
+ auto old_size = CONTRACT_OLDOF size(),
+ size() == old_size - 1,
+ if(const( this ) this->empty()) (
+ result == end()
+ )
+ )
+ ) {
+ return vector_.erase(where);
+ }
+};
+`` ] [``
+CONTRACT_CLASS(
+ template( typename T )
+ class (vector)
+) {
+ ...
+
+ CONTRACT_FUNCTION_TPL(
+ public (iterator) (erase) ( (iterator) where )
+ precondition(
+ assert(not empty())
+ assert(where != end())
+ static_assert(sizeof(T) >= sizeof(int), "large enough")
+ )
+ postcondition(
+ decl(auto result = return)
+ decl(auto old_size = CONTRACT_OLDOF size())
+ assert(size() == old_size - 1)
+ if(const(this, this->empty())) (
+ assert(result == end())
+ )
+ )
+ ) {
+ return vector_.erase(where);
+ }
+};
+``] ]
+]
+
+An advantage of this alternative syntax is that it does not require commas at the end of each assertion.
+However, when compared with this library syntax, the alternative syntax is overall more verbose, it uses more parenthesis, it deviates more from __N1962__ and __Eiffel__ (even if it is more similar to __D__), and it looks less readable at least because of `decl(...)` (in many ways this alternative syntax is equivalent to the already supported sequencing syntax from the __No_Variadic_Macros__ section with the addition of ["decoration identifiers] like `assert` which might make the code more readable but are not needed syntactically).
+Therefore, the authors opted for implementing the syntax on the left hand side.
+
+[endsect]
+
+[endsect]
+

Added: sandbox/contract/doc/html/CONTRACT_BLOCK_INVARIANT.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_BLOCK_INVARIANT.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_BLOCK_INVARIANT</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.block_invariant_hpp" title="Header &lt;contract/block_invariant.hpp&gt;">
+<link rel="prev" href="reference.html" title="Reference">
+<link rel="next" href="CONTRACT_BLOCK_INVARIANT_TPL.html" title="Macro CONTRACT_BLOCK_INVARIANT_TPL">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.block_invariant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_BLOCK_INVARIANT_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_BLOCK_INVARIANT"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_BLOCK_INVARIANT</span></h2>
+<p>CONTRACT_BLOCK_INVARIANT &#8212; Macro used to specify block invariants. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.block_invariant_hpp" title="Header &lt;contract/block_invariant.hpp&gt;">contract/block_invariant.hpp</a>&gt;
+
+</span>CONTRACT_BLOCK_INVARIANT(assertions)</pre></div>
+<div class="refsect1">
+<a name="id1095444"></a><h2>Description</h2>
+<p>This macro can appear at any point in a code block within a function definition and it is used to assert correctness condition of the implementation (similarly to C++ <code class="computeroutput">assert</code>).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">assertions</code></strong></span></td>
+<td>The syntax for the assertions is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section. Static assertions, constant assertions, and select assertions can be used. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>Within a type-dependent scope (e.g., within templates), <code class="computeroutput"><a class="link" href="CONTRACT_BLOCK_INVARIANT_TPL.html" title="Macro CONTRACT_BLOCK_INVARIANT_TPL">CONTRACT_BLOCK_INVARIANT_TPL</a></code> must be used instead of this macro.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.block_invariant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_BLOCK_INVARIANT_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_BLOCK_INVARIANT_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_BLOCK_INVARIANT_TPL.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_BLOCK_INVARIANT_TPL</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.block_invariant_hpp" title="Header &lt;contract/block_invariant.hpp&gt;">
+<link rel="prev" href="CONTRACT_BLOCK_INVARIANT.html" title="Macro CONTRACT_BLOCK_INVARIANT">
+<link rel="next" href="CONTRACT_FREE_BODY.html" title="Macro CONTRACT_FREE_BODY">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_BLOCK_INVARIANT.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.block_invariant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_FREE_BODY.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_BLOCK_INVARIANT_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_BLOCK_INVARIANT_TPL</span></h2>
+<p>CONTRACT_BLOCK_INVARIANT_TPL &#8212; Macro used to specify block invariants within a type-dependent scope (e.g., within templates). </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.block_invariant_hpp" title="Header &lt;contract/block_invariant.hpp&gt;">contract/block_invariant.hpp</a>&gt;
+
+</span>CONTRACT_BLOCK_INVARIANT_TPL(assertions)</pre></div>
+<div class="refsect1">
+<a name="id1095534"></a><h2>Description</h2>
+<p>This macro is the exact same as <code class="computeroutput"><a class="link" href="CONTRACT_BLOCK_INVARIANT.html" title="Macro CONTRACT_BLOCK_INVARIANT">CONTRACT_BLOCK_INVARIANT</a></code> but is must be used when specifying block invariants within a type-dependent scope.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_BLOCK_INVARIANT.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.block_invariant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_FREE_BODY.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CLASS.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CLASS.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CLASS</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.class_hpp" title="Header &lt;contract/class.hpp&gt;">
+<link rel="prev" href="contract/loop_variant_broken.html" title="Function loop_variant_broken">
+<link rel="next" href="CONTRACT_CLASS_TPL.html" title="Macro CONTRACT_CLASS_TPL">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="contract/loop_variant_broken.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.class_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CLASS_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CLASS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CLASS</span></h2>
+<p>CONTRACT_CLASS &#8212; Macro used to declare classes with contracts. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.class_hpp" title="Header &lt;contract/class.hpp&gt;">contract/class.hpp</a>&gt;
+
+</span>CONTRACT_CLASS(class_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1098881"></a><h2>Description</h2>
+<p>This macro is used to declare a class with class invariants and member functions with preconditions and postconditions. A class declared with this macro must always specify (possibly empty) class invariants using the <code class="computeroutput"><a class="link" href="CONTRACT_CLASS_INVARIANT.html" title="Macro CONTRACT_CLASS_INVARIANT">CONTRACT_CLASS_INVARIANT</a></code> macro.</p>
+<p>Constructors, destructors, and member functions with contracts are declared using the <code class="computeroutput"><a class="link" href="CONTRACT_CONSTRUCTOR.html" title="Macro CONTRACT_CONSTRUCTOR">CONTRACT_CONSTRUCTOR</a></code>, <code class="computeroutput"><a class="link" href="CONTRACT_DESTRUCTOR.html" title="Macro CONTRACT_DESTRUCTOR">CONTRACT_DESTRUCTOR</a></code>, and <code class="computeroutput"><a class="link" href="CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> macros respectively. The semantics of calls to constructors, destructors, and member functions with contracts are explained in the <a class="link" href="contract__/contract_programming_overview.html" title="Contract Programming Overview"> Contract Programming Overview</a> section.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">class_declaration</code></strong></span></td>
+<td>The class declaration syntax is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section. If present, base classes must be specified using <code class="computeroutput">extends( ... )</code>. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>Nested classes with contracts are also declared using this macro but they must always repeat their access level <code class="computeroutput">public</code>, <code class="computeroutput">protected</code>, or <code class="computeroutput">private</code>. Within a type-dependent scope, nested classes with contracts must be declared using the <code class="computeroutput"><a class="link" href="CONTRACT_CLASS_TPL.html" title="Macro CONTRACT_CLASS_TPL">CONTRACT_CLASS_TPL</a></code> macro.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="contract/loop_variant_broken.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.class_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CLASS_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CLASS_INVARIANT.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CLASS_INVARIANT.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CLASS_INVARIANT</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.class_invariant_hpp" title="Header &lt;contract/class_invariant.hpp&gt;">
+<link rel="prev" href="CONTRACT_CLASS_TPL.html" title="Macro CONTRACT_CLASS_TPL">
+<link rel="next" href="CONTRACT_CLASS_INVARIANT_TPL.html" title="Macro CONTRACT_CLASS_INVARIANT_TPL">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CLASS_TPL.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.class_invariant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CLASS_INVARIANT_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CLASS_INVARIANT"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CLASS_INVARIANT</span></h2>
+<p>CONTRACT_CLASS_INVARIANT &#8212; Macro used to specify class invariants. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.class_invariant_hpp" title="Header &lt;contract/class_invariant.hpp&gt;">contract/class_invariant.hpp</a>&gt;
+
+</span>CONTRACT_CLASS_INVARIANT(class_invariants)</pre></div>
+<div class="refsect1">
+<a name="id1099103"></a><h2>Description</h2>
+<p>This macro must be used to specify class invariant at the very beginning of the definition of a class with contracts declared using the <code class="computeroutput"><a class="link" href="CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">CONTRACT_CLASS</a></code> macro (no other statement can appear before this macro in the class definition, not even a <code class="computeroutput">typedef</code> or a <code class="computeroutput">friend</code> declaration).</p>
+<p>Constructors, destructors, and member functions with contracts are declared using the <code class="computeroutput"><a class="link" href="CONTRACT_CONSTRUCTOR.html" title="Macro CONTRACT_CONSTRUCTOR">CONTRACT_CONSTRUCTOR</a></code>, <code class="computeroutput"><a class="link" href="CONTRACT_DESTRUCTOR.html" title="Macro CONTRACT_DESTRUCTOR">CONTRACT_DESTRUCTOR</a></code>, and <code class="computeroutput"><a class="link" href="CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> macros respectively. The semantics of calls to constructors, destructors, and member functions of a class with contracts are explained in the <a class="link" href="contract__/contract_programming_overview.html" title="Contract Programming Overview"> Contract Programming Overview</a> section.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">class_invariants</code></strong></span></td>
+<td>The syntax for class invariants is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section. Use <code class="computeroutput">void</code> to specify empty class invariant. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>Within a type-dependent scope (e.g., within templates), the <code class="computeroutput"><a class="link" href="CONTRACT_CLASS_INVARIANT_TPL.html" title="Macro CONTRACT_CLASS_INVARIANT_TPL">CONTRACT_CLASS_INVARIANT_TPL</a></code> macro must be used instead of this macro.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CLASS_TPL.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.class_invariant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CLASS_INVARIANT_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CLASS_INVARIANT_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CLASS_INVARIANT_TPL.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CLASS_INVARIANT_TPL</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.class_invariant_hpp" title="Header &lt;contract/class_invariant.hpp&gt;">
+<link rel="prev" href="CONTRACT_CLASS_INVARIANT.html" title="Macro CONTRACT_CLASS_INVARIANT">
+<link rel="next" href="CONTRACT_CONFIG_NO_PRECONDITIONS.html" title="Macro CONTRACT_CONFIG_NO_PRECONDITIONS">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CLASS_INVARIANT.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.class_invariant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_NO_PRECONDITIONS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CLASS_INVARIANT_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CLASS_INVARIANT_TPL</span></h2>
+<p>CONTRACT_CLASS_INVARIANT_TPL &#8212; Macro used to specify class invariants within a type-dependent scope (e.g., within templates). </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.class_invariant_hpp" title="Header &lt;contract/class_invariant.hpp&gt;">contract/class_invariant.hpp</a>&gt;
+
+</span>CONTRACT_CLASS_INVARIANT_TPL(class_invariants)</pre></div>
+<div class="refsect1">
+<a name="id1099239"></a><h2>Description</h2>
+<p>This macro is the exact same as <code class="computeroutput"><a class="link" href="CONTRACT_CLASS_INVARIANT.html" title="Macro CONTRACT_CLASS_INVARIANT">CONTRACT_CLASS_INVARIANT</a></code> but it must be used when specifying class invariants within a type-dependent scope.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CLASS_INVARIANT.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.class_invariant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_NO_PRECONDITIONS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CLASS_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CLASS_TPL.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CLASS_TPL</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.class_hpp" title="Header &lt;contract/class.hpp&gt;">
+<link rel="prev" href="CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">
+<link rel="next" href="CONTRACT_CLASS_INVARIANT.html" title="Macro CONTRACT_CLASS_INVARIANT">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CLASS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.class_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CLASS_INVARIANT.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CLASS_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CLASS_TPL</span></h2>
+<p>CONTRACT_CLASS_TPL &#8212; Macro used to declare nested classes with contracts within a type-dependent scope (e.g., within templates). </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.class_hpp" title="Header &lt;contract/class.hpp&gt;">contract/class.hpp</a>&gt;
+
+</span>CONTRACT_CLASS_TPL(class_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1099022"></a><h2>Description</h2>
+<p>This macro is the exact same as <code class="computeroutput"><a class="link" href="CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">CONTRACT_CLASS</a></code> but it must be used when declaring nested classes with contracts within a type-dependent scope.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CLASS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.class_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CLASS_INVARIANT.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_ARRAY_DIMENSION_MAX.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_ARRAY_DIMENSION_MAX.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_ARRAY_DIMENSION_MAX</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_OLDOF_MAX.html" title="Macro CONTRACT_CONFIG_OLDOF_MAX">
+<link rel="next" href="CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html" title="Macro CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_OLDOF_MAX.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_ARRAY_DIMENSION_MAX"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_ARRAY_DIMENSION_MAX</span></h2>
+<p>CONTRACT_CONFIG_ARRAY_DIMENSION_MAX &#8212; Specify the maximum supported array dimension for multi-dimensional arrays. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_ARRAY_DIMENSION_MAX</pre></div>
+<div class="refsect1">
+<a name="id1099957"></a><h2>Description</h2>
+<p>This macro automatically defaults to <code class="computeroutput">3</code> if left undefined by programmers (therefore, by default up to 3-dimensional arrays <code class="computeroutput">x[]</code>, <code class="computeroutput">x[][]</code>, and <code class="computeroutput">x[][][]</code> can be passed to functions declared using this library, but always using an extra <code class="computeroutput">typedef</code> as specified by the <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section). This macro must be a non-negative integral number. Increasing the value specified by this macro might increase compilation time.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_OLDOF_MAX.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_ARRAY_DIMENSION_MAX.html" title="Macro CONTRACT_CONFIG_ARRAY_DIMENSION_MAX">
+<link rel="next" href="CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION.html" title="Macro CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_ARRAY_DIMENSION_MAX.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS</span></h2>
+<p>CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS &#8212; Do not allow overriding functions to specify preconditions. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS</pre></div>
+<div class="refsect1">
+<a name="id1100031"></a><h2>Description</h2>
+<p>If programmers define this macro, the library will generate a compile-time error if overriding functions specify preconditions. Therefore, preconditions can only be specified by functions at the very root of the inheritance tree and they cannot be subcontracted (this is as specified by <a class="link" href="contract__/bibliography.html" title="Bibliography"> [N1962]</a>, however note that in case of multiple-inheritance the preconditions of all base functions will still be checked in logic-or with each other effectively still allowing a base class to weaken the preconditions from another base class).</p>
+<p>By default, this library allows to subcontract preconditions.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_ARRAY_DIMENSION_MAX.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_FUNCTION_ARITY_MAX.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_FUNCTION_ARITY_MAX.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_FUNCTION_ARITY_MAX</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_NO_LOOP_VARIANTS.html" title="Macro CONTRACT_CONFIG_NO_LOOP_VARIANTS">
+<link rel="next" href="CONTRACT_CONFIG_INHERITANCE_MAX.html" title="Macro CONTRACT_CONFIG_INHERITANCE_MAX">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_NO_LOOP_VARIANTS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_INHERITANCE_MAX.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_FUNCTION_ARITY_MAX"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_FUNCTION_ARITY_MAX</span></h2>
+<p>CONTRACT_CONFIG_FUNCTION_ARITY_MAX &#8212; Specify the maximum number of supported function parameters. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_FUNCTION_ARITY_MAX</pre></div>
+<div class="refsect1">
+<a name="id1099802"></a><h2>Description</h2>
+<p>This macro automatically defaults to <code class="computeroutput">5</code> if left undefined by programmers. This macro must be a non-negative integral number. Increasing the value specified by this macro might increase compilation time.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_NO_LOOP_VARIANTS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_INHERITANCE_MAX.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_INHERITANCE_MAX.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_INHERITANCE_MAX.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_INHERITANCE_MAX</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro CONTRACT_CONFIG_FUNCTION_ARITY_MAX">
+<link rel="next" href="CONTRACT_CONFIG_OLDOF_MAX.html" title="Macro CONTRACT_CONFIG_OLDOF_MAX">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_OLDOF_MAX.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_INHERITANCE_MAX"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_INHERITANCE_MAX</span></h2>
+<p>CONTRACT_CONFIG_INHERITANCE_MAX &#8212; Specify the maximum number of base classes supported for multiple-inheritance. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_INHERITANCE_MAX</pre></div>
+<div class="refsect1">
+<a name="id1099851"></a><h2>Description</h2>
+<p>This macro automatically defaults to <code class="computeroutput">4</code> if left undefined by programmers. This macro must be a non-negative integral number. Increasing the value specified by this macro might increase compilation time.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_OLDOF_MAX.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_NO_BLOCK_INVARIANTS.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_NO_BLOCK_INVARIANTS.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_NO_BLOCK_INVARIANTS</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_NO_CLASS_INVARIANTS.html" title="Macro CONTRACT_CONFIG_NO_CLASS_INVARIANTS">
+<link rel="next" href="CONTRACT_CONFIG_NO_LOOP_VARIANTS.html" title="Macro CONTRACT_CONFIG_NO_LOOP_VARIANTS">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_NO_CLASS_INVARIANTS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_NO_LOOP_VARIANTS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_NO_BLOCK_INVARIANTS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_NO_BLOCK_INVARIANTS</span></h2>
+<p>CONTRACT_CONFIG_NO_BLOCK_INVARIANTS &#8212; Disable compilation and run-time checking of all block invariants. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_NO_BLOCK_INVARIANTS</pre></div>
+<div class="refsect1">
+<a name="id1099690"></a><h2>Description</h2>
+<p>Block invariants are not checked at run-time and not even compiled when programmers define this macro. This can be used to speed up execution and compilation of debug and release builds at different stages of development and testing as it is common practise in Contract Programming.</p>
+<p><span class="bold"><strong>Note:</strong></span> Assertion requirements can be used to selectively disable single assertions (see the <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/getting_started.html" title="Getting Started"> Getting Started</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_NO_CLASS_INVARIANTS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_NO_LOOP_VARIANTS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_NO_CLASS_INVARIANTS.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_NO_CLASS_INVARIANTS.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_NO_CLASS_INVARIANTS</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_NO_POSTCONDITIONS.html" title="Macro CONTRACT_CONFIG_NO_POSTCONDITIONS">
+<link rel="next" href="CONTRACT_CONFIG_NO_BLOCK_INVARIANTS.html" title="Macro CONTRACT_CONFIG_NO_BLOCK_INVARIANTS">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_NO_POSTCONDITIONS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_NO_BLOCK_INVARIANTS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_NO_CLASS_INVARIANTS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_NO_CLASS_INVARIANTS</span></h2>
+<p>CONTRACT_CONFIG_NO_CLASS_INVARIANTS &#8212; Disable compilation and run-time checking of all class invariants. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_NO_CLASS_INVARIANTS</pre></div>
+<div class="refsect1">
+<a name="id1099635"></a><h2>Description</h2>
+<p>Class invariants are not checked at run-time and not even compiled when programmers define this macro. This can be used to speed up execution and compilation of debug and release builds at different stages of development and testing as it is common practise in Contract Programming.</p>
+<p><span class="bold"><strong>Note:</strong></span> Assertion requirements can be used to selectively disable single assertions (see the <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/getting_started.html" title="Getting Started"> Getting Started</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_NO_POSTCONDITIONS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_NO_BLOCK_INVARIANTS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_NO_LOOP_VARIANTS.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_NO_LOOP_VARIANTS.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_NO_LOOP_VARIANTS</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_NO_BLOCK_INVARIANTS.html" title="Macro CONTRACT_CONFIG_NO_BLOCK_INVARIANTS">
+<link rel="next" href="CONTRACT_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro CONTRACT_CONFIG_FUNCTION_ARITY_MAX">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_NO_BLOCK_INVARIANTS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_NO_LOOP_VARIANTS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_NO_LOOP_VARIANTS</span></h2>
+<p>CONTRACT_CONFIG_NO_LOOP_VARIANTS &#8212; Disable compilation and run-time checking of all loop variants. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_NO_LOOP_VARIANTS</pre></div>
+<div class="refsect1">
+<a name="id1099746"></a><h2>Description</h2>
+<p>Loop variants are not checked at run-time and not even compiled when programmers define this macro. This can be used to speed up execution and compilation of debug and release builds at different stages of development and testing as it is common practise in Contract Programming.</p>
+<p><span class="bold"><strong>Note:</strong></span> Assertion requirements can be used to selectively disable single assertions (see the <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/getting_started.html" title="Getting Started"> Getting Started</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_NO_BLOCK_INVARIANTS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_FUNCTION_ARITY_MAX.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_NO_POSTCONDITIONS.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_NO_POSTCONDITIONS.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_NO_POSTCONDITIONS</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_NO_PRECONDITIONS.html" title="Macro CONTRACT_CONFIG_NO_PRECONDITIONS">
+<link rel="next" href="CONTRACT_CONFIG_NO_CLASS_INVARIANTS.html" title="Macro CONTRACT_CONFIG_NO_CLASS_INVARIANTS">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_NO_PRECONDITIONS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_NO_CLASS_INVARIANTS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_NO_POSTCONDITIONS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_NO_POSTCONDITIONS</span></h2>
+<p>CONTRACT_CONFIG_NO_POSTCONDITIONS &#8212; Disable compilation and run-time checking of all postconditions. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_NO_POSTCONDITIONS</pre></div>
+<div class="refsect1">
+<a name="id1099580"></a><h2>Description</h2>
+<p>Postconditions are not checked at run-time and not even compiled when programmers define this macro. This can be used to speed up execution and compilation of debug and release builds at different stages of development and testing as it is common practise in Contract Programming.</p>
+<p><span class="bold"><strong>Note:</strong></span> Assertion requirements can be used to selectively disable single assertions (see the <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/getting_started.html" title="Getting Started"> Getting Started</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_NO_PRECONDITIONS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_NO_CLASS_INVARIANTS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_NO_PRECONDITIONS.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_NO_PRECONDITIONS.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_NO_PRECONDITIONS</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CLASS_INVARIANT_TPL.html" title="Macro CONTRACT_CLASS_INVARIANT_TPL">
+<link rel="next" href="CONTRACT_CONFIG_NO_POSTCONDITIONS.html" title="Macro CONTRACT_CONFIG_NO_POSTCONDITIONS">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CLASS_INVARIANT_TPL.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_NO_POSTCONDITIONS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_NO_PRECONDITIONS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_NO_PRECONDITIONS</span></h2>
+<p>CONTRACT_CONFIG_NO_PRECONDITIONS &#8212; Disable compilation and run-time checking of all preconditions. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_NO_PRECONDITIONS</pre></div>
+<div class="refsect1">
+<a name="id1099418"></a><h2>Description</h2>
+<p>Preconditions are not checked at run-time and not even compiled when programmers define this macro. This can be used to speed up execution and compilation of debug and release builds at different stages of development and testing as it is common practise in Contract Programming.</p>
+<p><span class="bold"><strong>Note:</strong></span> Assertion requirements can be used to selectively disable single assertions (see the <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/getting_started.html" title="Getting Started"> Getting Started</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CLASS_INVARIANT_TPL.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_NO_POSTCONDITIONS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_OLDOF_MAX.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_OLDOF_MAX.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_OLDOF_MAX</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_INHERITANCE_MAX.html" title="Macro CONTRACT_CONFIG_INHERITANCE_MAX">
+<link rel="next" href="CONTRACT_CONFIG_ARRAY_DIMENSION_MAX.html" title="Macro CONTRACT_CONFIG_ARRAY_DIMENSION_MAX">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_INHERITANCE_MAX.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_ARRAY_DIMENSION_MAX.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_OLDOF_MAX"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_OLDOF_MAX</span></h2>
+<p>CONTRACT_CONFIG_OLDOF_MAX &#8212; Specify the maximum number of supported old value declarations in postconditions. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_OLDOF_MAX</pre></div>
+<div class="refsect1">
+<a name="id1099900"></a><h2>Description</h2>
+<p>This macro automatically defaults to <code class="computeroutput">5</code> if left undefined by programmers. This macro must be a non-negative integral number smaller or equal to <code class="computeroutput"><a class="link" href="CONTRACT_LIMIT_OLDOFS.html" title="Macro CONTRACT_LIMIT_OLDOFS">CONTRACT_LIMIT_OLDOFS</a></code>. Increasing the value specified by this macro might increase compilation time.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_INHERITANCE_MAX.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_ARRAY_DIMENSION_MAX.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html" title="Macro CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS">
+<link rel="next" href="CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE.html" title="Macro CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION</span></h2>
+<p>CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION &#8212; Specify that no assertion should be disabled while checking preconditions. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION</pre></div>
+<div class="refsect1">
+<a name="id1100085"></a><h2>Description</h2>
+<p>Assertion checking is disabled within assertions in order to avoid infinite recursion and that is a standard requirement of Contract Programming. However, if programmers define this macro then no assertion checking is disabled within preconditions (this is as specified by <a class="link" href="contract__/bibliography.html" title="Bibliography"> [N1962]</a>). Assertion checking within assertion checking will still be disabled for postconditions, class invariants, etc.</p>
+<p>By default, this library disables assertion checking within assertions for all contracts, including preconditions.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/contract_programming_overview.html" title="Contract Programming Overview"> Contract Programming Overview</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION.html" title="Macro CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION">
+<link rel="next" href="CONTRACT_CONFIG_THREAD_SAFE.html" title="Macro CONTRACT_CONFIG_THREAD_SAFE">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_THREAD_SAFE.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE</span></h2>
+<p>CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE &#8212; Report precondition that failed in the overridden function (instead of the precondition failed in the overriding function). </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE</pre></div>
+<div class="refsect1">
+<a name="id1100137"></a><h2>Description</h2>
+<p>Subcontracted preconditions fail only when the preconditions of the overriding function fail together with the overridden preconditions from all the base classes. By default the assertion that failed in the overriding function is reported. If programmes define this macro then the library will instead the report the assertion that failed in the overridden function from within one of the base classes.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_PRECONDITIONS_DISABLE_NO_ASSERTION.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONFIG_THREAD_SAFE.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONFIG_THREAD_SAFE.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONFIG_THREAD_SAFE.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONFIG_THREAD_SAFE</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE.html" title="Macro CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE">
+<link rel="next" href="CONTRACT_CONSTRUCTOR.html" title="Macro CONTRACT_CONSTRUCTOR">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONSTRUCTOR.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONFIG_THREAD_SAFE"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONFIG_THREAD_SAFE</span></h2>
+<p>CONTRACT_CONFIG_THREAD_SAFE &#8212; Make the implementation of this library thread-safe. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.config_hpp" title="Header &lt;contract/config.hpp&gt;">contract/config.hpp</a>&gt;
+
+</span>CONTRACT_CONFIG_THREAD_SAFE</pre></div>
+<div class="refsect1">
+<a name="id1100181"></a><h2>Description</h2>
+<p>In order to globally disable assertion checking within assertions, this library internally has to use a global variable. If programmers defined this macro, such a variable will be automatically locked to avoid race conditions (this effectively introduces a global lock in the program).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/contract_programming_overview.html" title="Contract Programming Overview"> Contract Programming Overview</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.config_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONSTRUCTOR.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,71 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONSTRUCTOR</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.constructor_hpp" title="Header &lt;contract/constructor.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONFIG_THREAD_SAFE.html" title="Macro CONTRACT_CONFIG_THREAD_SAFE">
+<link rel="next" href="CONTRACT_CONSTRUCTOR_TPL.html" title="Macro CONTRACT_CONSTRUCTOR_TPL">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_THREAD_SAFE.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.constructor_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONSTRUCTOR_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONSTRUCTOR"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONSTRUCTOR</span></h2>
+<p>CONTRACT_CONSTRUCTOR &#8212; Macro used to declare constructors with contracts. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.constructor_hpp" title="Header &lt;contract/constructor.hpp&gt;">contract/constructor.hpp</a>&gt;
+
+</span>CONTRACT_CONSTRUCTOR(function_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1100256"></a><h2>Description</h2>
+<p>This macro is used to declare a constructor with possible preconditions and postconditions. At least all public constructors of a class with non-empty class invariants should be declared using this macro so to check the class invariants (even if the constructors have no precondition and no postcondition).</p>
+<p>The semantics of a call to a constructor with contracts are explained in the <a class="link" href="contract__/contract_programming_overview.html" title="Contract Programming Overview"> Contract Programming Overview</a> section. Destructors and member functions are declared using the <code class="computeroutput"><a class="link" href="CONTRACT_DESTRUCTOR.html" title="Macro CONTRACT_DESTRUCTOR">CONTRACT_DESTRUCTOR</a></code> and <code class="computeroutput"><a class="link" href="CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> macros respectively.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">function_declaration</code></strong></span></td>
+<td>The constructor declaration syntax is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section. Constructors must always repeat their access level <code class="computeroutput">public</code>, <code class="computeroutput">protected</code>, or <code class="computeroutput">private</code>. If present, member initializers must be specified using <code class="computeroutput">initialize( ... )</code> and within this macro (even if they are technically part of the constructor definition and not of its declaration). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>The <code class="computeroutput"><a class="link" href="CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">CONTRACT_CLASS</a></code> macro must be used to declare the class enclosing a constructor declared using this macro.</p>
+<p>Within a type-dependent scope (e.g., within templates), the <code class="computeroutput"><a class="link" href="CONTRACT_CONSTRUCTOR_TPL.html" title="Macro CONTRACT_CONSTRUCTOR_TPL">CONTRACT_CONSTRUCTOR_TPL</a></code> macro must be used instead of this macro.</p>
+<p>The <code class="computeroutput"><a class="link" href="CONTRACT_CONSTRUCTOR_BODY.html" title="Macro CONTRACT_CONSTRUCTOR_BODY">CONTRACT_CONSTRUCTOR_BODY</a></code> macro must be used when separating the constructor body definition form the constructor declaration programmed using this macro. Unfortunately, it is not possible to use this macro so separate body definitions for constructors that have member initializers.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONFIG_THREAD_SAFE.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.constructor_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONSTRUCTOR_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR_ARG.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR_ARG.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,67 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONSTRUCTOR_ARG</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.parameter_hpp" title="Header &lt;contract/parameter.hpp&gt;">
+<link rel="prev" href="CONTRACT_OLDOF.html" title="Macro CONTRACT_OLDOF">
+<link rel="next" href="CONTRACT_PARAMETER_TYPEOF.html" title="Macro CONTRACT_PARAMETER_TYPEOF">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_OLDOF.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.parameter_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_PARAMETER_TYPEOF.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONSTRUCTOR_ARG"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONSTRUCTOR_ARG</span></h2>
+<p>CONTRACT_CONSTRUCTOR_ARG &#8212; Macro used to access constructor named or deduced arguments within member initializers. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.parameter_hpp" title="Header &lt;contract/parameter.hpp&gt;">contract/parameter.hpp</a>&gt;
+
+</span>CONTRACT_CONSTRUCTOR_ARG(parameter_name)</pre></div>
+<div class="refsect1">
+<a name="id1103426"></a><h2>Description</h2>
+<p>This macro must be used to access the constructor arguments within the member initializers. Outside of the member initializers, the parameter names are used directly as usual and without using this macro.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">parameter_name</code></strong></span></td>
+<td>The name of a constructor named or deduced parameter previously declared using the <code class="computeroutput"><a class="link" href="CONTRACT_PARAMETER.html" title="Macro CONTRACT_PARAMETER">CONTRACT_PARAMETER</a></code> macro. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/named_parameters.html" title="Named Parameters"> Named Parameters</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_OLDOF.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.parameter_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_PARAMETER_TYPEOF.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR_BODY.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR_BODY.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,74 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONSTRUCTOR_BODY</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.body_hpp" title="Header &lt;contract/body.hpp&gt;">
+<link rel="prev" href="CONTRACT_MEMBER_BODY.html" title="Macro CONTRACT_MEMBER_BODY">
+<link rel="next" href="CONTRACT_DESTRUCTOR_BODY.html" title="Macro CONTRACT_DESTRUCTOR_BODY">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_MEMBER_BODY.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.body_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_DESTRUCTOR_BODY.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONSTRUCTOR_BODY"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONSTRUCTOR_BODY</span></h2>
+<p>CONTRACT_CONSTRUCTOR_BODY &#8212; Macro used to name the body of constructors. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.body_hpp" title="Header &lt;contract/body.hpp&gt;">contract/body.hpp</a>&gt;
+
+</span>CONTRACT_CONSTRUCTOR_BODY(class_type, constructor_name)</pre></div>
+<div class="refsect1">
+<a name="id1095799"></a><h2>Description</h2>
+<p>This macro is used to name the body of constructors when the body is defined separately from the contract declaration. Constructors with contracts are declared using the <code class="computeroutput"><a class="link" href="CONTRACT_CONSTRUCTOR.html" title="Macro CONTRACT_CONSTRUCTOR">CONTRACT_CONSTRUCTOR</a></code> macro.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><span class="bold"><strong><code class="computeroutput">class_type</code></strong></span></td>
+<td>The syntax for the class type is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section (for class templates, this type is qualified with the template parameters). </td>
+</tr>
+<tr>
+<td><span class="bold"><strong><code class="computeroutput">constructor_name</code></strong></span></td>
+<td>This is the class name and its syntax is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section (for class templates, this name is <span class="emphasis"><em>not</em></span> qualified with the template parameters). </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>Warning:</strong></span> The body of constructors with member initializers should always be defined together with the constructor declaration and its contract.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_MEMBER_BODY.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.body_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_DESTRUCTOR_BODY.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_CONSTRUCTOR_TPL.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_CONSTRUCTOR_TPL</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.constructor_hpp" title="Header &lt;contract/constructor.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONSTRUCTOR.html" title="Macro CONTRACT_CONSTRUCTOR">
+<link rel="next" href="contract/copy.html" title="Class template copy">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONSTRUCTOR.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.constructor_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="contract/copy.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_CONSTRUCTOR_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_CONSTRUCTOR_TPL</span></h2>
+<p>CONTRACT_CONSTRUCTOR_TPL &#8212; Macro used to declare constructors with contracts within a type-dependent scope (e.g., within templates). </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.constructor_hpp" title="Header &lt;contract/constructor.hpp&gt;">contract/constructor.hpp</a>&gt;
+
+</span>CONTRACT_CONSTRUCTOR_TPL(function_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1100404"></a><h2>Description</h2>
+<p>This macro is the exact same as <code class="computeroutput"><a class="link" href="CONTRACT_CONSTRUCTOR.html" title="Macro CONTRACT_CONSTRUCTOR">CONTRACT_CONSTRUCTOR</a></code> but it must be used when declaring constructors with contracts within a type-dependent scope.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONSTRUCTOR.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.constructor_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="contract/copy.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_DESTRUCTOR.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_DESTRUCTOR.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,71 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_DESTRUCTOR</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.destructor_hpp" title="Header &lt;contract/destructor.hpp&gt;">
+<link rel="prev" href="contract/copy.html" title="Class template copy">
+<link rel="next" href="CONTRACT_DESTRUCTOR_TPL.html" title="Macro CONTRACT_DESTRUCTOR_TPL">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="contract/copy.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.destructor_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_DESTRUCTOR_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_DESTRUCTOR"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_DESTRUCTOR</span></h2>
+<p>CONTRACT_DESTRUCTOR &#8212; Macro used to declare destructors with contracts. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.destructor_hpp" title="Header &lt;contract/destructor.hpp&gt;">contract/destructor.hpp</a>&gt;
+
+</span>CONTRACT_DESTRUCTOR(function_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1101008"></a><h2>Description</h2>
+<p>This macro is used to declare a destructor. At least the public destructor of a class with non-empty class invariants should be declared using this macro in order to check the class invariants (even if destructors never have preconditions or postconditions).</p>
+<p>The semantics of a call to a destructor with contracts are explained in the <a class="link" href="contract__/contract_programming_overview.html" title="Contract Programming Overview"> Contract Programming Overview</a> section. Constructor and member functions are declared using the <code class="computeroutput"><a class="link" href="CONTRACT_CONSTRUCTOR.html" title="Macro CONTRACT_CONSTRUCTOR">CONTRACT_CONSTRUCTOR</a></code> and <code class="computeroutput"><a class="link" href="CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> macros respectively.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">function_declaration</code></strong></span></td>
+<td>The destructor declaration syntax is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section. Destructors must always repeat their access level <code class="computeroutput">public</code>, <code class="computeroutput">protected</code>, or <code class="computeroutput">private</code>. The keyword <code class="computeroutput">void</code> must be used to indicate that the destructor has an empty parameter list. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>The <code class="computeroutput"><a class="link" href="CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">CONTRACT_CLASS</a></code> macro must be used to declare the class enclosing a destructor declared using this macro.</p>
+<p>Within a type-dependent scope (e.g., within templates), the <code class="computeroutput"><a class="link" href="CONTRACT_DESTRUCTOR_TPL.html" title="Macro CONTRACT_DESTRUCTOR_TPL">CONTRACT_DESTRUCTOR_TPL</a></code> macro must be used instead of this macro.</p>
+<p>The <code class="computeroutput"><a class="link" href="CONTRACT_DESTRUCTOR_BODY.html" title="Macro CONTRACT_DESTRUCTOR_BODY">CONTRACT_DESTRUCTOR_BODY</a></code> macro must be used when separating the destructor body definition from the destruction declaration programmed using this macro.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="contract/copy.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.destructor_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_DESTRUCTOR_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_DESTRUCTOR_BODY.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_DESTRUCTOR_BODY.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,73 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_DESTRUCTOR_BODY</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.body_hpp" title="Header &lt;contract/body.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONSTRUCTOR_BODY.html" title="Macro CONTRACT_CONSTRUCTOR_BODY">
+<link rel="next" href="contract/broken.html" title="Class broken">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONSTRUCTOR_BODY.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.body_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="contract/broken.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_DESTRUCTOR_BODY"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_DESTRUCTOR_BODY</span></h2>
+<p>CONTRACT_DESTRUCTOR_BODY &#8212; Macro used to name the body of destructors. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.body_hpp" title="Header &lt;contract/body.hpp&gt;">contract/body.hpp</a>&gt;
+
+</span>CONTRACT_DESTRUCTOR_BODY(class_type, destructor_name)</pre></div>
+<div class="refsect1">
+<a name="id1095910"></a><h2>Description</h2>
+<p>This macro is used to name the body of destructors when the body is defined separately from the contract declaration. Destructors with contracts are declared using the <code class="computeroutput"><a class="link" href="CONTRACT_DESTRUCTOR.html" title="Macro CONTRACT_DESTRUCTOR">CONTRACT_DESTRUCTOR</a></code> macro.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><span class="bold"><strong><code class="computeroutput">class_type</code></strong></span></td>
+<td>The syntax for the class type is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section (for class templates, this type is qualified with the template parameters). </td>
+</tr>
+<tr>
+<td><span class="bold"><strong><code class="computeroutput">destructor_name</code></strong></span></td>
+<td>This is the class name prefixed by the tilde symbol <code class="computeroutput">~</code> and its syntax is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section (for class templates, this name is <span class="emphasis"><em>not</em></span> qualified with the template parameters). </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONSTRUCTOR_BODY.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.body_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="contract/broken.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_DESTRUCTOR_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_DESTRUCTOR_TPL.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_DESTRUCTOR_TPL</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.destructor_hpp" title="Header &lt;contract/destructor.hpp&gt;">
+<link rel="prev" href="CONTRACT_DESTRUCTOR.html" title="Macro CONTRACT_DESTRUCTOR">
+<link rel="next" href="CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_DESTRUCTOR.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.destructor_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_FUNCTION.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_DESTRUCTOR_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_DESTRUCTOR_TPL</span></h2>
+<p>CONTRACT_DESTRUCTOR_TPL &#8212; Macro used to declare destructors with contracts within a type-dependent scope (e.g., within templates). </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.destructor_hpp" title="Header &lt;contract/destructor.hpp&gt;">contract/destructor.hpp</a>&gt;
+
+</span>CONTRACT_DESTRUCTOR_TPL(function_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1101154"></a><h2>Description</h2>
+<p>This macro is the exact same as <code class="computeroutput"><a class="link" href="CONTRACT_DESTRUCTOR.html" title="Macro CONTRACT_DESTRUCTOR">CONTRACT_DESTRUCTOR</a></code> but it must be used when declaring destructors with contracts within a type-dependent scope.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_DESTRUCTOR.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.destructor_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_FUNCTION.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_FREE_BODY.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_FREE_BODY.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,67 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_FREE_BODY</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.body_hpp" title="Header &lt;contract/body.hpp&gt;">
+<link rel="prev" href="CONTRACT_BLOCK_INVARIANT_TPL.html" title="Macro CONTRACT_BLOCK_INVARIANT_TPL">
+<link rel="next" href="CONTRACT_MEMBER_BODY.html" title="Macro CONTRACT_MEMBER_BODY">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_BLOCK_INVARIANT_TPL.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.body_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_MEMBER_BODY.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_FREE_BODY"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_FREE_BODY</span></h2>
+<p>CONTRACT_FREE_BODY &#8212; Macro used to name the body of free functions and free function operators. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.body_hpp" title="Header &lt;contract/body.hpp&gt;">contract/body.hpp</a>&gt;
+
+</span>CONTRACT_FREE_BODY(function_name)</pre></div>
+<div class="refsect1">
+<a name="id1095625"></a><h2>Description</h2>
+<p>This macro is used to name the body of free functions and free function operators when the body is defined separately from the contract declaration. Free functions and free function operators with contracts are declared using the <code class="computeroutput"><a class="link" href="CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> macro.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">function_name</code></strong></span></td>
+<td>The syntax for free function and free function operator names is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_BLOCK_INVARIANT_TPL.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.body_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_MEMBER_BODY.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_FUNCTION.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_FUNCTION.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,71 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_FUNCTION</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.function_hpp" title="Header &lt;contract/function.hpp&gt;">
+<link rel="prev" href="CONTRACT_DESTRUCTOR_TPL.html" title="Macro CONTRACT_DESTRUCTOR_TPL">
+<link rel="next" href="CONTRACT_FUNCTION_TPL.html" title="Macro CONTRACT_FUNCTION_TPL">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_DESTRUCTOR_TPL.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.function_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_FUNCTION_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_FUNCTION"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_FUNCTION</span></h2>
+<p>CONTRACT_FUNCTION &#8212; Macro used to declare free functions, free function operators, member functions, and member function operators with contracts. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.function_hpp" title="Header &lt;contract/function.hpp&gt;">contract/function.hpp</a>&gt;
+
+</span>CONTRACT_FUNCTION(function_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1101236"></a><h2>Description</h2>
+<p>This macro is used to declare a function with possible preconditions and postconditions. At least all public member functions and public member function operators of a class with non-empty class invariants should be declared using this macro in order to check the class invariants (even if the functions and operators have no precondition and no postcondition).</p>
+<p>The semantics of a call to a function with contracts are explained in the <a class="link" href="contract__/contract_programming_overview.html" title="Contract Programming Overview"> Contract Programming Overview</a> section. Constructors and destructors are declared using the <code class="computeroutput"><a class="link" href="CONTRACT_CONSTRUCTOR.html" title="Macro CONTRACT_CONSTRUCTOR">CONTRACT_CONSTRUCTOR</a></code> and <code class="computeroutput"><a class="link" href="CONTRACT_DESTRUCTOR.html" title="Macro CONTRACT_DESTRUCTOR">CONTRACT_DESTRUCTOR</a></code> macros respectively.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">function_declaration</code></strong></span></td>
+<td>The function declaration syntax is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section. Member functions must always repeat their access level <code class="computeroutput">public</code>, <code class="computeroutput">protected</code>, or <code class="computeroutput">private</code>. Operators use a special syntax to specify their symbols and names. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>The <code class="computeroutput"><a class="link" href="CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">CONTRACT_CLASS</a></code> macro must be used to declare classes enclosing member functions and member function operators declared using this macro.</p>
+<p>Within a type-dependent scope (e.g., within templates), the <code class="computeroutput"><a class="link" href="CONTRACT_FUNCTION_TPL.html" title="Macro CONTRACT_FUNCTION_TPL">CONTRACT_FUNCTION_TPL</a></code> macro must be used instead of this macro.</p>
+<p>The <code class="computeroutput"><a class="link" href="CONTRACT_FREE_BODY.html" title="Macro CONTRACT_FREE_BODY">CONTRACT_FREE_BODY</a></code> and <code class="computeroutput"><a class="link" href="CONTRACT_MEMBER_BODY.html" title="Macro CONTRACT_MEMBER_BODY">CONTRACT_MEMBER_BODY</a></code> macros must be used when separating free and member function body definitions from the function declarations programmed using this macro.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_DESTRUCTOR_TPL.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.function_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_FUNCTION_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_FUNCTION_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_FUNCTION_TPL.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_FUNCTION_TPL</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.function_hpp" title="Header &lt;contract/function.hpp&gt;">
+<link rel="prev" href="CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">
+<link rel="next" href="CONTRACT_LIMIT_OLDOFS.html" title="Macro CONTRACT_LIMIT_OLDOFS">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_FUNCTION.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.function_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LIMIT_OLDOFS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_FUNCTION_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_FUNCTION_TPL</span></h2>
+<p>CONTRACT_FUNCTION_TPL &#8212; Macro used to declared free functions, free function operators, member functions, and member function operators with contracts within a type-dependent scope (e.g., within templates). </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.function_hpp" title="Header &lt;contract/function.hpp&gt;">contract/function.hpp</a>&gt;
+
+</span>CONTRACT_FUNCTION_TPL(function_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1101385"></a><h2>Description</h2>
+<p>This macro is the exact same as <code class="computeroutput"><a class="link" href="CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> but it must be used when declaring functions with contracts within a type-dependent scope.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_FUNCTION.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.function_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LIMIT_OLDOFS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.limits_hpp" title="Header &lt;contract/limits.hpp&gt;">
+<link rel="prev" href="CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS.html" title="Macro CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS">
+<link rel="next" href="CONTRACT_LOOP.html" title="Macro CONTRACT_LOOP">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.limits_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LOOP.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES</span></h2>
+<p>CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES &#8212; Maximum number of catch statements for a constructor-try block with member initializers. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.limits_hpp" title="Header &lt;contract/limits.hpp&gt;">contract/limits.hpp</a>&gt;
+
+</span>CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES</pre></div>
+<div class="refsect1">
+<a name="id1101602"></a><h2>Description</h2>
+<p>The maximum number of catch statements for a constructor-try block with member initializers is <code class="computeroutput">10</code>. (Constructor-try blocks are specified outside the <code class="computeroutput"><a class="link" href="CONTRACT_CONSTRUCTOR.html" title="Macro CONTRACT_CONSTRUCTOR">CONTRACT_CONSTRUCTOR</a></code> macro when the is no member initializers so this limit does not apply to that case.)</p>
+<p><span class="bold"><strong>Note:</strong></span> This is not a configuration macro. The value of this macro is fixed and programmers cannot change it.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.limits_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LOOP.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.limits_hpp" title="Header &lt;contract/limits.hpp&gt;">
+<link rel="prev" href="CONTRACT_LIMIT_OLDOFS.html" title="Macro CONTRACT_LIMIT_OLDOFS">
+<link rel="next" href="CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES.html" title="Macro CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_LIMIT_OLDOFS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.limits_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS</span></h2>
+<p>CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS &#8212; Maximum number of select assertions that can be nested into one another. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.limits_hpp" title="Header &lt;contract/limits.hpp&gt;">contract/limits.hpp</a>&gt;
+
+</span>CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS</pre></div>
+<div class="refsect1">
+<a name="id1101547"></a><h2>Description</h2>
+<p>The maximum number of select assertions that can be nested into one another is <code class="computeroutput">5</code>.</p>
+<p><span class="bold"><strong>Note:</strong></span> This is not a configuration macro. The value of this macro is fixed and programmers cannot change it.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_LIMIT_OLDOFS.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.limits_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_LIMIT_OLDOFS.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_LIMIT_OLDOFS.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,56 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_LIMIT_OLDOFS</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.limits_hpp" title="Header &lt;contract/limits.hpp&gt;">
+<link rel="prev" href="CONTRACT_FUNCTION_TPL.html" title="Macro CONTRACT_FUNCTION_TPL">
+<link rel="next" href="CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS.html" title="Macro CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_FUNCTION_TPL.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.limits_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_LIMIT_OLDOFS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_LIMIT_OLDOFS</span></h2>
+<p>CONTRACT_LIMIT_OLDOFS &#8212; Upper bound on possible maximum number of postcondition old variables. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.limits_hpp" title="Header &lt;contract/limits.hpp&gt;">contract/limits.hpp</a>&gt;
+
+</span>CONTRACT_LIMIT_OLDOFS</pre></div>
+<div class="refsect1">
+<a name="id1101476"></a><h2>Description</h2>
+<p>The maximum possible number of postcondition old variables is <code class="computeroutput">15</code> (the actual maximum value is controlled by <code class="computeroutput"><a class="link" href="CONTRACT_CONFIG_OLDOF_MAX.html" title="Macro CONTRACT_CONFIG_OLDOF_MAX">CONTRACT_CONFIG_OLDOF_MAX</a></code>).</p>
+<p>For compilers that do not support variadic macros, this is the maximum possible total number of postcondition statements (total of old variable declarations, plus return value declaration, plus assertions, etc).</p>
+<p><span class="bold"><strong>Note:</strong></span> This is not a configuration macro. The value of this macro is fixed and programmers cannot change it.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section, <a class="link" href="contract__/no_variadic_macros.html" title="No Variadic Macros"> No Variadic Macros</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_FUNCTION_TPL.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.limits_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_LOOP.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_LOOP.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,67 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_LOOP</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.loop_variant_hpp" title="Header &lt;contract/loop_variant.hpp&gt;">
+<link rel="prev" href="CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES.html" title="Macro CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES">
+<link rel="next" href="CONTRACT_LOOP_VARIANT.html" title="Macro CONTRACT_LOOP_VARIANT">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.loop_variant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LOOP_VARIANT.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_LOOP"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_LOOP</span></h2>
+<p>CONTRACT_LOOP &#8212; Macro used to declare a loop that will specify a loop variant. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.loop_variant_hpp" title="Header &lt;contract/loop_variant.hpp&gt;">contract/loop_variant.hpp</a>&gt;
+
+</span>CONTRACT_LOOP(loop_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1101700"></a><h2>Description</h2>
+<p>This macro must be used to declare a loop that will later specify a loop variant using the <code class="computeroutput"><a class="link" href="CONTRACT_LOOP_VARIANT.html" title="Macro CONTRACT_LOOP_VARIANT">CONTRACT_LOOP_VARIANT</a></code> macro.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">loop_declaration</code></strong></span></td>
+<td>This is a loop declaration (<code class="computeroutput">for</code>, <code class="computeroutput">while</code>, etc) that follows the usual C++ syntax (see also the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_LIMIT_CONSTRUCTOR_TRY_BLOCK_CATCHES.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.loop_variant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LOOP_VARIANT.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_LOOP_VARIANT.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_LOOP_VARIANT.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_LOOP_VARIANT</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.loop_variant_hpp" title="Header &lt;contract/loop_variant.hpp&gt;">
+<link rel="prev" href="CONTRACT_LOOP.html" title="Macro CONTRACT_LOOP">
+<link rel="next" href="CONTRACT_LOOP_VARIANT_TPL.html" title="Macro CONTRACT_LOOP_VARIANT_TPL">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_LOOP.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.loop_variant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LOOP_VARIANT_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_LOOP_VARIANT"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_LOOP_VARIANT</span></h2>
+<p>CONTRACT_LOOP_VARIANT &#8212; Macro used to specify a loop variant. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.loop_variant_hpp" title="Header &lt;contract/loop_variant.hpp&gt;">contract/loop_variant.hpp</a>&gt;
+
+</span>CONTRACT_LOOP_VARIANT(loop_variant)</pre></div>
+<div class="refsect1">
+<a name="id1102914"></a><h2>Description</h2>
+<p>This macro is used to specify loop variants which ensure that loops terminate. This macro must be used within the body <code class="computeroutput">{ ... }</code> of a loop declared using the <code class="computeroutput"><a class="link" href="CONTRACT_LOOP.html" title="Macro CONTRACT_LOOP">CONTRACT_LOOP</a></code> macro. Each loop can have at most one loop variant.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">loop_variant</code></strong></span></td>
+<td>The loop variant must be a non-negative integral expression that monotonically decreases when calculated at each subsequent loop iteration (constant-expressions can also be used, see the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>Within type-dependent scope (e.g., within templates), the <code class="computeroutput"><a class="link" href="CONTRACT_LOOP_VARIANT_TPL.html" title="Macro CONTRACT_LOOP_VARIANT_TPL">CONTRACT_LOOP_VARIANT_TPL</a></code> macro must be used instead of this macro.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_LOOP.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.loop_variant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_LOOP_VARIANT_TPL.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_LOOP_VARIANT_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_LOOP_VARIANT_TPL.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_LOOP_VARIANT_TPL</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.loop_variant_hpp" title="Header &lt;contract/loop_variant.hpp&gt;">
+<link rel="prev" href="CONTRACT_LOOP_VARIANT.html" title="Macro CONTRACT_LOOP_VARIANT">
+<link rel="next" href="contract/has_oldof.html" title="Struct template has_oldof">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_LOOP_VARIANT.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.loop_variant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="contract/has_oldof.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_LOOP_VARIANT_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_LOOP_VARIANT_TPL</span></h2>
+<p>CONTRACT_LOOP_VARIANT_TPL &#8212; Macro used to specify a loop variant within a type-dependent scope (e.g., within templates). </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.loop_variant_hpp" title="Header &lt;contract/loop_variant.hpp&gt;">contract/loop_variant.hpp</a>&gt;
+
+</span>CONTRACT_LOOP_VARIANT_TPL(loop_variant)</pre></div>
+<div class="refsect1">
+<a name="id1103011"></a><h2>Description</h2>
+<p>This macro is the exact same as <code class="computeroutput"><a class="link" href="CONTRACT_LOOP_VARIANT.html" title="Macro CONTRACT_LOOP_VARIANT">CONTRACT_LOOP_VARIANT</a></code> but it must be used when specifying loop variants within a type-dependent scope.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_LOOP_VARIANT.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.loop_variant_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="contract/has_oldof.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_MEMBER_BODY.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_MEMBER_BODY.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_MEMBER_BODY</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.body_hpp" title="Header &lt;contract/body.hpp&gt;">
+<link rel="prev" href="CONTRACT_FREE_BODY.html" title="Macro CONTRACT_FREE_BODY">
+<link rel="next" href="CONTRACT_CONSTRUCTOR_BODY.html" title="Macro CONTRACT_CONSTRUCTOR_BODY">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_FREE_BODY.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.body_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONSTRUCTOR_BODY.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_MEMBER_BODY"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_MEMBER_BODY</span></h2>
+<p>CONTRACT_MEMBER_BODY &#8212; Macro used to name the body of member functions and member function operators. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.body_hpp" title="Header &lt;contract/body.hpp&gt;">contract/body.hpp</a>&gt;
+
+</span>CONTRACT_MEMBER_BODY(function_name)</pre></div>
+<div class="refsect1">
+<a name="id1095707"></a><h2>Description</h2>
+<p>This macro is used to name the body of member functions and member function operators when the body is defined separately from the contract declaration. Member functions and member function operators with contracts are declared using the <code class="computeroutput"><a class="link" href="CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> macro.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">function_name</code></strong></span></td>
+<td>The syntax for function and operator names is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>Warning:</strong></span> This macro must also be used when a virtual function invokes the overridden function from one of its base classes (see the <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_FREE_BODY.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.body_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONSTRUCTOR_BODY.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_OLDOF.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_OLDOF.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,58 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_OLDOF</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.oldof_hpp" title="Header &lt;contract/oldof.hpp&gt;">
+<link rel="prev" href="contract/has_oldof.html" title="Struct template has_oldof">
+<link rel="next" href="CONTRACT_CONSTRUCTOR_ARG.html" title="Macro CONTRACT_CONSTRUCTOR_ARG">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="contract/has_oldof.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.oldof_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONSTRUCTOR_ARG.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_OLDOF"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_OLDOF</span></h2>
+<p>CONTRACT_OLDOF &#8212; Macro used to refer to the old value of an expression. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.oldof_hpp" title="Header &lt;contract/oldof.hpp&gt;">contract/oldof.hpp</a>&gt;
+
+</span>CONTRACT_OLDOF</pre></div>
+<div class="refsect1">
+<a name="id1103291"></a><h2>Description</h2>
+<p>This macro refers the old value of the expression that follows the macro (i.e., the value the expression had after function entry but before body execution). This macro must be used to initialize old value declarations within postconditions (see also the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section):</p>
+<pre class="programlisting"><span class="keyword">auto</span> <span class="identifier">old_variable</span> <span class="special">=</span> <span class="identifier">CONTRACT_OLDOF</span> <span class="identifier">odlof_expression</span>
+</pre>
+<p>The specified expression that follows the macro might or not be wrapped within parenthesis.</p>
+<p>The old-of expression type can be explicitly specified instead of <code class="computeroutput">auto</code> but it must be wrapped within parenthesis unless it is a fundamental type containing no symbol. If not explicitly specified, the library will automatically deduce the type using Boost.Typeof (as always, types must be properly registered with Boost.Typeof for type-of emulation mode on compilers that do not support native type-of).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/tutorial.html" title="Tutorial"> Tutorial</a> section, <a class="link" href="contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="contract/has_oldof.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.oldof_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_CONSTRUCTOR_ARG.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_PARAMETER.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_PARAMETER.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_PARAMETER</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.parameter_hpp" title="Header &lt;contract/parameter.hpp&gt;">
+<link rel="prev" href="CONTRACT_PARAMETER_TYPEOF.html" title="Macro CONTRACT_PARAMETER_TYPEOF">
+<link rel="next" href="CONTRACT_TEMPLATE_PARAMETER.html" title="Macro CONTRACT_TEMPLATE_PARAMETER">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_PARAMETER_TYPEOF.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.parameter_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_TEMPLATE_PARAMETER.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_PARAMETER"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_PARAMETER</span></h2>
+<p>CONTRACT_PARAMETER &#8212; Macro used to declare a named or deduced function parameter. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.parameter_hpp" title="Header &lt;contract/parameter.hpp&gt;">contract/parameter.hpp</a>&gt;
+
+</span>CONTRACT_PARAMETER(named_parameter_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1103583"></a><h2>Description</h2>
+<p>This macro is used to declare a named or deduced parameter that will later be used within a function declared using the <code class="computeroutput"><a class="link" href="CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> or the <code class="computeroutput"><a class="link" href="CONTRACT_CONSTRUCTOR.html" title="Macro CONTRACT_CONSTRUCTOR">CONTRACT_CONSTRUCTOR</a></code> macros. This macro should be used at namespace scope.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">named_parameter_declaration</code></strong></span></td>
+<td>The syntax of named and deduced parameter declarations is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section. At lest the parameter name must be specified. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>It is recommended to always use this macro within an enclosing namespace different from the global namespace so to control and avoid clashing declarations of named and deduced parameters that have the same name.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/named_parameters.html" title="Named Parameters"> Named Parameters</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_PARAMETER_TYPEOF.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.parameter_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_TEMPLATE_PARAMETER.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_PARAMETER_BODY.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_PARAMETER_BODY.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,71 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_PARAMETER_BODY</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.parameter_hpp" title="Header &lt;contract/parameter.hpp&gt;">
+<link rel="prev" href="CONTRACT_TEMPLATE_PARAMETER.html" title="Macro CONTRACT_TEMPLATE_PARAMETER">
+<link rel="next" href="contract__/release_notes.html" title="Release Notes">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_TEMPLATE_PARAMETER.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.parameter_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="contract__/release_notes.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_PARAMETER_BODY"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_PARAMETER_BODY</span></h2>
+<p>CONTRACT_PARAMETER_BODY &#8212; Macro used to name the body of free and member functions with named parameters. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.parameter_hpp" title="Header &lt;contract/parameter.hpp&gt;">contract/parameter.hpp</a>&gt;
+
+</span>CONTRACT_PARAMETER_BODY(function_name)</pre></div>
+<div class="refsect1">
+<a name="id1103762"></a><h2>Description</h2>
+<p>This macro is used to name the body of a function with named parameters when the body is defined separately from the function declaration.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">function_name</code></strong></span></td>
+<td>The name of the function with named parameters. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>For member functions, the class type must precede this macro (this allows to use this same macro for both free and member functions): </p>
+<pre class="programlisting"><span class="identifier">class_type</span><span class="special">::</span><span class="identifier">CONTRACT_PARAMETER_BODY</span><span class="special">(</span><span class="identifier">function_name</span><span class="special">)</span>
+</pre>
+<p><span class="bold"><strong>Note:</strong></span> Named parameters are currently not supported for operators so this function name cannot be the name of an operator (because of a Boost.Parameter bug). Constructors with named parameters cannot defer the definition of their body (because of lack of delegating constructors in C++03). Finally, destructors have no parameter so named parameters do not apply to destructors. Therefore, this macro is never used for operators, constructors, and destructors.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/named_parameters.html" title="Named Parameters"> Named Parameters</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_TEMPLATE_PARAMETER.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.parameter_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="contract__/release_notes.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_PARAMETER_TYPEOF.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_PARAMETER_TYPEOF.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_PARAMETER_TYPEOF</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.parameter_hpp" title="Header &lt;contract/parameter.hpp&gt;">
+<link rel="prev" href="CONTRACT_CONSTRUCTOR_ARG.html" title="Macro CONTRACT_CONSTRUCTOR_ARG">
+<link rel="next" href="CONTRACT_PARAMETER.html" title="Macro CONTRACT_PARAMETER">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONSTRUCTOR_ARG.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.parameter_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_PARAMETER.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_PARAMETER_TYPEOF"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_PARAMETER_TYPEOF</span></h2>
+<p>CONTRACT_PARAMETER_TYPEOF &#8212; Macro used to access the actual type of a named or deduced parameter. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.parameter_hpp" title="Header &lt;contract/parameter.hpp&gt;">contract/parameter.hpp</a>&gt;
+
+</span>CONTRACT_PARAMETER_TYPEOF(parameter_name)</pre></div>
+<div class="refsect1">
+<a name="id1103503"></a><h2>Description</h2>
+<p>Named and deduced parameters can have generic types (possibly matching predicate type requirements) so the actual parameter types are known at compile-time but only after the function call has been resolved. This macro is used to refer to the actual parameter type as it was determined by the function call resolution.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">parameter_name</code></strong></span></td>
+<td>The name of a named or deduced parameter previously declared using the <code class="computeroutput"><a class="link" href="CONTRACT_PARAMETER.html" title="Macro CONTRACT_PARAMETER">CONTRACT_PARAMETER</a></code> macro. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>This macro can be used within both the function declaration and the body definition.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/named_parameters.html" title="Named Parameters"> Named Parameters</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_CONSTRUCTOR_ARG.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.parameter_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_PARAMETER.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/CONTRACT_TEMPLATE_PARAMETER.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/CONTRACT_TEMPLATE_PARAMETER.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro CONTRACT_TEMPLATE_PARAMETER</title>
+<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="reference.html#header.contract.parameter_hpp" title="Header &lt;contract/parameter.hpp&gt;">
+<link rel="prev" href="CONTRACT_PARAMETER.html" title="Macro CONTRACT_PARAMETER">
+<link rel="next" href="CONTRACT_PARAMETER_BODY.html" title="Macro CONTRACT_PARAMETER_BODY">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_PARAMETER.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.parameter_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_PARAMETER_BODY.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="CONTRACT_TEMPLATE_PARAMETER"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro CONTRACT_TEMPLATE_PARAMETER</span></h2>
+<p>CONTRACT_TEMPLATE_PARAMETER &#8212; Macro used to declare a named or deduced template parameter. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.contract.parameter_hpp" title="Header &lt;contract/parameter.hpp&gt;">contract/parameter.hpp</a>&gt;
+
+</span>CONTRACT_TEMPLATE_PARAMETER(named_parameter_declaration)</pre></div>
+<div class="refsect1">
+<a name="id1103678"></a><h2>Description</h2>
+<p>This macro is used to declare a named or deduced parameter that will later be used within a class template declared using the <code class="computeroutput"><a class="link" href="CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">CONTRACT_CLASS</a></code> macro. This macro should be used at namespace scope.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">named_parameter_declaration</code></strong></span></td>
+<td>The syntax of named and deduced parameter declarations is explained in the <a class="link" href="contract__/grammar.html" title="Grammar"> Grammar</a> section. At lest the template parameter name must be specified. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>It is recommended to always use this macro within an enclosing namespace different from the global namespace so to control and avoid clashing declarations of named and deduced parameters that have the same name.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="contract__/named_parameters.html" title="Named Parameters"> Named Parameters</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="CONTRACT_PARAMETER.html"><img src="../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.contract.parameter_hpp"><img src="../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="CONTRACT_PARAMETER_BODY.html"><img src="../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/block_invariant_broken.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/block_invariant_broken.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Function block_invariant_broken</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">
+<link rel="prev" href="class_invariant_b_id552735.html" title="Function class_invariant_broken_on_throw">
+<link rel="next" href="loop_variant_broken.html" title="Function loop_variant_broken">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="class_invariant_b_id552735.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="loop_variant_broken.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.block_invariant_broken"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Function block_invariant_broken</span></h2>
+<p>contract::block_invariant_broken &#8212; Broken handler called when a block invariant assertion fails. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">contract/broken.hpp</a>&gt;
+
+</span>
+<span class="keyword">void</span> <span class="identifier">block_invariant_broken</span><span class="special">(</span><span class="identifier">from</span> <span class="keyword">const</span> <span class="special">&amp;</span> context<span class="special">)</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1098634"></a><h2>Description</h2>
+<p>By default, it prints information about the failed assertion to <code class="computeroutput">std::cerr</code> and it calls <code class="computeroutput">std::terminate</code>. However, it can be customized using <code class="computeroutput"><code class="computeroutput"><a class="link" href="../reference.html#contract.set_block_invariant_broken">contract::set_block_invariant_broken</a></code></code> (even to throw exceptions, but programmers should be careful to never throw from destructors).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">context</code></strong></span></td>
+<td>Context from which the block invariants assertion failed (i.e., the body). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>This handler is automatically called by the library in case of a block invariant assertion failure (an assertion fails if it is not evaluated to be true, so if it is evaluated to be false but also if it cannot be evaluated because an exception is thrown by the asserted condition).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="class_invariant_b_id552735.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="loop_variant_broken.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/broken.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/broken.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,109 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Class broken</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">
+<link rel="prev" href="../CONTRACT_DESTRUCTOR_BODY.html" title="Macro CONTRACT_DESTRUCTOR_BODY">
+<link rel="next" href="from.html" title="Type from">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../CONTRACT_DESTRUCTOR_BODY.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="from.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.broken"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Class broken</span></h2>
+<p>contract::broken &#8212; Exception automatically thrown by the library to signal a contract assertion failure. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">contract/broken.hpp</a>&gt;
+
+</span>
+<span class="keyword">class</span> <a class="link" href="broken.html" title="Class broken">broken</a> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="comment">// <a class="link" href="broken.html#contract.brokenconstruct-copy-destruct">construct/copy/destruct</a></span>
+ <span class="keyword">explicit</span> <a class="link" href="broken.html#id552245-bb"><span class="identifier">broken</span></a><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
+ <a class="link" href="broken.html#id552275-bb"><span class="identifier">broken</span></a><span class="special">(</span><a class="link" href="broken.html" title="Class broken">broken</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
+ broken&amp; <a class="link" href="broken.html#id552286-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="broken.html" title="Class broken">broken</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
+ <a class="link" href="broken.html#id552297-bb"><span class="special">~</span><span class="identifier">broken</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span><span class="special">;</span>
+
+ <span class="comment">// <a class="link" href="broken.html#id552168-bb">public member functions</a></span>
+ <span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> <a class="link" href="broken.html#id552171-bb"><span class="identifier">what</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> <a class="link" href="broken.html#id552185-bb"><span class="identifier">file_name</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">const</span> <a class="link" href="broken.html#id552198-bb"><span class="identifier">line_number</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> <a class="link" href="broken.html#id552212-bb"><span class="identifier">assertion_code</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+ <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="keyword">const</span> <a class="link" href="broken.html#id552226-bb"><span class="identifier">assertion_number</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">}</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1097064"></a><h2>Description</h2>
+<p>This exception contains detailed information about the failed contract assertion (file name, line number, etc).</p>
+<p>A contract assertion is considered failed if it cannot be evaluated to be true (so if it is evaluated to be false but also if an exception is thrown by the code that evaluates the assertion condition). In case a contract assertion fails, the library automatically calls the appropriate contract broken handler with this exception as the active exception (the fact that assertion failures are signaled by this library by throwing this exception does not necessarily mean that the exception will be ultimately thrown by the broken contract, that is entirely up to the implementation of the contract broken handlers). By default, contract broken handlers print an error message to <code class="computeroutput">std::cerr</code> and terminate the program calling <code class="computeroutput">std::terminate</code>, but programmers can redefine this behaviour by customizing the contract broken handlers (for example to have the handlers throw exceptions instead of terminating the program). Within customized contract broken
 handlers, programmers can re-throw and catch this exception to obtained information about the failed asserted condition (file name, line number, etc).</p>
+<p><span class="bold"><strong>Note:</strong></span> This exception is guaranteed to publicly inherit from <code class="computeroutput">std::logic_error</code> (because <code class="computeroutput">std::logic_error</code> models programming errors and those are the type of errors that contract assertions detect).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+<div class="refsect2">
+<a name="id1097109"></a><h3>
+<a name="contract.brokenconstruct-copy-destruct"></a><code class="computeroutput">broken</code>
+ public
+ construct/copy/destruct</h3>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<pre class="literallayout"><span class="keyword">explicit</span> <a name="id552245-bb"></a><span class="identifier">broken</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> file_name<span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">const</span> <span class="special">&amp;</span> line_number<span class="special">,</span>
+ <span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> assertion_code<span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="keyword">const</span> <span class="special">&amp;</span> assertion_number <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>Construct this exception specifying the failed assertion file name, line number, assertion code, and assertion number (no-throw). <p>The assertion number is optional and it defaults to zero (an assertion number equal to zero is ignored and not shown in the error description). </p>
+</li>
+<li class="listitem">
+<pre class="literallayout"><a name="id552275-bb"></a><span class="identifier">broken</span><span class="special">(</span><a class="link" href="broken.html" title="Class broken">broken</a> <span class="keyword">const</span> <span class="special">&amp;</span> source<span class="special">)</span><span class="special">;</span></pre>Copy constructor (no-throw). </li>
+<li class="listitem">
+<pre class="literallayout">broken&amp; <a name="id552286-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="broken.html" title="Class broken">broken</a> <span class="keyword">const</span> <span class="special">&amp;</span> source<span class="special">)</span><span class="special">;</span></pre>Copy operator (no-throw). </li>
+<li class="listitem">
+<pre class="literallayout"><a name="id552297-bb"></a><span class="special">~</span><span class="identifier">broken</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span><span class="special">;</span></pre>Virtual destructor (no-throw). </li>
+</ol></div>
+</div>
+<div class="refsect2">
+<a name="id1097374"></a><h3>
+<a name="id552168-bb"></a><code class="computeroutput">broken</code> public member functions</h3>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+<pre class="literallayout"><span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> <a name="id552171-bb"></a><span class="identifier">what</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Return a description of the assertion failure (no-throw). </li>
+<li class="listitem">
+<pre class="literallayout"><span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> <a name="id552185-bb"></a><span class="identifier">file_name</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Return the name of the file containing the failed assertion (no-throw). </li>
+<li class="listitem">
+<pre class="literallayout"><span class="keyword">unsigned</span> <span class="keyword">long</span> <span class="keyword">const</span> <a name="id552198-bb"></a><span class="identifier">line_number</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Return the number of the line containing the failed assertion (no-throw). </li>
+<li class="listitem">
+<pre class="literallayout"><span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> <a name="id552212-bb"></a><span class="identifier">assertion_code</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Return the text of the asserted code that failed (no-throw). </li>
+<li class="listitem">
+<pre class="literallayout"><span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="keyword">const</span> <a name="id552226-bb"></a><span class="identifier">assertion_number</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Return the number of the failed assertion (no-throw). <p>The assertion number is useful only within the context of a specific contract broken handler that can differentiates between broken preconditions, postconditions, etc because different preconditions, postconditions, etc will in general have the same assertion number (the first precondition is assertion number 1, the first postcondition is also assertion number 1, etc).</p>
+<p>If this number is zero then no sensible assertion number was specified and it should be ignored (e.g., loop variant assertions have no assertion number because there can only be one single variant for a loop). </p>
+</li>
+</ol></div>
+</div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../CONTRACT_DESTRUCTOR_BODY.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="from.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/broken_contract_handler.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/broken_contract_handler.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,58 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Type definition broken_contract_handler</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">
+<link rel="prev" href="from.html" title="Type from">
+<link rel="next" href="precondition_broken.html" title="Function precondition_broken">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="from.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="precondition_broken.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.broken_contract_handler"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Type definition broken_contract_handler</span></h2>
+<p>broken_contract_handler &#8212; Contract broken handler function pointer. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">contract/broken.hpp</a>&gt;
+
+</span>
+<span class="keyword">typedef</span> <span class="identifier">handler_function_pointer</span> <span class="identifier">broken_contract_handler</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1097848"></a><h2>Description</h2>
+<p>A contract broken handler is a function returning <code class="computeroutput">void</code> and taking only one parameter of type <code class="computeroutput"><a class="link" href="from.html" title="Type from">from</a></code> indicating the context from which the contract assertion failed:</p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="keyword">void</span> <span class="special">(</span><span class="special">*</span><span class="identifier">handler_function_pointer</span><span class="special">)</span> <span class="special">(</span> <span class="identifier">from</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">context</span> <span class="special">)</span> <span class="special">;</span>
+</pre>
+<p><span class="bold"><strong>Note:</strong></span> This function prototype is not non-throw to allow programmers to customize the contract broken handlers to throw exceptions if they wish to do so.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="from.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="precondition_broken.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/class_invariant_b_id488563.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/class_invariant_b_id488563.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Function class_invariant_broken_on_entry</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">
+<link rel="prev" href="postcondition_broken.html" title="Function postcondition_broken">
+<link rel="next" href="class_invariant_b_id488641.html" title="Function class_invariant_broken_on_exit">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="postcondition_broken.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="class_invariant_b_id488641.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.class_invariant_b_id488563"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Function class_invariant_broken_on_entry</span></h2>
+<p>contract::class_invariant_broken_on_entry &#8212; Broken handler called when a class invariant assertion fails on function entry. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">contract/broken.hpp</a>&gt;
+
+</span>
+<span class="keyword">void</span> <span class="identifier">class_invariant_broken_on_entry</span><span class="special">(</span><span class="identifier">from</span> <span class="keyword">const</span> <span class="special">&amp;</span> context<span class="special">)</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1044476"></a><h2>Description</h2>
+<p>By default, it prints information about the failed assertion to <code class="computeroutput">std::cerr</code> and it calls <code class="computeroutput">std::terminate</code>. However, it can be customized using <code class="computeroutput"><code class="computeroutput"><a class="link" href="../reference.html#contract.set_class_invaria_id488551">contract::set_class_invariant_broken_on_entry</a></code></code> (even to throw exceptions, but programmers should be careful to never throw from destructors).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">context</code></strong></span></td>
+<td>Context from which the class invariants assertion failed (destructors, etc). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>This handler is automatically called by the library in case of a class invariant assertion failure (an assertion fails if it is not evaluated to be true, so if it is evaluated to be false but also if it cannot be evaluated because an exception is thrown by the asserted condition).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="postcondition_broken.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="class_invariant_b_id488641.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/class_invariant_b_id488641.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/class_invariant_b_id488641.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Function class_invariant_broken_on_exit</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">
+<link rel="prev" href="class_invariant_b_id488563.html" title="Function class_invariant_broken_on_entry">
+<link rel="next" href="class_invariant_b_id488719.html" title="Function class_invariant_broken_on_throw">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="class_invariant_b_id488563.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="class_invariant_b_id488719.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.class_invariant_b_id488641"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Function class_invariant_broken_on_exit</span></h2>
+<p>contract::class_invariant_broken_on_exit &#8212; Broken handler called when a class invariant assertion fails on function exit. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">contract/broken.hpp</a>&gt;
+
+</span>
+<span class="keyword">void</span> <span class="identifier">class_invariant_broken_on_exit</span><span class="special">(</span><span class="identifier">from</span> <span class="keyword">const</span> <span class="special">&amp;</span> context<span class="special">)</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1044600"></a><h2>Description</h2>
+<p>By default, it prints information about the failed assertion to <code class="computeroutput">std::cerr</code> and it calls <code class="computeroutput">std::terminate</code>. However, it can be customized using <code class="computeroutput"><code class="computeroutput"><a class="link" href="../reference.html#contract.set_class_invaria_id488629">contract::set_class_invariant_broken_on_exit</a></code></code> (even to throw exceptions, but programmers should be careful to never throw from destructors).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">context</code></strong></span></td>
+<td>Context from which the class invariants assertion failed (destructors, etc). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>This handler is automatically called by the library in case of a class invariant assertion failure (an assertion fails if it is not evaluated to be true, so if it is evaluated to be false but also if it cannot be evaluated because an exception is thrown by the asserted condition).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="class_invariant_b_id488563.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="class_invariant_b_id488719.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/class_invariant_b_id488719.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/class_invariant_b_id488719.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Function class_invariant_broken_on_throw</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">
+<link rel="prev" href="class_invariant_b_id488641.html" title="Function class_invariant_broken_on_exit">
+<link rel="next" href="block_invariant_broken.html" title="Function block_invariant_broken">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="class_invariant_b_id488641.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="block_invariant_broken.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.class_invariant_b_id488719"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Function class_invariant_broken_on_throw</span></h2>
+<p>contract::class_invariant_broken_on_throw &#8212; Broken handler called when a class invariant assertion fails on function exit after the function body threw an exception. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">contract/broken.hpp</a>&gt;
+
+</span>
+<span class="keyword">void</span> <span class="identifier">class_invariant_broken_on_throw</span><span class="special">(</span><span class="identifier">from</span> <span class="keyword">const</span> <span class="special">&amp;</span> context<span class="special">)</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1044725"></a><h2>Description</h2>
+<p>By default, it prints information about the failed assertion to <code class="computeroutput">std::cerr</code> and it calls <code class="computeroutput">std::terminate</code>. However, it can be customized using <code class="computeroutput"><code class="computeroutput"><a class="link" href="../reference.html#contract.set_class_invaria_id488707">contract::set_class_invariant_broken_on_throw</a></code></code> (even to throw exceptions, but programmers should be careful to never throw from destructors).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">context</code></strong></span></td>
+<td>Context from which the class invariants assertion failed (destructors, etc). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>This handler is automatically called by the library in case of a class invariant assertion failure (an assertion fails if it is not evaluated to be true, so if it is evaluated to be false but also if it cannot be evaluated because an exception is thrown by the asserted condition).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="class_invariant_b_id488641.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="block_invariant_broken.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/copy.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/copy.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,96 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Class template copy</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.copy_hpp" title="Header &lt;contract/copy.hpp&gt;">
+<link rel="prev" href="../CONTRACT_CONSTRUCTOR_TPL.html" title="Macro CONTRACT_CONSTRUCTOR_TPL">
+<link rel="next" href="../CONTRACT_DESTRUCTOR.html" title="Macro CONTRACT_DESTRUCTOR">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../CONTRACT_CONSTRUCTOR_TPL.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.copy_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../CONTRACT_DESTRUCTOR.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.copy"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Class template copy</span></h2>
+<p>contract::copy &#8212; Copy result value and old values for postconditions. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.copy_hpp" title="Header &lt;contract/copy.hpp&gt;">contract/copy.hpp</a>&gt;
+
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">&gt;</span>
+<span class="keyword">class</span> <a class="link" href="copy.html" title="Class template copy">copy</a> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="comment">// types</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">add_reference</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">add_const</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span> <a name="contract.copy.const_reference_type"></a><span class="identifier">const_reference_type</span><span class="special">;</span>
+
+ <span class="comment">// <a class="link" href="copy.html#contract.copyconstruct-copy-destruct">construct/copy/destruct</a></span>
+ <span class="keyword">explicit</span> <a class="link" href="copy.html#id553927-bb"><span class="identifier">copy</span></a><span class="special">(</span><span class="identifier">const_reference_type</span><span class="special">)</span><span class="special">;</span>
+
+ <span class="comment">// <a class="link" href="copy.html#id553911-bb">public member functions</a></span>
+ <span class="identifier">const_reference_type</span> <a class="link" href="copy.html#id553914-bb"><span class="identifier">value</span></a><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
+<span class="special">}</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1100728"></a><h2>Description</h2>
+<p>The default implementation of his class template can copy values of any type that is <code class="computeroutput">ConstantCopyConstructible</code> which is of any type <code class="computeroutput">T</code> that has a constant-correct copy constructor of the form:</p>
+<pre class="programlisting"> <span class="identifier">T</span><span class="special">::</span><span class="identifier">T</span><span class="special">(</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">source</span> <span class="special">)</span> <span class="special">;</span>
+</pre>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">T</code></strong></span></td>
+<td>The type of the value to copy (it is either the result type of the type of an old-of expression). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>Programmers can specialize this class template to copy a specific type differently (and even for types that are not <code class="computeroutput">ConstantCopyConstructible</code>, or not <code class="computeroutput">CopyConstructible</code> at all).</p>
+<p><span class="bold"><strong>Warning:</strong></span> When specializing this class template, programmers must make sure that their code is constant-correct otherwise the contracts will no longer be constant-correct.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+<div class="refsect2">
+<a name="id1100847"></a><h3>
+<a name="contract.copyconstruct-copy-destruct"></a><code class="computeroutput">copy</code>
+ public
+ construct/copy/destruct</h3>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+<pre class="literallayout"><span class="keyword">explicit</span> <a name="id553927-bb"></a><span class="identifier">copy</span><span class="special">(</span><span class="identifier">const_reference_type</span> value<span class="special">)</span><span class="special">;</span></pre>Construct this object copying the specified value assuming <code class="computeroutput">T</code> has a constant-correct copy constructor. </li></ol></div>
+</div>
+<div class="refsect2">
+<a name="id1100900"></a><h3>
+<a name="id553911-bb"></a><code class="computeroutput">copy</code> public member functions</h3>
+<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+<pre class="literallayout"><span class="identifier">const_reference_type</span> <a name="id553914-bb"></a><span class="identifier">value</span><span class="special">(</span><span class="keyword">void</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Return a constant reference to the copied value. </li></ol></div>
+</div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../CONTRACT_CONSTRUCTOR_TPL.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.copy_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../CONTRACT_DESTRUCTOR.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/from.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/from.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,72 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Type from</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">
+<link rel="prev" href="broken.html" title="Class broken">
+<link rel="next" href="broken_contract_handler.html" title="Type definition broken_contract_handler">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="broken.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="broken_contract_handler.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.from"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Type from</span></h2>
+<p>contract::from &#8212; Specify the context from which the contract assertion failed. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">contract/broken.hpp</a>&gt;
+
+</span>
+
+<span class="keyword">enum</span> <span class="identifier">from</span> <span class="special">{</span> <a class="link" href="from.html#contract.from.FROM_CONSTRUCTOR">FROM_CONSTRUCTOR</a>, <a class="link" href="from.html#contract.from.FROM_DESTRUCTOR">FROM_DESTRUCTOR</a>, <a class="link" href="from.html#contract.from.FROM_NONSTATIC_MEMBER_FUNCTION">FROM_NONSTATIC_MEMBER_FUNCTION</a>,
+ <a class="link" href="from.html#contract.from.FROM_STATIC_MEMBER_FUNCTION">FROM_STATIC_MEMBER_FUNCTION</a>, <a class="link" href="from.html#contract.from.FROM_FREE_FUNCTION">FROM_FREE_FUNCTION</a>, <a class="link" href="from.html#contract.from.FROM_BODY">FROM_BODY</a> <span class="special">}</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1097708"></a><h2>Description</h2>
+<p>This information is important because in order to comply with STL exception safety requirements, destructors shall never throw an exception. Therefore, even if programmers customize the contract broken handlers to throw an exception instead of terminating the program, it is still important to know at least if the assertion failed from a destructor's contract so programmers can avoid throwing an exception from the broken handlers in such a case.</p>
+<p><span class="bold"><strong>Note:</strong></span> All the different contexts identified by this enumeration have different contract checking semantics (see also <a class="link" href="../contract__/contract_programming_overview.html" title="Contract Programming Overview"> Contract Programming Overview</a>) so it might be relevant to differentiate between them in the contract broken handlers.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+<div class="variablelist"><dl>
+<dt><span class="term"><code class="computeroutput">FROM_CONSTRUCTOR</code><a name="contract.from.FROM_CONSTRUCTOR"></a></span></dt>
+<dd>Assertion failed from within constructor contracts. </dd>
+<dt><span class="term"><code class="computeroutput">FROM_DESTRUCTOR</code><a name="contract.from.FROM_DESTRUCTOR"></a></span></dt>
+<dd>Assertion failed from within destructor contracts. </dd>
+<dt><span class="term"><code class="computeroutput">FROM_NONSTATIC_MEMBER_FUNCTION</code><a name="contract.from.FROM_NONSTATIC_MEMBER_FUNCTION"></a></span></dt>
+<dd>Assertion failed from within non-static member function contracts. </dd>
+<dt><span class="term"><code class="computeroutput">FROM_STATIC_MEMBER_FUNCTION</code><a name="contract.from.FROM_STATIC_MEMBER_FUNCTION"></a></span></dt>
+<dd>Assertion failed from within static member function contracts. </dd>
+<dt><span class="term"><code class="computeroutput">FROM_FREE_FUNCTION</code><a name="contract.from.FROM_FREE_FUNCTION"></a></span></dt>
+<dd>Assertion failed from within free function contracts. </dd>
+<dt><span class="term"><code class="computeroutput">FROM_BODY</code><a name="contract.from.FROM_BODY"></a></span></dt>
+<dd>Assertion failed from within body contracts (for both block invariants and loop variants). </dd>
+</dl></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="broken.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="broken_contract_handler.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/has_oldof.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/has_oldof.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,71 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Struct template has_oldof</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.oldof_hpp" title="Header &lt;contract/oldof.hpp&gt;">
+<link rel="prev" href="../CONTRACT_LOOP_VARIANT_TPL.html" title="Macro CONTRACT_LOOP_VARIANT_TPL">
+<link rel="next" href="../CONTRACT_OLDOF.html" title="Macro CONTRACT_OLDOF">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../CONTRACT_LOOP_VARIANT_TPL.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.oldof_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../CONTRACT_OLDOF.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.has_oldof"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Struct template has_oldof</span></h2>
+<p>contract::has_oldof &#8212; Trait used to determine if a type can be copied for an old value or not. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.oldof_hpp" title="Header &lt;contract/oldof.hpp&gt;">contract/oldof.hpp</a>&gt;
+
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> OldofExpressionType<span class="special">&gt;</span>
+<span class="keyword">struct</span> <a class="link" href="has_oldof.html" title="Struct template has_oldof">has_oldof</a> <span class="special">{</span>
+<span class="special">}</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1103174"></a><h2>Description</h2>
+<p>A type can be used for a postcondition old value if and only if it can be copied using the <code class="computeroutput"><a class="link" href="copy.html" title="Class template copy">contract::copy</a></code> template. By default, all types that have a constant-correct copy constructor (i.e., that are <code class="computeroutput">ConstantCopyConstructible</code>) can be copied by <code class="computeroutput"><a class="link" href="copy.html" title="Class template copy">contract::copy</a></code>.</p>
+<p>If a type cannot be copied, an old value declaration using such a type will not fail but it will generate an old value that will cause a compile-time error as soon as it is used in a contract assertion. Therefore, this trait can be used to program assertion requirements for those assertions that use old values on generic types that are not always known to be copyable. This way, the assertions will be disabled by the requirement instead of generating a compile-time error when the old values they use cannot be copied.</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">OldofExpressionType</code></strong></span></td>
+<td>The type of the expression specified to the <code class="computeroutput"><a class="link" href="../CONTRACT_OLDOF.html" title="Macro CONTRACT_OLDOF">CONTRACT_OLDOF</a></code> macro for a given postcondition old value declaration. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>Unfortunately, in C++ it is not possible to portably implement a template meta-function that checks if a generic type has a constant-correct copy constructor (or even just a copy constructor). Therefore, the default implementation of this trait is <code class="computeroutput">boost::mpl::true_</code> for any type <code class="computeroutput">OdlofExpressionType</code>. This will cause compile-time errors for old value types that cannot be copied in which case users can specialize this unary boolean meta-function to inherit from <code class="computeroutput">boost::mpl::false_</code> for such types.</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../CONTRACT_LOOP_VARIANT_TPL.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.oldof_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../CONTRACT_OLDOF.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/loop_variant_broken.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/loop_variant_broken.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Function loop_variant_broken</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">
+<link rel="prev" href="block_invariant_broken.html" title="Function block_invariant_broken">
+<link rel="next" href="../CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="block_invariant_broken.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../CONTRACT_CLASS.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.loop_variant_broken"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Function loop_variant_broken</span></h2>
+<p>contract::loop_variant_broken &#8212; Broken handler called when a loop variant assertion fails. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">contract/broken.hpp</a>&gt;
+
+</span>
+<span class="keyword">void</span> <span class="identifier">loop_variant_broken</span><span class="special">(</span><span class="identifier">from</span> <span class="keyword">const</span> <span class="special">&amp;</span> context<span class="special">)</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1098760"></a><h2>Description</h2>
+<p>By default, it prints information about the failed assertion to <code class="computeroutput">std::cerr</code> and it calls <code class="computeroutput">std::terminate</code>. However, it can be customized using <code class="computeroutput"><code class="computeroutput"><a class="link" href="../reference.html#contract.set_loop_variant_broken">contract::set_loop_variant_broken</a></code></code> (even to throw exceptions, but programmers should be careful to never throw from destructors).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">context</code></strong></span></td>
+<td>Context from which the loop variants assertion failed (i.e., the body). </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>This handler is automatically called by the library in case of a loop invariant assertion failure (an assertion fails if it is not evaluated to be true, so if it is evaluated to be false but also if it cannot be evaluated because an exception is thrown by the asserted condition).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="block_invariant_broken.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../CONTRACT_CLASS.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/postcondition_broken.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/postcondition_broken.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Function postcondition_broken</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">
+<link rel="prev" href="precondition_broken.html" title="Function precondition_broken">
+<link rel="next" href="class_invariant_b_id552579.html" title="Function class_invariant_broken_on_entry">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="precondition_broken.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="class_invariant_b_id552579.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.postcondition_broken"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Function postcondition_broken</span></h2>
+<p>contract::postcondition_broken &#8212; Broken handler called when a postcondition assertion fails. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">contract/broken.hpp</a>&gt;
+
+</span>
+<span class="keyword">void</span> <span class="identifier">postcondition_broken</span><span class="special">(</span><span class="identifier">from</span> <span class="keyword">const</span> <span class="special">&amp;</span> context<span class="special">)</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1098132"></a><h2>Description</h2>
+<p>By default, it prints information about the failed assertion to <code class="computeroutput">std::cerr</code> and it calls <code class="computeroutput">std::terminate</code>. However, it can be customized using <code class="computeroutput"><code class="computeroutput"><a class="link" href="../reference.html#contract.set_postcondition_broken">contract::set_postcondition_broken</a></code></code> (even to throw exceptions).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">context</code></strong></span></td>
+<td>Context from which the postcondition assertion failed. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>This handler is automatically called by the library in case of a postcondition assertion failure (an assertion fails if it is not evaluated to be true, so if it is evaluated to be false but also if it cannot be evaluated because an exception is thrown by the asserted condition).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="precondition_broken.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="class_invariant_b_id552579.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract/precondition_broken.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract/precondition_broken.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,69 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Function precondition_broken</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">
+<link rel="prev" href="broken_contract_handler.html" title="Type definition broken_contract_handler">
+<link rel="next" href="postcondition_broken.html" title="Function postcondition_broken">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="broken_contract_handler.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="postcondition_broken.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="contract.precondition_broken"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Function precondition_broken</span></h2>
+<p>contract::precondition_broken &#8212; Broken handler called when a precondition assertion fails. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../reference.html#header.contract.broken_hpp" title="Header &lt;contract/broken.hpp&gt;">contract/broken.hpp</a>&gt;
+
+</span>
+<span class="keyword">void</span> <span class="identifier">precondition_broken</span><span class="special">(</span><span class="identifier">from</span> <span class="keyword">const</span> <span class="special">&amp;</span> context<span class="special">)</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id1098006"></a><h2>Description</h2>
+<p>By default, it prints information about the failed assertion to <code class="computeroutput">std::cerr</code> and it calls <code class="computeroutput">std::terminate</code>. However, it can be customized using <code class="computeroutput"><code class="computeroutput"><a class="link" href="../reference.html#contract.set_precondition_broken">contract::set_precondition_broken</a></code></code> (even to throw exceptions).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody><tr>
+<td><span class="bold"><strong><code class="computeroutput">context</code></strong></span></td>
+<td>Context from which the precondition assertion failed. </td>
+</tr></tbody>
+</table></div>
+<p>
+</p>
+<p>This handler is automatically called by the library in case of a precondition assertion failure (an assertion fails if it is not evaluated to be true, so if it is evaluated to be false but also if it cannot be evaluated because an exception is thrown by the asserted condition).</p>
+<p><span class="bold"><strong>See also:</strong></span> <a class="link" href="../contract__/advanced_topics.html" title="Advanced Topics"> Advanced Topics</a> section. </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="broken_contract_handler.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html#header.contract.broken_hpp"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="postcondition_broken.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract__/acknowledgments.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract__/acknowledgments.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,93 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Acknowledgments</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="prev" href="bibliography.html" title="Bibliography">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="bibliography.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="contract__.acknowledgments"></a><a class="link" href="acknowledgments.html" title="Acknowledgments">Acknowledgments</a>
+</h2></div></div></div>
+<p>
+ This section aims to recognize the contributions of <span class="emphasis"><em>all</em></span>
+ the different people that participated directly or indirectly to the design
+ and development of this library.
+ </p>
+<p>
+ Sincere thanks to my parents for their support with my education and my studies
+ in computer science.
+ </p>
+<p>
+ Sincere thanks to Marina for her kindness and continuous support.
+ </p>
+<p>
+ Many thanks to Bertrand Meyer for his pioneering and thorough work on Contract
+ Programming in <a class="link" href="bibliography.html#Meyer97_anchor">[Meyer97]</a>.
+ </p>
+<p>
+ Many thanks to Thorsten Ottosen for his work with <a class="link" href="bibliography.html#N1962_anchor">[N1962]</a>
+ (and previous revisions) and for clarifying the <a class="link" href="bibliography.html#N1962_anchor">[N1962]</a>
+ requirements directly with the library authors when needed.
+ </p>
+<p>
+ Many thanks to Andrzej Krzemienski for reviewing earlier versions of this library
+ providing valuable insights, for exchanging ideas on implementing assertion
+ requirements, and for suggesting to support named parameters.
+ </p>
+<p>
+ Many thanks to Vicente J. Botet Escriba for reviewing earlier versions of this
+ library providing valuable insights and for suggesting to use <code class="computeroutput"><span class="identifier">contract</span><span class="special">::</span><span class="identifier">copy</span></code>.
+ </p>
+<p>
+ Thanks to Steven Watanabe for providing valuable insights on C++ and for hinting
+ to use template meta-programming introspection to detect if a base class has
+ a given member function (technique which turned out to be essential to fully
+ automate subcontracting).
+ </p>
+<p>
+ Thanks to Dave Abrahams for providing valuable comments on the library syntax
+ and especially on the syntax to support named parameters.
+ </p>
+<p>
+ Thanks to David Maley for having shared source code form his inspiring work
+ in <a class="link" href="bibliography.html#Maley99_anchor">[Maley99]</a> on emulating Contract Programming
+ in C++.
+ </p>
+<p>
+ Finally, many thanks to the entire Boost
+ community and mailing list for
+ providing valuable comments about this library and great insights on the C++
+ programming language.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2008-2012 Lorenzo Caminiti<p>
+ Distributed under the Boost Software License, Version 1.0 (see accompanying
+ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="bibliography.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/contract/doc/html/contract__/advanced_topics.html
==============================================================================
--- (empty file)
+++ sandbox/contract/doc/html/contract__/advanced_topics.html 2013-02-28 17:56:57 EST (Thu, 28 Feb 2013)
@@ -0,0 +1,2674 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Advanced Topics</title>
+<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Contract++ 0.4.1">
+<link rel="prev" href="tutorial.html" title="Tutorial">
+<link rel="next" href="virtual_specifiers.html" title="Virtual Specifiers">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top">Logo</td>
+<td align="center">Download</td>
+<td align="center">Bugs</td>
+<td align="center">Reviews</td>
+<td align="center"><a href="mailto:lorcaminiti_at_[hidden]">Contact Us</a></td>
+<td align="center">Help</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tutorial.html"><img src="../../..//doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../..//doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../..//doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="virtual_specifiers.html"><img src="../../..//doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="contract__.advanced_topics"></a><a class="link" href="advanced_topics.html" title="Advanced Topics">Advanced Topics</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.commas_and_leading_symbols_in_macros">Commas
+ and Leading Symbols in Macros</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.static_assertions">Static
+ Assertions</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.constant_assertions">Constant
+ Assertions</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.select_assertions">Select
+ Assertions</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.assertion_statements">Assertion
+ Statements</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.assertion_requirements">Assertion
+ Requirements</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.old_of_requirements">Old-Of
+ Requirements</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.old_and_result_value_copies">Old
+ and Result Value Copies</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.pure_virtual_functions">Pure
+ Virtual Functions</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.subcontracting_preconditions">Subcontracting
+ Preconditions</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.static_member_functions">Static
+ Member Functions</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.volatile_member_functions">Volatile
+ Member Functions</a></span></dt>
+<dt><span class="section">Operators</span></dt>
+<dt><span class="section">Nested Classes</span></dt>
+<dt><span class="section">Friends</span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.template_specializations">Template
+ Specializations</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.exception_specifications_and_function_try_blocks">Exception
+ Specifications and Function-Try Blocks</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.specifying_types__no_boost_typeof_">Specifying
+ Types (no Boost.Typeof)</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.block_invariants_and_loop_variants">Block
+ Invariants and Loop Variants</a></span></dt>
+<dt><span class="section"><a href="advanced_topics.html#contract__.advanced_topics.contract_broken_handlers__throw_on_failure_">Contract
+ Broken Handlers (Throw on Failure)</a></span></dt>
+</dl></div>
+<p>
+ This section explains advanced usages of this library in programming contracts.
+ See the <a class="link" href="grammar.html" title="Grammar">Grammar</a> section for a complete
+ guide on this library syntax.
+ </p>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.commas_and_leading_symbols_in_macros"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.commas_and_leading_symbols_in_macros" title="Commas and Leading Symbols in Macros">Commas
+ and Leading Symbols in Macros</a>
+</h3></div></div></div>
+<p>
+ C++ macros cannot correctly parse a macro parameter if it contains a comma
+ <code class="computeroutput"><span class="special">,</span></code> that is not wrapped within
+ round parenthesis <code class="computeroutput"><span class="special">()</span></code> (because
+ the preprocessor interprets such a comma as separation between two distinct
+ macro parameters instead that as part of one single macro parameter, see
+ also Boost.Utility/IdentityType).
+ Furthermore, syntactic elements specified to this library macros cannot start
+ with a non-alphanumeric symbol (<code class="computeroutput"><span class="special">-</span><span class="number">1</span></code>, <code class="computeroutput"><span class="number">1.23</span></code>,
+ <code class="computeroutput"><span class="string">"abc"</span></code>, <code class="computeroutput"><span class="special">::</span></code>, etc). <sup>[<a name="contract__.advanced_topics.commas_and_leading_symbols_in_macros.f0" href="#ftn.contract__.advanced_topics.commas_and_leading_symbols_in_macros.f0" class="footnote">35</a>]</sup> For example, the parameter type <code class="computeroutput"><span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">OtherKey</span><span class="special">,</span> <span class="identifier">OtherT</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span></code> cannot be passed to this library for
+ two reasons: It starts with the non-alphanumeric symbol <code class="computeroutput"><span class="special">::</span></code>
+ and it contains the comma <code class="computeroutput"><span class="identifier">OtherKey</span><span class="special">,</span> <span class="identifier">OtherT</span></code>
+ which is not wrapped by round parenthesis.
+ </p>
+<p>
+ The Boost.Utility/IdentityType
+ macro <code class="computeroutput"><span class="identifier">BOOST_IDENTITY_TYPE</span></code>
+ can be used as usual to overcome this issue. However, using the <code class="computeroutput"><span class="identifier">BOOST_IDENTITY_TYPE</span></code> macro presents two
+ limitations: It makes the syntax of this library macros more cumbersome and,
+ more importantly, it does not allow C++ to automatically deduce function
+ template parameters (see Boost.Utility/IdentityType
+ for more information). Therefore, the syntax of this library provides an
+ alternative to <code class="computeroutput"><span class="identifier">BOOST_IDENTITY_TYPE</span></code>
+ to handle commas and leading symbols within macro parameters:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Commas and leading symbols can be used freely within elements of the
+ syntax that already require wrapping parenthesis (e.g., non-fundamental
+ parameter types <code class="computeroutput"><span class="special">(::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">OtherKey</span><span class="special">,</span> <span class="identifier">OtherT</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span></code>).
+ </li>
+<li class="listitem">
+ Extra parenthesis can always be used to wrap elements of the syntax that
+ might contain commas and leading symbols (e.g, the base class type <code class="computeroutput"><span class="keyword">public</span> <span class="special">(::</span><span class="identifier">sizeable</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;)</span></code>).
+ </li>
+<li class="listitem">
+ Extra parenthesis can always be used to wrap value expressions so they
+ can contain commas and leading symbols (e.g., a class invariants assertion
+ <code class="computeroutput"><span class="special">(::</span><span class="identifier">sizeable</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">max_size</span>
+ <span class="special">&gt;=</span> <span class="identifier">size</span><span class="special">())</span></code>).
+ </li>
+</ol></div>
+<p>
+ For example (see also macro_commas_symbols_integral_map.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">template</span><span class="special">(</span>
+ <span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="comment">// Commas in following template params.</span>
+ <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">,</span>
+ <span class="keyword">default</span> <span class="special">(::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Key</span> <span class="keyword">const</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="special">&gt;),</span>
+ <span class="special">(</span><span class="keyword">typename</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">key_type</span><span class="special">)</span> <span class="identifier">default_key</span><span class="special">,</span>
+ <span class="keyword">default</span> <span class="special">(-</span><span class="number">1</span><span class="special">)</span>
+ <span class="special">)</span> <span class="keyword">requires</span><span class="special">(</span> <span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">Convertible</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;)</span> <span class="special">)</span> <span class="comment">// Commas in concepts.</span>
+ <span class="keyword">class</span> <span class="special">(</span><span class="identifier">integral_map</span><span class="special">)</span>
+ <span class="keyword">extends</span><span class="special">(</span> <span class="keyword">public</span> <span class="special">(::</span><span class="identifier">sizeable</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;)</span> <span class="special">)</span> <span class="comment">// Commas in bases.</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">CONTRACT_CLASS_INVARIANT_TPL</span><span class="special">(</span> <span class="comment">// Commas in class invariants.</span>
+ <span class="special">(::</span><span class="identifier">sizeable</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">max_size</span><span class="special">)</span> <span class="special">&gt;=</span> <span class="identifier">size</span><span class="special">()</span>
+ <span class="special">)</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">&gt;,</span> <span class="identifier">Allocator</span><span class="special">&gt;::</span>
+ <span class="identifier">iterator</span> <span class="identifier">iterator</span><span class="special">;</span>
+
+ <span class="identifier">CONTRACT_FUNCTION_TPL</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">template</span><span class="special">(</span> <span class="keyword">typename</span> <span class="identifier">OtherKey</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">OtherT</span> <span class="special">)</span>
+ <span class="keyword">requires</span><span class="special">(</span>
+ <span class="special">(::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">Convertible</span><span class="special">&lt;</span><span class="identifier">OtherKey</span><span class="special">,</span> <span class="identifier">Key</span><span class="special">&gt;),</span>
+ <span class="special">(::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">Convertible</span><span class="special">&lt;</span><span class="identifier">OtherT</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;)</span>
+ <span class="special">)</span>
+ <span class="special">(::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">&gt;)</span> <span class="special">(</span><span class="identifier">insert</span><span class="special">)</span> <span class="special">(</span> <span class="comment">// Commas in result and params.</span>
+ <span class="special">(::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">OtherKey</span><span class="special">,</span> <span class="identifier">OtherT</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span> <span class="identifier">other_value</span><span class="special">,</span>
+ <span class="keyword">default</span> <span class="special">(::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;(</span><span class="identifier">default_key</span><span class="special">,</span> <span class="identifier">T</span><span class="special">()))</span>
+ <span class="special">)</span> <span class="keyword">throw</span><span class="special">(</span> <span class="special">(::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;)</span> <span class="special">)</span> <span class="comment">// Commas in exception specs.</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="comment">// Leading symbols in preconditions (same for commas).</span>
+ <span class="special">((!</span><span class="identifier">full</span><span class="special">()))</span> <span class="comment">// LIMITATION: Two sets `((...))` (otherwise seq.).</span>
+ <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span> <span class="comment">// Commas in postconditions.</span>
+ <span class="keyword">auto</span> <span class="identifier">result</span> <span class="special">=</span> <span class="keyword">return</span><span class="special">,</span>
+ <span class="special">(</span><span class="keyword">typename</span> <span class="identifier">sizeable</span><span class="special">&lt;</span><span class="identifier">OtherKey</span><span class="special">,</span> <span class="identifier">OtherT</span><span class="special">&gt;::</span><span class="identifier">size_type</span><span class="special">)</span>
+ <span class="identifier">old_other_size</span> <span class="special">=</span> <span class="identifier">CONTRACT_OLDOF</span>
+ <span class="special">(</span><span class="identifier">size</span><span class="special">&lt;</span><span class="identifier">OtherKey</span><span class="special">,</span> <span class="identifier">OtherT</span><span class="special">&gt;()),</span>
+ <span class="special">(::</span><span class="identifier">sizeable</span><span class="special">&lt;</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">max_size</span><span class="special">)</span> <span class="special">&gt;=</span> <span class="identifier">size</span><span class="special">(),</span>
+ <span class="identifier">size</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">old_other_size</span> <span class="special">+</span> <span class="special">(</span><span class="identifier">result</span><span class="special">.</span><span class="identifier">second</span> <span class="special">?</span> <span class="number">1</span> <span class="special">:</span> <span class="number">0</span><span class="special">)</span>
+ <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// ...</span>
+</pre>
+<p>
+ </p>
+<p>
+ (Concepts and other advanced constructs used in this example are explained
+ in the rest of this section and in later sections of this documentation.)
+ </p>
+<p>
+ All these extra wrapping parenthesis are optional when there is no unwrapped
+ comma and no leading symbol. Programmers could chose to always program the
+ extra parenthesis for consistency but it is the authors' opinion that the
+ syntax is harder to read with the extra parenthesis so it is recommended
+ to use them only when strictly necessary.
+ </p>
+<p>
+ It is also recommended to avoid using commas and leading symbols whenever
+ possible so to limit the cases when it is necessary to use the extra wrapping
+ parenthesis. For example, in many cases the leading symbol <code class="computeroutput"><span class="special">::</span></code> might not be necessary and leading symbols
+ like <code class="computeroutput"><span class="special">!</span></code> can be replaced by the
+ alternative keywords like <code class="computeroutput"><span class="keyword">not</span></code>.
+ Furthermore, in some cases <code class="computeroutput"><span class="keyword">typedef</span></code>
+ can be programmed just before class and function declarations to avoid passing
+ types within multiple template parameters separated by commas. Declarations
+ of class templates and function templates are the most common cases were
+ commas cannot be avoided and extra wrapping parenthesis are necessarily used.
+ </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Preconditions, postconditions, and class invariants composed of one single
+ assertion that needs to be wrapped within extra parenthesis need to use
+ double parenthesis (this should be a relatively rare case). <sup>[<a name="contract__.advanced_topics.commas_and_leading_symbols_in_macros.f1" href="#ftn.contract__.advanced_topics.commas_and_leading_symbols_in_macros.f1" class="footnote">36</a>]</sup> This is the case in the above example for <code class="computeroutput"><span class="keyword">precondition</span><span class="special">(</span> <span class="special">((!</span><span class="identifier">full</span><span class="special">()))</span> <span class="special">)</span></code> (but
+ note that these extra parenthesis could have been avoided all together
+ simply using <code class="computeroutput"><span class="keyword">not</span></code> instead of
+ <code class="computeroutput"><span class="special">!</span></code> as in the more readable
+ <code class="computeroutput"><span class="keyword">precondition</span><span class="special">(</span>
+ <span class="keyword">not</span> <span class="identifier">full</span><span class="special">()</span> <span class="special">)</span></code>).
+ </p></td></tr>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.static_assertions"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.static_assertions" title="Static Assertions">Static
+ Assertions</a>
+</h3></div></div></div>
+<p>
+ This library allows to use <a href="http://en.wikipedia.org/wiki/C%2B%2B11#Static_assertions" target="_top"><span class="emphasis"><em>static
+ assertions</em></span></a> to program preconditions, postconditions, class
+ invariants, and block invariants so that they are checked at compile-time
+ instead of at run-time. The C++11
+ syntax is used (but Boost.MPL
+ <code class="computeroutput"><span class="identifier">BOOST_MPL_ASSERT_MSG</span></code> is used
+ to implement static assertions so no C++11
+ feature is required):
+ </p>
+<pre class="programlisting"><span class="keyword">static_assert</span><span class="special">(</span><span class="emphasis"><em>constant-boolean-condition</em></span><span class="special">,</span> <span class="emphasis"><em>constant-string-literal</em></span><span class="special">)</span>
+</pre>
+<p>
+ For example (see also static_assertion_memcopy.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">template</span><span class="special">(</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">)</span>
+ <span class="special">(</span><span class="identifier">To</span><span class="special">*)</span> <span class="special">(</span><span class="identifier">memcopy</span><span class="special">)</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">To</span><span class="special">*)</span> <span class="identifier">to</span><span class="special">,</span> <span class="special">(</span><span class="identifier">From</span><span class="special">*)</span> <span class="identifier">from</span> <span class="special">)</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="comment">// Static assertions.</span>
+ <span class="keyword">static_assert</span><span class="special">(</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">To</span><span class="special">)</span> <span class="special">&gt;=</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">From</span><span class="special">),</span> <span class="string">"destination too small"</span><span class="special">),</span>
+ <span class="comment">// Wrapping parenthesis for asserted condition with commas.</span>
+ <span class="keyword">static_assert</span><span class="special">((</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_convertible</span><span class="special">&lt;</span><span class="identifier">From</span><span class="special">,</span> <span class="identifier">To</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">),</span>
+ <span class="string">"incompatible types"</span><span class="special">),</span>
+ <span class="identifier">to</span><span class="special">,</span> <span class="comment">// pointer not null</span>
+ <span class="identifier">from</span> <span class="comment">// pointer not null</span>
+ <span class="special">)</span>
+<span class="special">)</span> <span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ Static assertions are always checked at compile-time (regardless of them
+ appearing in preconditions, postconditions, etc). However, static assertions
+ can be selectively disabled depending on where they are specified using
+ <code class="computeroutput"><a class="link" href="../CONTRACT_CONFIG_NO_PRECONDITIONS.html" title="Macro CONTRACT_CONFIG_NO_PRECONDITIONS">CONTRACT_CONFIG_NO_PRECONDITIONS</a></code>,
+ <code class="computeroutput"><a class="link" href="../CONTRACT_CONFIG_NO_POSTCONDITIONS.html" title="Macro CONTRACT_CONFIG_NO_POSTCONDITIONS">CONTRACT_CONFIG_NO_POSTCONDITIONS</a></code>,
+ etc so it is still important to logically associate them with preconditions,
+ postconditions, etc.
+ </p>
+<p>
+ The string message passed as the second parameter of <code class="computeroutput"><span class="keyword">static_assert</span></code>
+ is ignored by the current implementation of this library (but it could be
+ used by future revisions of this library that take advantage of C++11
+ features). It is recommended to always specify meaningful messages for static
+ assertions to increase the readability and documentation of contracts. Similarly,
+ it might be useful to put a short code comment following each assertions
+ (<code class="computeroutput"><span class="comment">// pointer not null</span></code>, etc) to
+ increase contract readability and documentation. <sup>[<a name="contract__.advanced_topics.static_assertions.f0" href="#ftn.contract__.advanced_topics.static_assertions.f0" class="footnote">37</a>]</sup>
+ </p>
+<p>
+ In case of a static assertion failure, this library will generated a compile-time
+ error containing text similar to the following:
+ </p>
+<pre class="programlisting">static_assertion_memcopy.cpp:18 ... ERROR_statically_checked_precondition_number_1_failed_at_line_18 ...
+</pre>
+<p>
+ This message is similar to the run-time assertion errors generated by this
+ library, note how it contains all the information to uniquely identify the
+ assertion that failed.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.constant_assertions"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.constant_assertions" title="Constant Assertions">Constant
+ Assertions</a>
+</h3></div></div></div>
+<p>
+ As explained in the <a class="link" href="contract_programming_overview.html#contract__.contract_programming_overview.constant_correctness" title="Constant-Correctness">Constant-Correctness</a>
+ section, contract assertions shall not change the state of the program because
+ contracts are only supposed to check (and not to alter) the state of the
+ program. This library automatically makes member functions, function parameters,
+ function result, and old values constant so the compiler will correctly generate
+ an error if assertions mistakenly try to change the object, the function
+ parameters, the function result, or the old values (this should be sufficient
+ in most cases when programming contracts).
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../doc/src/images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This library cannot automatically make constant other variables that might
+ be accessible by the contract assertions (e.g., global and static variables).
+ <sup>[<a name="contract__.advanced_topics.constant_assertions.f0" href="#ftn.contract__.advanced_topics.constant_assertions.f0" class="footnote">38</a>]</sup>
+ </p></td></tr>
+</table></div>
+<p>
+ This library provides <span class="emphasis"><em>constant assertions</em></span> that can be
+ used by programmers to explicitly make constant the variables used by the
+ asserted boolean expression:
+ </p>
+<pre class="programlisting"><span class="keyword">const</span><span class="special">(</span> <span class="emphasis"><em>variable1</em></span><span class="special">,</span> <span class="emphasis"><em>variable2</em></span><span class="special">,</span> <span class="special">...)</span> <span class="emphasis"><em>boolean-expression-using-variable1-variable2-...</em></span>
+</pre>
+<p>
+ The following example calculates the next even and odd numbers that are stored
+ (for some reason) in a global variable and static data member respectively
+ (see also const_assertion_number.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">unsigned</span> <span class="identifier">even</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+
+<span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">class</span> <span class="special">(</span><span class="identifier">number</span><span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">CONTRACT_CLASS_INVARIANT</span><span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="keyword">static</span> <span class="keyword">unsigned</span> <span class="identifier">odd</span><span class="special">;</span>
+
+ <span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">void</span> <span class="special">(</span><span class="identifier">next</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span>
+ <span class="keyword">auto</span> <span class="identifier">old_even</span> <span class="special">=</span> <span class="identifier">CONTRACT_OLDOF</span> <span class="identifier">even</span><span class="special">,</span>
+ <span class="keyword">auto</span> <span class="identifier">old_odd</span> <span class="special">=</span> <span class="identifier">CONTRACT_OLDOF</span> <span class="identifier">odd</span><span class="special">,</span>
+ <span class="comment">// `[old_]even` and `[old_]odd` all `const&amp;` within assertions.</span>
+ <span class="keyword">const</span><span class="special">(</span> <span class="identifier">even</span><span class="special">,</span> <span class="identifier">old_even</span> <span class="special">)</span> <span class="identifier">even</span> <span class="special">==</span> <span class="identifier">old_even</span> <span class="special">+</span> <span class="number">2</span><span class="special">,</span>
+ <span class="keyword">const</span><span class="special">(</span> <span class="identifier">odd</span><span class="special">,</span> <span class="identifier">old_odd</span> <span class="special">)</span> <span class="identifier">odd</span> <span class="special">==</span> <span class="identifier">old_odd</span> <span class="special">+</span> <span class="number">2</span>
+ <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">even</span> <span class="special">+=</span> <span class="number">2</span><span class="special">;</span>
+ <span class="identifier">odd</span> <span class="special">+=</span> <span class="number">2</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="keyword">unsigned</span> <span class="identifier">number</span><span class="special">::</span><span class="identifier">odd</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ Note know the postconditions use constant assertions to force the <code class="computeroutput"><span class="identifier">even</span></code> and <code class="computeroutput"><span class="identifier">odd</span></code>
+ variables to be constant within each boolean expression that evaluates the
+ assertion. If for example the assignment operator <code class="computeroutput"><span class="special">=</span></code>
+ were mistakenly used instead of the equality operator <code class="computeroutput"><span class="special">==</span></code>
+ in the above postconditions, the compiler would correctly generate an error.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.select_assertions"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.select_assertions" title="Select Assertions">Select
+ Assertions</a>
+</h3></div></div></div>
+<p>
+ In the <a class="link" href="tutorial.html" title="Tutorial">Tutorial</a> section we have
+ used the ternary operator <code class="computeroutput"><span class="special">:?</span></code>
+ to program assertions that are guarded by a boolean condition:
+ </p>
+<pre class="programlisting"><span class="identifier">old_found</span> <span class="special">?</span> <span class="keyword">true</span> <span class="special">:</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">find</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">end</span><span class="special">(),</span> <span class="identifier">id</span><span class="special">)</span> <span class="special">!=</span> <span class="identifier">end</span><span class="special">(),</span>
+<span class="identifier">old_found</span> <span class="special">?</span> <span class="keyword">true</span> <span class="special">:</span> <span class="identifier">size</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">old_size</span> <span class="special">+</span> <span class="number">1</span>
+</pre>
+<p>
+ However, in cases like this one when the same boolean condition guards multiple
+ assertions, it might be more efficient to evaluate the guard condition only
+ once using one <span class="emphasis"><em>select assertion</em></span> instead of multiple
+ ternary operators <code class="computeroutput"><span class="special">:?</span></code>. In addition,
+ some programmers might find the select assertion syntax more readable than
+ the ternary operator <code class="computeroutput"><span class="special">:?</span></code>. For
+ example, the above guarded assertions could have been programmed using select
+ assertions as:
+ </p>
+<pre class="programlisting"><span class="keyword">if</span><span class="special">(</span><span class="keyword">not</span> <span class="identifier">old_found</span><span class="special">)</span> <span class="special">(</span> <span class="comment">// Guard condition evaluated only once.</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">find</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">end</span><span class="special">(),</span> <span class="identifier">id</span><span class="special">)</span> <span class="special">!=</span> <span class="identifier">end</span><span class="special">(),</span>
+ <span class="identifier">size</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">old_size</span> <span class="special">+</span> <span class="number">1</span>
+<span class="special">)</span>
+</pre>
+<p>
+ Select assertion allow to specify an optional else-block:
+ </p>
+<pre class="programlisting"><span class="keyword">if</span><span class="special">(</span><span class="emphasis"><em>boolean-condition</em></span><span class="special">)</span> <span class="special">(</span> <span class="comment">// Round parenthesis `()`.</span>
+ <span class="special">...</span> <span class="comment">// Comma-separated assertions.</span>
+<span class="special">)</span> <span class="keyword">else</span> <span class="special">(</span> <span class="comment">// Else optional as usual.</span>
+ <span class="special">...</span> <span class="comment">// Comma-separated assertions.</span>
+<span class="special">)</span>
+</pre>
+<p>
+ Note that round parenthesis <code class="computeroutput"><span class="special">(</span> <span class="special">...</span> <span class="special">)</span></code> are
+ used to program the then-block and else-block instead of the usual C++ curly
+ parenthesis <code class="computeroutput"><span class="special">{</span> <span class="special">...</span>
+ <span class="special">}</span></code>: Select assertions can be nested
+ into one another (the <code class="computeroutput"><a class="link" href="../CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS.html" title="Macro CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS">CONTRACT_LIMIT_NESTED_SELECT_ASSERTIONS</a></code>
+ macro specifies the maximum nesting level for select assertions).
+ </p>
+<p>
+ For example, consider the postconditions of the following function which
+ calculates the factorial of a natural number (see also select_assertion_factorial.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">int</span> <span class="special">(</span><span class="identifier">factorial</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">n</span> <span class="special">)</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="identifier">n</span> <span class="special">&gt;=</span> <span class="number">0</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span>
+ <span class="keyword">auto</span> <span class="identifier">result</span> <span class="special">=</span> <span class="keyword">return</span><span class="special">,</span>
+ <span class="identifier">result</span> <span class="special">&gt;=</span> <span class="number">1</span><span class="special">,</span>
+ <span class="keyword">if</span><span class="special">(</span><span class="identifier">n</span> <span class="special">==</span> <span class="number">0</span> <span class="keyword">or</span> <span class="identifier">n</span> <span class="special">==</span> <span class="number">1</span><span class="special">)</span> <span class="special">(</span> <span class="comment">// Select assertion, if-then statement.</span>
+ <span class="identifier">result</span> <span class="special">==</span> <span class="number">1</span>
+ <span class="special">)</span> <span class="keyword">else</span> <span class="special">(</span> <span class="comment">// Select assertion, else statement (optional).</span>
+ <span class="comment">// Assertions disabled within assertion so recursion OK.</span>
+ <span class="identifier">result</span> <span class="special">==</span> <span class="identifier">n</span> <span class="special">*</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">n</span> <span class="special">-</span> <span class="number">1</span><span class="special">)</span>
+ <span class="special">)</span>
+ <span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">if</span><span class="special">(</span><span class="identifier">n</span> <span class="special">==</span> <span class="number">0</span> <span class="keyword">or</span> <span class="identifier">n</span> <span class="special">==</span> <span class="number">1</span><span class="special">)</span> <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
+ <span class="keyword">else</span> <span class="keyword">return</span> <span class="identifier">n</span> <span class="special">*</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">n</span> <span class="special">-</span> <span class="number">1</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ Using the same syntax used for constant assertions, it is possible to force
+ all variables (global, static, etc) used to evaluate the if-condition of
+ the select assertion to be constant (see also const_select_assertion_factorial.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">n</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+
+<span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">int</span> <span class="special">(</span><span class="identifier">factorial</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="keyword">const</span><span class="special">(</span> <span class="identifier">n</span> <span class="special">)</span> <span class="identifier">n</span> <span class="special">&gt;=</span> <span class="number">0</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span>
+ <span class="keyword">auto</span> <span class="identifier">result</span> <span class="special">=</span> <span class="keyword">return</span><span class="special">,</span>
+ <span class="keyword">if</span><span class="special">(</span><span class="keyword">const</span><span class="special">(</span> <span class="identifier">n</span> <span class="special">)</span> <span class="identifier">n</span> <span class="special">==</span> <span class="special">-</span><span class="number">1</span> <span class="keyword">or</span> <span class="identifier">n</span> <span class="special">==</span> <span class="number">0</span><span class="special">)</span> <span class="special">(</span> <span class="comment">// Constant-correct if-condition.</span>
+ <span class="identifier">result</span> <span class="special">==</span> <span class="number">1</span>
+ <span class="special">)</span> <span class="keyword">else</span> <span class="special">(</span>
+ <span class="identifier">result</span> <span class="special">&gt;=</span> <span class="number">1</span>
+ <span class="special">)</span>
+ <span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">m</span> <span class="special">=</span> <span class="identifier">n</span><span class="special">;</span>
+ <span class="keyword">if</span><span class="special">(</span><span class="identifier">m</span> <span class="special">==</span> <span class="number">0</span> <span class="keyword">or</span> <span class="identifier">m</span> <span class="special">==</span> <span class="number">1</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
+ <span class="special">}</span> <span class="keyword">else</span> <span class="special">{</span>
+ <span class="special">--</span><span class="identifier">n</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">m</span> <span class="special">*</span> <span class="identifier">factorial</span><span class="special">();</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.assertion_statements"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.assertion_statements" title="Assertion Statements">Assertion
+ Statements</a>
+</h3></div></div></div>
+<p>
+ Only assertions can be programmed within the contracts while normal C++ statements
+ are not allowed. This is keeps contracts simple making programming errors
+ within the contracts less likely and therefore increasing the probably that
+ error-free contracts can properly check the correctness of the implementation.
+ </p>
+<p>
+ However, <code class="computeroutput"><span class="keyword">using</span></code> directives,
+ <code class="computeroutput"><span class="keyword">namespace</span></code> aliases, and <code class="computeroutput"><span class="keyword">typedef</span></code> statements are allowed within the
+ contracts because they only affect compilation (not altering the state of
+ the program at run-time) and they can be used to write more readable contracts
+ (for example, shortening namespaces within contract assertions). When used,
+ these statements have effect only locally within the preconditions, postconditions,
+ class invariants, etc where they appear. <sup>[<a name="contract__.advanced_topics.assertion_statements.f0" href="#ftn.contract__.advanced_topics.assertion_statements.f0" class="footnote">39</a>]</sup>
+ </p>
+<p>
+ For example (see also assertion_statement_ialloc.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">template</span><span class="special">(</span> <span class="keyword">typename</span> <span class="identifier">T</span> <span class="special">)</span>
+ <span class="special">(</span><span class="identifier">T</span><span class="special">*)</span> <span class="special">(</span><span class="identifier">ialloc</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+ <span class="keyword">precondition</span><span class="special">(</span>
+ <span class="keyword">namespace</span> <span class="identifier">mpl</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">,</span> <span class="comment">// Namespace aliasing.</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">,</span> <span class="comment">// Using directive.</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">pointer</span> <span class="identifier">ptr</span><span class="special">,</span> <span class="comment">// Type definition.</span>
+ <span class="keyword">static_assert</span><span class="special">(</span>
+ <span class="special">(</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">or_</span><span class="special">&lt;</span>
+ <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">bool_</span><span class="special">&lt;</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span> <span class="special">&lt;=</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="keyword">int</span><span class="special">)&gt;</span>
+ <span class="special">,</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">bool_</span><span class="special">&lt;</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">ptr</span><span class="special">)</span> <span class="special">&lt;=</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="keyword">int</span><span class="special">*)&gt;</span>
+ <span class="special">&gt;::</span><span class="identifier">value</span><span class="special">)</span>
+ <span class="special">,</span> <span class="string">"within max size"</span>
+ <span class="special">)</span>
+ <span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">*&gt;(</span><span class="identifier">malloc</span><span class="special">(</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">)));</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ These statements follow their usual C++ syntax but they are terminated with
+ a comma <code class="computeroutput"><span class="special">,</span></code> instead of a semicolon
+ <code class="computeroutput"><span class="special">;</span></code>. (The <code class="computeroutput"><span class="identifier">BOOST_IDENTITY_TYPE</span></code>
+ macro can be used to wrap eventual commas within the <code class="computeroutput"><span class="keyword">typedef</span></code>
+ statement.)
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.assertion_requirements"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.assertion_requirements" title="Assertion Requirements">Assertion
+ Requirements</a>
+</h3></div></div></div>
+<p>
+ In general, programming contract assertions can introduce a new set of requirements
+ on the types used by the program. Some of these type requirements might be
+ necessary only to program the assertions and they might not be required by
+ the implementation itself. In such cases, if the code is compiled with contracts
+ disabled (<code class="computeroutput"><a class="link" href="../CONTRACT_CONFIG_NO_PRECONDITIONS.html" title="Macro CONTRACT_CONFIG_NO_PRECONDITIONS">CONTRACT_CONFIG_NO_PRECONDITIONS</a></code>,
+ etc), the program might compile but it might no longer compile when contracts
+ are enabled because some of the types do not provide all the operations necessary
+ to check the contract assertions.
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ More in general, in some cases it might be acceptable or even desirable
+ to cause a compile-time error when a program uses types that do not provide
+ all the operations needed to check the contracts (because it is not possible
+ to fully check the correctness of the program). In these cases, programmers
+ specify contract assertions as we have seen so far (and maybe even use
+ concepts to explicitly specify the contract type requirements, see the
+ <a class="link" href="concepts.html" title="Concepts">Concepts</a> section).
+ </li>
+<li class="listitem">
+ However, in other cases it might be desirable that adding contracts to
+ a program does not change its type requirements and that assertions are
+ simply not checked when the types do not provide all the operations necessary
+ to evaluate the asserted conditions. In these cases, programmers can
+ use <span class="emphasis"><em>assertion requirements</em></span> to disable compilation
+ and run-time checking of specific assertions: <sup>[<a name="contract__.advanced_topics.assertion_requirements.f0" href="#ftn.contract__.advanced_topics.assertion_requirements.f0" class="footnote">40</a>]</sup>
+ </li>
+</ol></div>
+<pre class="programlisting"><span class="emphasis"><em>assertion</em></span><span class="special">,</span> <span class="keyword">requires</span> <span class="emphasis"><em>constant-boolean-expression</em></span>
+</pre>
+<p>
+ (The constant boolean expression of an assertion requirement can be wrapped
+ within round parenthesis <code class="computeroutput"><span class="special">()</span></code>
+ if it contains unwrapped commas.)
+ </p>
+<p>
+ Let's consider the STL <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code>
+ class template. This template normally does not require the value type <code class="computeroutput"><span class="identifier">T</span></code> to be EqualityComparable
+ (i.e., to have an equality operator <code class="computeroutput"><span class="special">==</span></code>),
+ it only requires <code class="computeroutput"><span class="identifier">T</span></code> to be
+ CopyConstructible
+ (i.e., to have a copy constructor). However, in order to check the following
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">push_back</span></code> postcondition the type <code class="computeroutput"><span class="identifier">T</span></code> must to be EqualityComparable:
+ </p>
+<pre class="programlisting"><span class="identifier">back</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">value</span> <span class="comment">// Compiler error if not `EqualityComparable&lt;T&gt;`.</span>
+</pre>
+<p>
+ Therefore, the EqualityComparable
+ requirement on <code class="computeroutput"><span class="identifier">T</span></code> is introduced
+ only by the contract assertions and it is not required by the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code>
+ implementation.
+ </p>
+<p>
+ In some cases, programmers might want compilation to fail when <code class="computeroutput"><span class="identifier">T</span></code> is not EqualityComparable
+ because in these cases it is not possible to fully check the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code>
+ contracts and therefore its correctness (in these cases programmers do not
+ specify assertion requirements and let the compilation fail, or even better
+ programmers can explicitly specify the assertion type requirements using
+ concepts which will also fail compilation but hopefully with more informative
+ error messages, see the <a class="link" href="concepts.html" title="Concepts">Concepts</a>
+ section).
+ </p>
+<p>
+ However, in other cases programmers might want to use the contracted version
+ of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> exactly
+ as they use the non-contracted version of the template and therefore without
+ failing compilation if <code class="computeroutput"><span class="identifier">T</span></code>
+ is not EqualityComparable.
+ This can be achieved specifying assertion requirements for the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">push_back</span></code> postcondition:
+ </p>
+<pre class="programlisting"><span class="identifier">back</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">value</span><span class="special">,</span> <span class="keyword">requires</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="comment">// No error if not `EqualityComparable&lt;T&gt;`.</span>
+</pre>
+<p>
+ This postcondition will be checked only when <code class="computeroutput"><span class="identifier">T</span></code>
+ is EqualityComparable,
+ otherwise the postcondition will be ignored causing no compilation error.
+ </p>
+<p>
+ For example (see also assertion_requirements_push_back.cpp):
+ <sup>[<a name="contract__.advanced_topics.assertion_requirements.f1" href="#ftn.contract__.advanced_topics.assertion_requirements.f1" class="footnote">41</a>]</sup>
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">/</span><span class="identifier">has_equal_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">template</span><span class="special">(</span> <span class="keyword">typename</span> <span class="identifier">T</span> <span class="special">)</span>
+ <span class="keyword">class</span> <span class="special">(</span><span class="identifier">vector</span><span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">CONTRACT_CLASS_INVARIANT_TPL</span><span class="special">(</span>
+ <span class="identifier">size</span><span class="special">()</span> <span class="special">&lt;=</span> <span class="identifier">capacity</span><span class="special">(),</span>
+ <span class="identifier">capacity</span><span class="special">()</span> <span class="special">&lt;=</span> <span class="identifier">max_size</span><span class="special">()</span>
+ <span class="comment">// ...</span>
+ <span class="special">)</span>
+
+ <span class="identifier">CONTRACT_FUNCTION_TPL</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">void</span> <span class="special">(</span><span class="identifier">push_back</span><span class="special">)</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;)</span> <span class="identifier">value</span> <span class="special">)</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="identifier">size</span><span class="special">()</span> <span class="special">&lt;</span> <span class="identifier">max_size</span><span class="special">()</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span>
+ <span class="keyword">auto</span> <span class="identifier">old_size</span> <span class="special">=</span> <span class="identifier">CONTRACT_OLDOF</span> <span class="identifier">size</span><span class="special">(),</span>
+ <span class="keyword">auto</span> <span class="identifier">old_capacity</span> <span class="special">=</span> <span class="identifier">CONTRACT_OLDOF</span> <span class="identifier">capacity</span><span class="special">(),</span>
+ <span class="identifier">size</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">old_size</span> <span class="special">+</span> <span class="number">1</span><span class="special">,</span>
+ <span class="identifier">capacity</span><span class="special">()</span> <span class="special">&gt;=</span> <span class="identifier">old_capacity</span><span class="special">,</span>
+ <span class="comment">// Requirements disable assertion if `T` has no `operator==`.</span>
+ <span class="identifier">back</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">value</span><span class="special">,</span> <span class="keyword">requires</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">vector_</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">value</span><span class="special">);</span>
+ <span class="special">}</span>
+
+ <span class="comment">// ...</span>
+</pre>
+<p>
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">num</span> <span class="comment">// Not equality comparable.</span>
+<span class="special">{</span>
+ <span class="keyword">int</span> <span class="identifier">value</span><span class="special">;</span>
+ <span class="keyword">explicit</span> <span class="identifier">num</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">a_value</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">value</span><span class="special">(</span><span class="identifier">a_value</span><span class="special">)</span> <span class="special">{}</span>
+<span class="special">};</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">i</span><span class="special">;</span>
+ <span class="identifier">i</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">123</span><span class="special">);</span>
+
+ <span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">num</span><span class="special">&gt;</span> <span class="identifier">n</span><span class="special">;</span>
+ <span class="identifier">n</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">num</span><span class="special">(</span><span class="number">123</span><span class="special">));</span>
+ <span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="keyword">not</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special">&lt;</span><span class="identifier">num</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">);</span>
+
+ <span class="comment">// ...</span>
+</pre>
+<p>
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">i</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">123</span><span class="special">)</span></code> call will
+ check the postcondition <code class="computeroutput"><span class="identifier">back</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">value</span></code>
+ because <code class="computeroutput"><span class="keyword">int</span></code> is EqualityComparable
+ and the assertion requirement <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">value</span></code> is true. However, the <code class="computeroutput"><span class="identifier">n</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">num</span><span class="special">(</span><span class="number">123</span><span class="special">))</span></code> call
+ will not check, and in fact not even compile, the postconditions <code class="computeroutput"><span class="identifier">back</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">value</span></code>
+ because <code class="computeroutput"><span class="identifier">num</span></code> is not EqualityComparable
+ and the assertion requirement <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special">&lt;</span><span class="identifier">num</span><span class="special">&gt;::</span><span class="identifier">value</span></code>
+ is false. <sup>[<a name="contract__.advanced_topics.assertion_requirements.f2" href="#ftn.contract__.advanced_topics.assertion_requirements.f2" class="footnote">42</a>]</sup>
+ </p>
+<p>
+ The Boost.TypeTraits
+ library provides a set of meta-functions that are very useful to program
+ assertion requirements. <sup>[<a name="contract__.advanced_topics.assertion_requirements.f3" href="#ftn.contract__.advanced_topics.assertion_requirements.f3" class="footnote">43</a>]</sup> However, C++ does not allow to inspect every trait of a type
+ so there might be some assertion requirements that unfortunately cannot be
+ programmed within the language.
+ </p>
+<p>
+ Another interesting use of assertion requirements is to model assertion computational
+ complexity. In some cases, checking assertions can be as computationally
+ expensive as executing the function body or even more. While preconditions,
+ postconditions, etc can be disabled in groups at compile-time to improve
+ performance (using <code class="computeroutput"><a class="link" href="../CONTRACT_CONFIG_NO_PRECONDITIONS.html" title="Macro CONTRACT_CONFIG_NO_PRECONDITIONS">CONTRACT_CONFIG_NO_PRECONDITIONS</a></code>,
+ <code class="computeroutput"><a class="link" href="../CONTRACT_CONFIG_NO_POSTCONDITIONS.html" title="Macro CONTRACT_CONFIG_NO_POSTCONDITIONS">CONTRACT_CONFIG_NO_POSTCONDITIONS</a></code>,
+ etc), it is also useful to be able to disable only specific assertions that
+ are very computationally expensive while keeping all other preconditions,
+ postconditions, etc enabled. For example (see also assertion_complexity_factorial.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="comment">// Assertion requirements used to model assertion computational complexity.</span>
+<span class="preprocessor">#define</span> <span class="identifier">O_1</span> <span class="number">0</span> <span class="comment">// O(1) constant (default).</span>
+<span class="preprocessor">#define</span> <span class="identifier">O_N</span> <span class="number">1</span> <span class="comment">// O(n) linear.</span>
+<span class="preprocessor">#define</span> <span class="identifier">O_NN</span> <span class="number">2</span> <span class="comment">// O(n * n) quadratic.</span>
+<span class="preprocessor">#define</span> <span class="identifier">O_NX</span> <span class="number">3</span> <span class="comment">// O(n^x) polynomial.</span>
+<span class="preprocessor">#define</span> <span class="identifier">O_FACTN</span> <span class="number">4</span> <span class="comment">// O(n!) factorial.</span>
+<span class="preprocessor">#define</span> <span class="identifier">O_EXPN</span> <span class="number">5</span> <span class="comment">// O(e^n) exponential.</span>
+<span class="preprocessor">#define</span> <span class="identifier">O_ALL</span> <span class="number">10</span>
+<span class="preprocessor">#define</span> <span class="identifier">COMPLEXITY_MAX</span> <span class="identifier">O_ALL</span>
+
+<span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">int</span> <span class="special">(</span><span class="identifier">factorial</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">n</span> <span class="special">)</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="identifier">n</span> <span class="special">&gt;=</span> <span class="number">0</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span>
+ <span class="keyword">auto</span> <span class="identifier">result</span> <span class="special">=</span> <span class="keyword">return</span><span class="special">,</span>
+ <span class="identifier">result</span> <span class="special">&gt;=</span> <span class="number">1</span><span class="special">,</span>
+ <span class="keyword">if</span><span class="special">(</span><span class="identifier">n</span> <span class="special">&lt;</span> <span class="number">2</span><span class="special">)</span> <span class="special">(</span>
+ <span class="identifier">result</span> <span class="special">==</span> <span class="number">1</span>
+ <span class="special">)</span> <span class="keyword">else</span> <span class="special">(</span>
+ <span class="comment">// Assertion compiled and checked only if within complexity.</span>
+ <span class="identifier">result</span> <span class="special">==</span> <span class="identifier">n</span> <span class="special">*</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">n</span> <span class="special">-</span> <span class="number">1</span><span class="special">),</span>
+ <span class="keyword">requires</span> <span class="identifier">O_FACTN</span> <span class="special">&lt;=</span> <span class="identifier">COMPLEXITY_MAX</span>
+ <span class="special">)</span>
+ <span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">if</span><span class="special">(</span><span class="identifier">n</span> <span class="special">&lt;</span> <span class="number">2</span><span class="special">)</span> <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
+ <span class="keyword">else</span> <span class="keyword">return</span> <span class="identifier">n</span> <span class="special">*</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">n</span> <span class="special">-</span> <span class="number">1</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ In this case the postcondition <code class="computeroutput"><span class="identifier">result</span>
+ <span class="special">=</span> <span class="identifier">n</span> <span class="special">*</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">n</span> <span class="special">-</span>
+ <span class="number">1</span><span class="special">)</span></code>
+ has factorial computational complexity and it is compiled and checked at
+ run-time only if the macro <code class="computeroutput"><span class="identifier">COMPLEXITY_MAX</span></code>
+ is defined to be <code class="computeroutput"><span class="identifier">O_FACTN</span></code>
+ or greater. Similarly, macros like <code class="computeroutput"><span class="identifier">O_SMALLER_BODY</span></code>,
+ <code class="computeroutput"><span class="identifier">O_BODY</span></code>, and <code class="computeroutput"><span class="identifier">O_GREATER_BODY</span></code> could have been defined
+ to express computational complexity in relative terms with respect to the
+ body computational complexity (see the <a class="link" href="examples.html" title="Examples">Examples</a>
+ section). <sup>[<a name="contract__.advanced_topics.assertion_requirements.f4" href="#ftn.contract__.advanced_topics.assertion_requirements.f4" class="footnote">44</a>]</sup>
+ </p>
+<p>
+ Assertion requirements can be used with assertions, constant assertions,
+ and static assertions but they cannot be used with assertion statements and
+ with the if-condition of select assertions (however, if select assertions
+ are programmed using the ternary operator <code class="computeroutput"><span class="special">:?</span></code>
+ then assertion requirements will disable the entire ternary operator <code class="computeroutput"><span class="special">:?</span></code> expression including its if-condition).
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.old_of_requirements"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.old_of_requirements" title="Old-Of Requirements">Old-Of
+ Requirements</a>
+</h3></div></div></div>
+<p>
+ Assertion requirements can be specified also for postconditions that use
+ old values. However, old values have the additional requirement that the
+ type of the expression passed to the <code class="computeroutput"><a class="link" href="../CONTRACT_OLDOF.html" title="Macro CONTRACT_OLDOF">CONTRACT_OLDOF</a></code>
+ macro must be <a class="link" href="advanced_topics.html#contract__.advanced_topics.old_and_result_value_copies" title="Old and Result Value Copies"><code class="literal">ConstantCopyConstructible</code></a>.
+ If such a requirement is not met:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Either, programmers want the compiler to error because the postconditions
+ using the old value cannot be evaluated (in which case programmers will
+ not specify assertion requirements and they might explicitly specify
+ type requirements using concepts so to get more informative error messages,
+ see the <a class="link" href="concepts.html" title="Concepts">Concepts</a> section).
+ </li>
+<li class="listitem">
+ Or, programmers want the old value declaration that uses the <code class="computeroutput"><a class="link" href="../CONTRACT_OLDOF.html" title="Macro CONTRACT_OLDOF">CONTRACT_OLDOF</a></code> macro to have no effect
+ (because the old value cannot be copied) and the postconditions using
+ such an old value to not be evaluated.
+ </li>
+</ol></div>
+<p>
+ Unfortunately, C++ cannot automatically detect if a type has a copy constructor
+ therefore a special trait <code class="computeroutput"><a class="link" href="../contract/has_oldof.html" title="Struct template has_oldof">contract::has_oldof</a></code>
+ has to be introduced to support this second case. The <code class="computeroutput"><span class="identifier">contract</span><span class="special">::</span><span class="identifier">has_oldof</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code>
+ trait is a unary boolean meta-function which is <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> by default for any type <code class="computeroutput"><span class="identifier">T</span></code> and it must be specialized by programmers
+ for types which old values cannot be copied.
+ </p>
+<p>
+ For example, consider the following increment function (see also has_oldof_inc.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">template</span><span class="special">(</span> <span class="keyword">typename</span> <span class="identifier">T</span> <span class="special">)</span>
+ <span class="special">(</span><span class="identifier">T</span><span class="special">&amp;)</span> <span class="special">(</span><span class="identifier">inc</span><span class="special">)</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">T</span><span class="special">&amp;)</span> <span class="identifier">value</span><span class="special">,</span> <span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;)</span> <span class="identifier">offset</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span>
+ <span class="keyword">auto</span> <span class="identifier">old_value</span> <span class="special">=</span> <span class="identifier">CONTRACT_OLDOF</span> <span class="identifier">value</span><span class="special">,</span> <span class="comment">// Skip if no old-of.</span>
+ <span class="keyword">auto</span> <span class="identifier">result</span> <span class="special">=</span> <span class="keyword">return</span><span class="special">,</span> <span class="comment">// Never skipped.</span>
+ <span class="identifier">value</span> <span class="special">==</span> <span class="identifier">old_value</span> <span class="special">+</span> <span class="identifier">offset</span><span class="special">,</span> <span class="keyword">requires</span>
+ <span class="identifier">contract</span><span class="special">::</span><span class="identifier">has_oldof</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="keyword">and</span> <span class="comment">// Requires old-of.</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_plus</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="keyword">and</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">,</span>
+ <span class="identifier">result</span> <span class="special">==</span> <span class="identifier">value</span><span class="special">,</span> <span class="keyword">requires</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">value</span> <span class="special">+=</span> <span class="identifier">offset</span><span class="special">;</span>
+<span class="special">}</span>
+
+<span class="keyword">class</span> <span class="identifier">num</span> <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">noncopyable</span> <span class="comment">// Non-copyable (for some reason...).</span>
+<span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="keyword">explicit</span> <span class="identifier">num</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">ptr_</span><span class="special">(</span><span class="keyword">new</span> <span class="keyword">int</span><span class="special">(</span><span class="identifier">value</span><span class="special">))</span> <span class="special">{}</span>
+ <span class="keyword">private</span><span class="special">:</span> <span class="identifier">num</span> <span class="special">(</span> <span class="identifier">num</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">other</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">ptr_</span><span class="special">(</span><span class="identifier">other</span><span class="special">.</span><span class="identifier">ptr_</span><span class="special">)</span> <span class="special">{}</span> <span class="comment">// Private copy.</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="special">~</span><span class="identifier">num</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span> <span class="special">{</span> <span class="keyword">delete</span> <span class="identifier">ptr_</span><span class="special">;</span> <span class="special">}</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="identifier">num</span> <span class="keyword">operator</span><span class="special">+</span> <span class="special">(</span> <span class="identifier">num</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">right</span> <span class="special">)</span> <span class="keyword">const</span>
+ <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">num</span><span class="special">(*</span><span class="identifier">ptr_</span> <span class="special">+</span> <span class="special">*</span><span class="identifier">right</span><span class="special">.</span><span class="identifier">ptr_</span><span class="special">);</span> <span class="special">}</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="identifier">num</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">+=</span> <span class="special">(</span> <span class="identifier">num</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">right</span> <span class="special">)</span>
+ <span class="special">{</span> <span class="special">*</span><span class="identifier">ptr_</span> <span class="special">+=</span> <span class="special">*</span><span class="identifier">right</span><span class="special">.</span><span class="identifier">ptr_</span><span class="special">;</span> <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==</span> <span class="special">(</span> <span class="identifier">num</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">right</span> <span class="special">)</span> <span class="keyword">const</span>
+ <span class="special">{</span> <span class="keyword">return</span> <span class="special">*</span><span class="identifier">ptr_</span> <span class="special">==</span> <span class="special">*</span><span class="identifier">right</span><span class="special">.</span><span class="identifier">ptr_</span><span class="special">;</span> <span class="special">}</span>
+
+ <span class="keyword">private</span><span class="special">:</span> <span class="keyword">int</span><span class="special">*</span> <span class="identifier">ptr_</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="comment">// Specialization disables old-of for non-copyable `num` (no C++ type trait can</span>
+<span class="comment">// automatically detect copy constructors).</span>
+<span class="keyword">namespace</span> <span class="identifier">contract</span>
+<span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">has_oldof</span> <span class="special">&lt;</span> <span class="identifier">num</span> <span class="special">&gt;</span> <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span> <span class="special">{};</span>
+<span class="special">}</span> <span class="comment">// namespace</span>
+</pre>
+<p>
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">1</span><span class="special">,</span> <span class="identifier">j</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
+<span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="identifier">inc</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">j</span><span class="special">)</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span>
+
+<span class="identifier">num</span> <span class="identifier">n</span><span class="special">(</span><span class="number">1</span><span class="special">),</span> <span class="identifier">m</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
+<span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="identifier">inc</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">m</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">num</span><span class="special">(</span><span class="number">3</span><span class="special">));</span>
+</pre>
+<p>
+ </p>
+<p>
+ In this example, the <code class="computeroutput"><span class="identifier">num</span></code>
+ type is non-copyable so the <code class="computeroutput"><span class="identifier">contract</span><span class="special">::</span><span class="identifier">has_oldof</span><span class="special">&lt;</span><span class="identifier">num</span><span class="special">&gt;</span></code> specialization inherits from <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>.
+ As a consequence, the call <code class="computeroutput"><span class="identifier">inc</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span>
+ <span class="identifier">m</span><span class="special">)</span></code>
+ will automatically skip the old value declaration:
+ </p>
+<pre class="programlisting"><span class="keyword">auto</span> <span class="identifier">old_value</span> <span class="special">=</span> <span class="identifier">CONTRACT_OLDOF</span> <span class="identifier">value</span>
+</pre>
+<p>
+ The following postcondition will also be skipped because its assertion requirement
+ lists <code class="computeroutput"><span class="identifier">contract</span><span class="special">::</span><span class="identifier">has_oldof</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> (where
+ <code class="computeroutput"><span class="identifier">T</span></code> is indeed the type of
+ <code class="computeroutput"><span class="identifier">value</span></code> passed to the <code class="computeroutput"><a class="link" href="../CONTRACT_OLDOF.html" title="Macro CONTRACT_OLDOF">CONTRACT_OLDOF</a></code> macro):
+ </p>
+<pre class="programlisting"><span class="identifier">value</span> <span class="special">==</span> <span class="identifier">old_value</span> <span class="special">+</span> <span class="identifier">offset</span><span class="special">,</span> <span class="keyword">requires</span> <span class="identifier">contract</span><span class="special">::</span><span class="identifier">has_oldof</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="keyword">and</span> <span class="special">...</span>
+</pre>
+<p>
+ Note how this postcondition actually requires the type <code class="computeroutput"><span class="identifier">T</span></code>
+ to have an old value, a plus operator <code class="computeroutput"><span class="special">+</span></code>,
+ and an equality operator <code class="computeroutput"><span class="special">==</span></code>
+ thus all of these requirements are programmed in the assertion requirements.
+ </p>
+<p>
+ Finally, return value declarations are never skipped so there is no <code class="computeroutput"><span class="identifier">has_result</span></code> trait. <sup>[<a name="contract__.advanced_topics.old_of_requirements.f0" href="#ftn.contract__.advanced_topics.old_of_requirements.f0" class="footnote">45</a>]</sup>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.old_and_result_value_copies"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.old_and_result_value_copies" title="Old and Result Value Copies">Old
+ and Result Value Copies</a>
+</h3></div></div></div>
+<p>
+ This library uses the class template <code class="computeroutput"><a class="link" href="../contract/copy.html" title="Class template copy">contract::copy</a></code>
+ to copy old values and the result value for postconditions.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">contract</span>
+<span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">copy</span>
+ <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="identifier">copy</span> <span class="special">(</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">object</span> <span class="special">)</span> <span class="special">;</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">value</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span> <span class="keyword">const</span> <span class="special">;</span>
+ <span class="special">};</span>
+<span class="special">}</span> <span class="comment">// namespace</span>
+</pre>
+<p>
+ The default implementation of the <code class="computeroutput"><a class="link" href="../contract/copy.html" title="Class template copy">contract::copy</a></code>
+ class template requires that the type of the old value expression passed
+ to the <code class="computeroutput"><a class="link" href="../CONTRACT_OLDOF.html" title="Macro CONTRACT_OLDOF">CONTRACT_OLDOF</a></code> macro and
+ the result type are <a class="link" href="advanced_topics.html#contract__.advanced_topics.old_and_result_value_copies" title="Old and Result Value Copies"><code class="literal">ConstantCopyConstructible</code></a>
+ (i.e., these types provide a copy constructor that copies the object from
+ a constant reference, the reference has to be constant so to ensure the constant-correctness
+ of the copy operations that are executed within the contracts, see also the
+ <a class="link" href="contract_programming_overview.html#contract__.contract_programming_overview.constant_correctness" title="Constant-Correctness">Constant-Correctness</a>
+ section):
+ </p>
+<pre class="programlisting"><span class="comment">// `ConstantCopyConstructible&lt;T&gt;` (which implies `CopyConstructible&lt;T&gt;`):</span>
+<span class="identifier">T</span><span class="special">::</span><span class="identifier">T</span> <span class="special">(</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">source</span> <span class="special">)</span> <span class="special">;</span> <span class="comment">// OK: constant-correct copy constructor.</span>
+
+<span class="comment">// `CopyConstructible&lt;T&gt;` (but not `ConstantCopyConstructible&lt;T&gt;`):</span>
+<span class="identifier">T</span><span class="special">::</span><span class="identifier">T</span> <span class="special">(</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">source</span> <span class="special">)</span> <span class="special">;</span> <span class="comment">// Error, copy constructor is not constant-correct.</span>
+</pre>
+<p>
+ Programmers can specialize the <code class="computeroutput"><a class="link" href="../contract/copy.html" title="Class template copy">contract::copy</a></code>
+ class template to allow old value and result value copies even for types
+ that are not <a class="link" href="advanced_topics.html#contract__.advanced_topics.old_and_result_value_copies" title="Old and Result Value Copies"><code class="literal">ConstantCopyConstructible</code></a>
+ (in this case it is the programmers' responsibility to make sure that the
+ copy operations that they define are constant-correct, otherwise the contracts
+ will no longer be constant-correct). <sup>[<a name="contract__.advanced_topics.old_and_result_value_copies.f0" href="#ftn.contract__.advanced_topics.old_and_result_value_copies.f0" class="footnote">46</a>]</sup>
+ </p>
+<p>
+ In the following example the old and result value declarations use the specialization
+ <code class="computeroutput"><span class="identifier">contract</span><span class="special">::</span><span class="identifier">copy</span><span class="special">&lt;</span><span class="identifier">num</span><span class="special">&gt;</span></code>
+ so it is possible to access the old and result value of variables of type
+ <code class="computeroutput"><span class="identifier">num</span></code> even if <code class="computeroutput"><span class="identifier">num</span></code> is non-copyable (see also copy_inc.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">template</span><span class="special">(</span> <span class="keyword">typename</span> <span class="identifier">T</span> <span class="special">)</span>
+ <span class="special">(</span><span class="identifier">T</span><span class="special">&amp;)</span> <span class="special">(</span><span class="identifier">inc</span><span class="special">)</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">T</span><span class="special">&amp;)</span> <span class="identifier">value</span><span class="special">,</span> <span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;)</span> <span class="identifier">offset</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span>
+ <span class="keyword">auto</span> <span class="identifier">old_value</span> <span class="special">=</span> <span class="identifier">CONTRACT_OLDOF</span> <span class="identifier">value</span><span class="special">,</span> <span class="comment">// Use `copy`.</span>
+ <span class="keyword">auto</span> <span class="identifier">result</span> <span class="special">=</span> <span class="keyword">return</span><span class="special">,</span> <span class="comment">// Would use `copy` but reference so no copy.</span>
+ <span class="identifier">value</span> <span class="special">==</span> <span class="identifier">old_value</span> <span class="special">+</span> <span class="identifier">offset</span><span class="special">,</span> <span class="keyword">requires</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_plus</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span> <span class="keyword">and</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span><span class="special">,</span>
+ <span class="identifier">result</span> <span class="special">==</span> <span class="identifier">value</span><span class="special">,</span> <span class="keyword">requires</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">value</span> <span class="special">+=</span> <span class="identifier">offset</span><span class="special">;</span>
+<span class="special">}</span>
+
+<span class="keyword">class</span> <span class="identifier">num</span> <span class="special">:</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">noncopyable</span> <span class="comment">// Non-copyable (for some reason...).</span>
+<span class="special">{</span>
+ <span class="keyword">friend</span> <span class="keyword">class</span> <span class="identifier">contract</span><span class="special">::</span><span class="identifier">copy</span><span class="special">&lt;</span><span class="identifier">num</span><span class="special">&gt;;</span> <span class="comment">// Contract copy is friend.</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="keyword">explicit</span> <span class="identifier">num</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">ptr_</span><span class="special">(</span><span class="keyword">new</span> <span class="keyword">int</span><span class="special">(</span><span class="identifier">value</span><span class="special">))</span> <span class="special">{}</span>
+ <span class="keyword">private</span><span class="special">:</span> <span class="identifier">num</span> <span class="special">(</span> <span class="identifier">num</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">other</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">ptr_</span><span class="special">(</span><span class="identifier">other</span><span class="special">.</span><span class="identifier">ptr_</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="special">~</span><span class="identifier">num</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span> <span class="special">{</span> <span class="keyword">delete</span> <span class="identifier">ptr_</span><span class="special">;</span> <span class="special">}</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="identifier">num</span> <span class="keyword">operator</span><span class="special">+</span> <span class="special">(</span> <span class="identifier">num</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">right</span> <span class="special">)</span> <span class="keyword">const</span>
+ <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">num</span><span class="special">(*</span><span class="identifier">ptr_</span> <span class="special">+</span> <span class="special">*</span><span class="identifier">right</span><span class="special">.</span><span class="identifier">ptr_</span><span class="special">);</span> <span class="special">}</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="identifier">num</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">+=</span> <span class="special">(</span> <span class="identifier">num</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">right</span> <span class="special">)</span>
+ <span class="special">{</span> <span class="special">*</span><span class="identifier">ptr_</span> <span class="special">+=</span> <span class="special">*</span><span class="identifier">right</span><span class="special">.</span><span class="identifier">ptr_</span><span class="special">;</span> <span class="keyword">return</span> <span class="special">*</span><span class="keyword">this</span><span class="special">;</span> <span class="special">}</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==</span> <span class="special">(</span> <span class="identifier">num</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">right</span> <span class="special">)</span> <span class="keyword">const</span>
+ <span class="special">{</span> <span class="keyword">return</span> <span class="special">*</span><span class="identifier">ptr_</span> <span class="special">==</span> <span class="special">*</span><span class="identifier">right</span><span class="special">.</span><span class="identifier">ptr_</span><span class="special">;</span> <span class="special">}</span>
+
+ <span class="keyword">private</span><span class="special">:</span> <span class="keyword">int</span><span class="special">*</span> <span class="identifier">ptr_</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="comment">// Specialization disables old-of for non-copyable `num` (no C++ type trait can</span>
+<span class="comment">// automatically detect copy constructors).</span>
+<span class="keyword">namespace</span> <span class="identifier">contract</span>
+<span class="special">{</span>
+ <span class="keyword">template</span><span class="special">&lt;</span> <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">copy</span> <span class="special">&lt;</span> <span class="identifier">num</span> <span class="special">&gt;</span>
+ <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="keyword">explicit</span> <span class="identifier">copy</span> <span class="special">(</span> <span class="identifier">num</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">n</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">num_</span><span class="special">(*</span><span class="identifier">n</span><span class="special">.</span><span class="identifier">ptr_</span><span class="special">)</span> <span class="special">{}</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="identifier">num</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">value</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">num_</span><span class="special">;</span> <span class="special">}</span>
+
+ <span class="keyword">private</span><span class="special">:</span> <span class="identifier">num</span> <span class="identifier">num_</span><span class="special">;</span>
+ <span class="special">};</span>
+<span class="special">}</span> <span class="comment">// namespace</span>
+</pre>
+<p>
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">1</span><span class="special">,</span> <span class="identifier">j</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
+<span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="identifier">inc</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">j</span><span class="special">)</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span>
+
+<span class="identifier">num</span> <span class="identifier">n</span><span class="special">(</span><span class="number">1</span><span class="special">),</span> <span class="identifier">m</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
+<span class="identifier">BOOST_TEST</span><span class="special">(</span><span class="identifier">inc</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span> <span class="identifier">m</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">num</span><span class="special">(</span><span class="number">3</span><span class="special">));</span>
+</pre>
+<p>
+ </p>
+<p>
+ Both calls <code class="computeroutput"><span class="identifier">inc</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">j</span><span class="special">)</span></code> and <code class="computeroutput"><span class="identifier">inc</span><span class="special">(</span><span class="identifier">n</span><span class="special">,</span>
+ <span class="identifier">m</span><span class="special">)</span></code>
+ check all postconditions. The first call copies the old and result values
+ using <code class="computeroutput"><span class="keyword">int</span></code>'s default copy constructor,
+ the second call copies the old and result values using the copy operation
+ implemented by the <code class="computeroutput"><span class="identifier">contract</span><span class="special">::</span><span class="identifier">copy</span><span class="special">&lt;</span><span class="identifier">num</span><span class="special">&gt;</span></code> specialization.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.pure_virtual_functions"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.pure_virtual_functions" title="Pure Virtual Functions">Pure
+ Virtual Functions</a>
+</h3></div></div></div>
+<p>
+ It is possible to program contracts for pure virtual functions. Pure virtual
+ functions are specified with the usual <code class="computeroutput"><span class="special">=</span>
+ <span class="number">0</span><span class="special">;</span></code>
+ symbol replacing the function definition just after the contract macros,
+ for example (see also pushable.hpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">template</span><span class="special">(</span> <span class="keyword">typename</span> <span class="identifier">T</span> <span class="special">)</span>
+ <span class="keyword">class</span> <span class="special">(</span><span class="identifier">pushable</span><span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// Subcontracting: In `and` with derived class invariants.</span>
+ <span class="identifier">CONTRACT_CLASS_INVARIANT_TPL</span><span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">const_reference</span> <span class="identifier">const_reference</span><span class="special">;</span>
+
+ <span class="identifier">CONTRACT_FUNCTION_TPL</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="special">(</span><span class="identifier">push_back</span><span class="special">)</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;)</span> <span class="identifier">value</span> <span class="special">)</span> <span class="keyword">new</span>
+ <span class="comment">// Subcontracting: In `or` with overriding function preconditions.</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="keyword">false</span> <span class="special">)</span> <span class="comment">// Force check to overriding preconditions.</span>
+ <span class="comment">// Subcontracting: In `and` with overriding function postconditions.</span>
+ <span class="keyword">postcondition</span><span class="special">(</span>
+ <span class="identifier">back</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">value</span><span class="special">,</span> <span class="keyword">requires</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">has_equal_to</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">value</span>
+ <span class="special">)</span>
+ <span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="comment">// Contract for pure virtual function.</span>
+
+ <span class="keyword">public</span><span class="special">:</span> <span class="keyword">virtual</span> <span class="identifier">const_reference</span> <span class="identifier">back</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span> <span class="keyword">const</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ Furthermore, using the <code class="computeroutput"><a class="link" href="../CONTRACT_MEMBER_BODY.html" title="Macro CONTRACT_MEMBER_BODY">CONTRACT_MEMBER_BODY</a></code>
+ macro, a derived class can be programmed without using the <code class="computeroutput"><a class="link" href="../CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">CONTRACT_CLASS</a></code>
+ and <code class="computeroutput"><a class="link" href="../CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> macros
+ even when the base class has pure virtual functions (see also default_subcontracting_base.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">class</span> <span class="special">(</span><span class="identifier">base</span><span class="special">)</span> <span class="comment">// Declared with contract macros.</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">CONTRACT_CLASS_INVARIANT</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"base::inv"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span> <span class="special">)</span>
+
+ <span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="special">(</span><span class="identifier">f</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"base::f::pre"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"base::f::post"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">class</span> <span class="identifier">deriv</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">base</span> <span class="comment">// Declared without contract macros...</span>
+<span class="special">{</span>
+ <span class="comment">// ...but using `BODY` instead of `CLASS` and `FUNCTION` macros, overriding</span>
+ <span class="comment">// functions have exact same contracts as base (not real subcontracting).</span>
+ <span class="keyword">public</span><span class="special">:</span> <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="identifier">CONTRACT_MEMBER_BODY</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">clog</span> <span class="special">&lt;&lt;</span> <span class="string">"deriv::f::body"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ This use of the <code class="computeroutput"><a class="link" href="../CONTRACT_MEMBER_BODY.html" title="Macro CONTRACT_MEMBER_BODY">CONTRACT_MEMBER_BODY</a></code>
+ macro does not force programmers of derived classes to use the library macros
+ <code class="computeroutput"><a class="link" href="../CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">CONTRACT_CLASS</a></code> and <code class="computeroutput"><a class="link" href="../CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> which would otherwise
+ introduce the unusual library syntax in the derived class declaration. However,
+ in this case the derived class is forced to inherit the base class invariants,
+ preconditions, and postconditions exactly as they are without the possibility
+ to truly subcontract the base class (which is instead possible when the
+ <code class="computeroutput"><a class="link" href="../CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">CONTRACT_CLASS</a></code> and <code class="computeroutput"><a class="link" href="../CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> macros are used in
+ declaring the derived class). <sup>[<a name="contract__.advanced_topics.pure_virtual_functions.f0" href="#ftn.contract__.advanced_topics.pure_virtual_functions.f0" class="footnote">47</a>]</sup> Correctly, the derived class can never avoid checking the base
+ class contracts neither when declared using the <code class="computeroutput"><a class="link" href="../CONTRACT_CLASS.html" title="Macro CONTRACT_CLASS">CONTRACT_CLASS</a></code>
+ and <code class="computeroutput"><a class="link" href="../CONTRACT_FUNCTION.html" title="Macro CONTRACT_FUNCTION">CONTRACT_FUNCTION</a></code> macros,
+ nor when declared using the <code class="computeroutput"><a class="link" href="../CONTRACT_MEMBER_BODY.html" title="Macro CONTRACT_MEMBER_BODY">CONTRACT_MEMBER_BODY</a></code>
+ macro.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.subcontracting_preconditions"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.subcontracting_preconditions" title="Subcontracting Preconditions">Subcontracting
+ Preconditions</a>
+</h3></div></div></div>
+<p>
+ While subcontracting is theoretically sound and justified by the <a href="http://en.wikipedia.org/wiki/Liskov_substitution_principle" target="_top">substitution
+ principle</a>, in practise subcontracted preconditions might be confusing
+ for programmers because of the implications of evaluating overriding preconditions
+ in <a class="link" href="contract_programming_overview.html#logic_or_anchor">logic-or</a> with overridden preconditions
+ (this is not the case for subcontracted postconditions and class invariants
+ which usually behave as programmers expect because they are evaluated in
+ <a class="link" href="contract_programming_overview.html#logic_and_anchor">logic-and</a>).
+ </p>
+<p>
+ For example, consider the following base class <code class="computeroutput"><span class="identifier">integer</span></code>
+ which holds an integral value and its derived class <code class="computeroutput"><span class="identifier">natural</span></code>
+ which holds a natural (i.e., non-negative integer) value (see also subcontract_pre_natural_failure.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">class</span> <span class="special">(</span><span class="identifier">integer</span><span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">CONTRACT_CLASS_INVARIANT</span><span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+
+ <span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="special">(</span><span class="identifier">set</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">)</span>
+ <span class="comment">// No preconditions so this and all overrides can always be called.</span>
+ <span class="keyword">postcondition</span><span class="special">(</span> <span class="identifier">get</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">value</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">value_</span> <span class="special">=</span> <span class="identifier">value</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keyword">int</span> <span class="special">(</span><span class="identifier">get</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span> <span class="keyword">const</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">value_</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">private</span><span class="special">:</span> <span class="keyword">int</span> <span class="identifier">value_</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">class</span> <span class="special">(</span><span class="identifier">natural</span><span class="special">)</span> <span class="keyword">extends</span><span class="special">(</span> <span class="keyword">public</span> <span class="identifier">integer</span> <span class="special">)</span> <span class="comment">// Subcontract.</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">CONTRACT_CLASS_INVARIANT</span><span class="special">(</span> <span class="identifier">get</span><span class="special">()</span> <span class="special">&gt;=</span> <span class="number">0</span> <span class="special">)</span>
+
+ <span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="special">(</span><span class="identifier">set</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">)</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="identifier">value</span> <span class="special">&gt;=</span> <span class="number">0</span> <span class="special">)</span> <span class="comment">// NOTE: Will not fail because of base.</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">integer</span><span class="special">::</span><span class="identifier">CONTRACT_MEMBER_BODY</span><span class="special">(</span><span class="identifier">set</span><span class="special">)(</span><span class="identifier">value</span><span class="special">);</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ From reading the contracts we conclude that:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">integer</span><span class="special">::</span><span class="identifier">get</span></code> returns the latest value set (as
+ specified by <code class="computeroutput"><span class="identifier">integer</span><span class="special">::</span><span class="identifier">set</span></code>
+ postconditions).
+ </li>
+<li class="listitem">
+ There is no constraint on the integer value that is passed to <code class="computeroutput"><span class="identifier">integer</span><span class="special">::</span><span class="identifier">set</span></code> (because <code class="computeroutput"><span class="identifier">integer</span><span class="special">::</span><span class="identifier">set</span></code>
+ has no precondition).
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">get</span></code> always returns a non-negative value
+ (as specified by the <code class="computeroutput"><span class="identifier">natural</span></code>
+ class invariants).
+ </li>
+<li class="listitem">
+ Only non-negative values can be passed to <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code>
+ (as specified by <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code>
+ preconditions).
+ </li>
+</ul></div>
+<p>
+ This last conclusion is incorrect! Negative values can be passed to <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code> because they can be passed to its base
+ virtual function <code class="computeroutput"><span class="identifier">integral</span><span class="special">::</span><span class="identifier">set</span></code> (preconditions
+ cannot only be weakened). The complete set of <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code> preconditions
+ is given by its base virtual function <code class="computeroutput"><span class="identifier">integer</span><span class="special">::</span><span class="identifier">set</span></code> preconditions
+ (which are always <code class="computeroutput"><span class="keyword">true</span></code> because
+ they are not specified) evaluated in <a class="link" href="contract_programming_overview.html#logic_or_anchor">logic-or</a>
+ with the preconditions explicitly specified by <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code> (i.e.,
+ <code class="computeroutput"><span class="identifier">value</span> <span class="special">&gt;=</span>
+ <span class="number">0</span></code>):
+ </p>
+<pre class="programlisting"><span class="special">(</span><span class="keyword">true</span><span class="special">)</span> <span class="keyword">or</span> <span class="special">(</span><span class="identifier">value</span> <span class="special">&gt;=</span> <span class="number">0</span><span class="special">)</span>
+</pre>
+<p>
+ Obviously, this always evaluates to <code class="computeroutput"><span class="keyword">true</span></code>
+ regardless of <code class="computeroutput"><span class="identifier">value</span></code> being
+ non-negative. This is correct in accordance with the <a href="http://en.wikipedia.org/wiki/Liskov_substitution_principle" target="_top">substitution
+ principle</a> for which <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code> can
+ be called in any context where <code class="computeroutput"><span class="identifier">integer</span><span class="special">::</span><span class="identifier">set</span></code> is
+ called because <code class="computeroutput"><span class="identifier">natural</span></code> inherits
+ from <code class="computeroutput"><span class="identifier">integer</span></code>. Given that
+ <code class="computeroutput"><span class="identifier">integer</span><span class="special">::</span><span class="identifier">set</span></code> can be called regardless of <code class="computeroutput"><span class="identifier">value</span></code> being non-negative (because it has
+ no precondition) there is no precondition that we can later specify for
+ <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code> that will change that and in fact
+ <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code> can also be called with negative values
+ without failing its subcontracted preconditions. For example, the call:
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">natural</span> <span class="identifier">n</span><span class="special">;</span>
+<span class="identifier">n</span><span class="special">.</span><span class="identifier">set</span><span class="special">(-</span><span class="number">123</span><span class="special">);</span> <span class="comment">// Error: Fails call invariants instead of preconditions.</span>
+</pre>
+<p>
+ </p>
+<p>
+ Fails the class invariants checked while exiting <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code>:
+ </p>
+<pre class="programlisting">class invariant (on exit) number 1 "get() &gt;= 0" failed: file "natural_subcontractpre.cpp", line 30
+</pre>
+<p>
+ Ideally, this call would have failed much earlier at <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code> preconditions
+ (in fact, the <code class="computeroutput"><span class="identifier">natural</span><span class="special">::</span><span class="identifier">set</span></code> body is executed with the logically
+ invalid negative value <code class="computeroutput"><span class="special">-</span><span class="number">123</span></code>
+ which could in general lead to catastrophic errors and mysterious bugs).
+ </p>
+<p>
+ The issue here is in the design. A natural number is not an integer number
+ because while it is valid to use an integer number in a context where it
+ is assigned to a negative number, it is not valid to use a natural number
+ in such a context so a natural number should not inherit from an integer
+ number. Inheritance models the is-a
+ relationship which should not be used in this case as the contracts and the
+ <a href="http://en.wikipedia.org/wiki/Liskov_substitution_principle" target="_top">substitution
+ principle</a> are telling us.
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/src/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Note that if a virtual member function has no preconditions, it means that
+ it is always valid to call it, and (in accordance with the <a href="http://en.wikipedia.org/wiki/Liskov_substitution_principle" target="_top">substitution
+ principle</a>) this semantic cannot be changed by the contracts of
+ any overriding function no matter what preconditions we specify for it.
+ Similarly, if an overriding member function has no preconditions, it means
+ that is is always valid to call it regardless of possible preconditions
+ specified by any function that it overrides.
+ </p></td></tr>
+</table></div>
+<p>
+ An overriding function can specify <code class="computeroutput"><span class="keyword">precondition</span><span class="special">(</span> <span class="keyword">false</span> <span class="special">)</span></code>
+ if it wants to keep the same preconditions of the functions that is overriding.
+ A pure virtual function can specify <code class="computeroutput"><span class="keyword">precondition</span><span class="special">(</span> <span class="keyword">false</span> <span class="special">)</span></code>
+ to indicate that overriding functions will specify preconditions (this only
+ makes sense for pure virtual functions because a function with <code class="computeroutput"><span class="keyword">precondition</span><span class="special">(</span> <span class="keyword">false</span> <span class="special">)</span></code> can
+ never be called successfully unless it is overridden and its preconditions
+ are weakened, that might be acceptable for pure virtual because they must
+ always be overridden).
+ </p>
+<p>
+ If programmers find subcontracted preconditions confusing, this library allows
+ to forbid them by defining the configuration macro <code class="computeroutput"><a class="link" href="../CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html" title="Macro CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS">CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS</a></code>.
+ When this macro is defined, the library will generate a compile-time error
+ if a derived class tries to override preconditions of member functions of
+ any of its base classes (this is also the subcontracting behaviour specified
+ by <a class="link" href="bibliography.html#N1962_anchor">[N1962]</a>). However, note that in case
+ of multiple-inheritance preconditions from the overridden function from all
+ bases classes will always be checked in <a class="link" href="contract_programming_overview.html#logic_or_anchor">logic-or</a>
+ with each other so preconditions from a base class could still be weaken
+ by the preconditions of another base class even when the <code class="computeroutput"><a class="link" href="../CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html" title="Macro CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS">CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS</a></code>
+ macro is defined. By default the <code class="computeroutput"><a class="link" href="../CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS.html" title="Macro CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS">CONTRACT_CONFIG_DO_NOT_SUBCONTRACT_PRECONDITIONS</a></code>
+ macro is not defined and this library allows to override preconditions (as
+ specified by for Eiffel
+ by <a class="link" href="bibliography.html#Meyer97_anchor">[Meyer97]</a> and in accordance with
+ the <a href="http://en.wikipedia.org/wiki/Liskov_substitution_principle" target="_top">substitution
+ principle</a>).
+ </p>
+<p>
+ Another difference between subcontracted preconditions and subcontracted
+ postconditions or class invariants is that subcontracted preconditions will
+ always report a failure of the overridden preconditions. For example, consider
+ a set of base classes <code class="literal">b<span class="emphasis"><em>N</em></span></code> and a derived
+ class <code class="computeroutput"><span class="identifier">d</span></code>:
+ </p>
+<pre class="programlisting"><span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">struct</span> <span class="special">(</span><span class="identifier">a</span><span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="special">...</span> <span class="comment">// No member function `f`.</span>
+<span class="special">};</span>
+
+<span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">struct</span> <span class="special">(</span><span class="identifier">b</span><span class="emphasis"><em>N</em></span><span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">CONTRACT_CLASS_INVARIANT</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span>
+
+ <span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="special">(</span><span class="identifier">f</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span> <span class="comment">// Overridden function.</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{}</span>
+
+ <span class="special">...</span>
+<span class="special">};</span>
+
+<span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">struct</span> <span class="special">(</span><span class="identifier">c</span><span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="special">...</span> <span class="comment">// No member function `f`.</span>
+<span class="special">};</span>
+
+<span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">struct</span> <span class="special">(</span><span class="identifier">d</span><span class="special">)</span> <span class="keyword">extends</span><span class="special">(</span> <span class="identifier">b1</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b2</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">b3</span> <span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">CONTRACT_CLASS_INVARIANT</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span>
+
+ <span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="keyword">void</span> <span class="special">(</span><span class="identifier">f</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span> <span class="comment">// Overriding function.</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span> <span class="special">...</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{}</span>
+
+ <span class="special">...</span>
+<span class="special">};</span>
+</pre>
+<p>
+ When <code class="computeroutput"><span class="identifier">d</span><span class="special">::</span><span class="identifier">f</span></code> is called, its subcontracted class invariants,
+ postconditions, and preconditions are evaluated using the following expressions
+ (the base classes <code class="computeroutput"><span class="identifier">a</span></code> and
+ <code class="computeroutput"><span class="identifier">c</span></code> do not declare a virtual
+ function <code class="computeroutput"><span class="identifier">f</span></code> so they are automatically
+ excluded from <code class="computeroutput"><span class="identifier">d</span><span class="special">::</span><span class="identifier">f</span></code> subcontracting):
+ </p>
+<pre class="programlisting"><span class="identifier">b1</span><span class="special">::</span><span class="emphasis"><em>class-invariants</em></span> <span class="keyword">and</span> <span class="identifier">b2</span><span class="special">::</span><span class="emphasis"><em>class-invariants</em></span> <span class="keyword">and</span> <span class="identifier">b3</span><span class="special">::</span><span class="emphasis"><em>class-invariants</em></span> <span class="keyword">and</span> <span class="identifier">d</span><span class="special">::</span><span class="emphasis"><em>class-invariants</em></span> <span class="comment">// `d::f` subcontracted class invariants.</span>
+<span class="identifier">b1</span><span class="special">::</span><span class="identifier">f</span><span class="special">::</span><span class="emphasis"><em>postconditions</em></span> <span class="keyword">and</span> <span class="identifier">b2</span><span class="special">::</span><span class="identifier">f</span><span class="special">::</span><span class="emphasis"><em>postconditions</em></span> <span class="keyword">and</span> <span class="identifier">b3</span><span class="special">::</span><span class="identifier">f</span><span class="special">::</span><span class="emphasis"><em>postconditions</em></span> <span class="keyword">and</span> <span class="identifier">d</span><span class="special">::</span><span class="identifier">f</span><span class="special">::</span><span class="emphasis"><em>postconditions</em></span> <span class="comment">// `d::f` subcontracted postconditions.</span>
+<span class="identifier">b1</span><span class="special">::</span><span class="identifier">f</span><span class="special">::</span><span class="emphasis"><em>preconditions</em></span> <span class="keyword">or</span> <span class="identifier">b2</span><span class="special">::</span><span class="identifier">f</span><span class="special">::</span><span class="emphasis"><em>preconditions</em></span> <span class="keyword">or</span> <span class="identifier">b3</span><span class="special">::</span><span class="identifier">f</span><span class="special">::</span><span class="emphasis"><em>preconditions</em></span> <span class="keyword">or</span> <span class="identifier">d</span><span class="special">::</span><span class="identifier">f</span><span class="special">::</span><span class="emphasis"><em>preconditions</em></span> <span class="comment">// `d::f` subcontracted preconditions.</span>
+</pre>
+<p>
+ When subcontracted class invariants or subcontracted postconditions fail,
+ this library reports the first failed condition which can in general be in
+ the base class contracts because they are checked first in the <a class="link" href="contract_programming_overview.html#logic_and_anchor">logic-and</a>
+ chain (this can report a failure from any subcontracted class invariants
+ <code class="literal">b<span class="emphasis"><em>N</em></span>::<span class="emphasis"><em>class-invariants</em></span></code>
+ or <code class="literal">d::<span class="emphasis"><em>class-invariants</em></span></code>, and subcontracted
+ postconditions <code class="literal">b<span class="emphasis"><em>N</em></span>::f::<span class="emphasis"><em>postconditions</em></span></code>
+ or <code class="literal">d::f::<span class="emphasis"><em>postconditions</em></span></code>). However,
+ when subcontracted preconditions fail it means that all overridden preconditions
+ as well as the overriding preconditions have failed (because subcontracted
+ preconditions are evaluated in <a class="link" href="contract_programming_overview.html#logic_or_anchor">logic-or</a>).
+ In this case, this library will report the last evaluated failure which will
+ always be in the overriding preconditions (always report a failure from
+ <code class="literal">d::f::<span class="emphasis"><em>preconditions</em></span></code>). If programmers
+ want instead the library to report the failure from the first overridden
+ precondition that failed, they can define the configuration macro <code class="computeroutput"><a class="link" href="../CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE.html" title="Macro CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE">CONTRACT_CONFIG_REPORT_BASE_PRECONDITION_FAILURE</a></code>
+ (always report a failure from <code class="literal">b1::f::<span class="emphasis"><em>preconditions</em></span></code>).
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="contract__.advanced_topics.static_member_functions"></a><a class="link" href="advanced_topics.html#contract__.advanced_topics.static_member_functions" title="Static Member Functions">Static
+ Member Functions</a>
+</h3></div></div></div>
+<p>
+ It is possible to program contracts for static member functions. Static member
+ functions cannot access the object therefore their preconditions and postconditions
+ also cannot access the object and they can only access other static members.
+ This library allows to specify a subset of class invariants called <span class="emphasis"><em>static
+ class invariants</em></span> which do not access the object and that are checked
+ at entry and exit of every constructor, destructor, and member functions
+ even if static. (Non-static class invariants are instead not checked at constructor
+ entry, at destructor exit, and at entry and exit of static member functions
+ because they require accessing the object, see also the <a class="link" href="contract_programming_overview.html" title="Contract Programming Overview">Contract
+ Programming Overview</a> section.)
+ </p>
+<p>
+ Static class invariants are empty (<code class="computeroutput"><span class="keyword">void</span></code>)
+ by default unless they are explicitly specified within the <code class="computeroutput"><a class="link" href="../CONTRACT_CLASS_INVARIANT.html" title="Macro CONTRACT_CLASS_INVARIANT">CONTRACT_CLASS_INVARIANT</a></code>
+ macro using the following syntax: <sup>[<a name="contract__.advanced_topics.static_member_functions.f0" href="#ftn.contract__.advanced_topics.static_member_functions.f0" class="footnote">48</a>]</sup>
+ </p>
+<pre class="programlisting"><span class="keyword">static</span> <span class="keyword">class</span><span class="special">(</span> <span class="emphasis"><em>assertion1</em></span><span class="special">,</span> <span class="emphasis"><em>assertion2</em></span><span class="special">,</span> <span class="special">...</span> <span class="special">)</span>
+</pre>
+<p>
+ For example (see also static_contract_instance_counter.cpp):
+ </p>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">CONTRACT_CLASS</span><span class="special">(</span>
+ <span class="keyword">template</span><span class="special">(</span> <span class="keyword">typename</span> <span class="identifier">T</span> <span class="special">)</span>
+ <span class="keyword">class</span> <span class="special">(</span><span class="identifier">instance_counter</span><span class="special">)</span>
+<span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">CONTRACT_CLASS_INVARIANT_TPL</span><span class="special">(</span>
+ <span class="identifier">object</span><span class="special">(),</span> <span class="comment">// Non-static class invariants.</span>
+ <span class="keyword">static</span> <span class="keyword">class</span><span class="special">(</span> <span class="comment">// Static class invariants.</span>
+ <span class="identifier">count</span><span class="special">()</span> <span class="special">&gt;=</span> <span class="number">0</span>
+ <span class="comment">// ...</span>
+ <span class="special">)</span>
+ <span class="special">)</span>
+
+ <span class="identifier">CONTRACT_CONSTRUCTOR_TPL</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">explicit</span> <span class="special">(</span><span class="identifier">instance_counter</span><span class="special">)</span> <span class="special">(</span> <span class="special">(</span><span class="identifier">T</span><span class="special">*)</span> <span class="identifier">the_object</span> <span class="special">)</span>
+ <span class="keyword">precondition</span><span class="special">(</span> <span class="identifier">the_object</span> <span class="special">)</span>
+ <span class="keyword">postcondition</span><span class="special">(</span>
+ <span class="keyword">auto</span> <span class="identifier">old_count</span> <span class="special">=</span> <span class="identifier">CONTRACT_OLDOF</span> <span class="identifier">count</span><span class="special">(),</span>
+ <span class="identifier">count</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">old_count</span> <span class="special">+</span> <span class="number">1</span><span class="special">,</span>
+ <span class="identifier">object</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">the_object</span>
+ <span class="special">)</span>
+ <span class="keyword">initialize</span><span class="special">(</span> <span class="identifier">object_</span><span class="special">(</span><span class="identifier">the_object</span><span class="special">)</span> <span class="special">)</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">count_</span><span class="special">++;</span>
+ <span class="special">}</span>
+
+ <span class="identifier">CONTRACT_DESTRUCTOR_TPL</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="keyword">virtual</span> <span class="special">(~</span><span class="identifier">instance_counter</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+ <span class="comment">// FUTURE: Destructors could have static postconditions.</span>
+ <span class="comment">// postcondition: count() = oldof count() - 1</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">delete</span> <span class="identifier">object_</span><span class="special">;</span>
+ <span class="identifier">count_</span><span class="special">--;</span>
+ <span class="special">}</span>
+
+ <span class="identifier">CONTRACT_FUNCTION_TPL</span><span class="special">(</span>
+ <span class="keyword">public</span> <span class="special">(</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">*</span> <span class="keyword">const</span><span class="special">)</span> <span class="special">(</span><span class="identifier">object</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span> <span class="keyword">const</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">object_</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="identifier">CONTRACT_FUNCTION_TPL</span><span class="special">(</span> <span class="comment">// Contract static member function.</span>
+ <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> <span class="special">(</span><span class="identifier">count</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+ <span class="comment">// No preconditions nor postconditions for this example but when</span>
+ <span class="comment">// present no object can be accessed by assertions (i.e., `static`).</span>
+ <span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">count_</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">private</span><span class="special">:</span> <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">count_</span><span class="special">;</span>
+ <span class="keyword">private</span><span class="special">:</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">object_</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T</span> <span class="special">&gt;</span>
+<span class="keyword">int</span> <span class="identifier">instance_counter</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">count_</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ In this example there is only one static class invariant assertion <code class="computeroutput"><span class="identifier">count</span><span class="special">()</span> <span class="special">&gt;=</span> <span class="number">0</span></code> and
+ it is checked at entry and exit of every constructor, destructor, and member
+ function including the static member function <code class="computeroutput"><span class="identifier">count</span></code>.
+ If the static member function <code class="computeroutput"><span class="identifier">count</span></code>
+ had preconditions or postconditions, they would not be able to access the
+ object (i.e., preconditions and postconditions will also be executed in static
+ context).
+ </p>
+</div>
+<div