From 624e9d53c289e4c54d61240e2d6468d889c3cec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Sch=C3=B6pflin?= Date: Mon, 10 Dec 2007 13:40:56 +0000 Subject: [PATCH 01/32] Treated Rogue Wave library concept check failure on Tru64/CXX. [SVN r41955] --- stl_concept_check.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stl_concept_check.cpp b/stl_concept_check.cpp index 8ec6f96..d336de1 100644 --- a/stl_concept_check.cpp +++ b/stl_concept_check.cpp @@ -47,7 +47,8 @@ main() function_requires< BackInsertionSequence >(); #if !(defined(__GNUC__) && defined(BOOST_HIDE_EXPECTED_ERRORS)) -#if !(defined(__sgi) && defined(BOOST_HIDE_EXPECTED_ERRORS)) +#if !((defined(__sgi) || (defined(__DECCXX) && defined(_RWSTD_VER) && _RWSTD_VER <= 0x0203)) \ + && defined(BOOST_HIDE_EXPECTED_ERRORS)) // old deque iterator missing n + iter operation function_requires< Mutable_RandomAccessContainer >(); #endif From 2364f0f02abc81f92a6e60078cb59c09e8b74635 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 10 Feb 2008 14:56:22 +0000 Subject: [PATCH 02/32] Link to people pages on the website, as they've been removed from the download. [SVN r43209] --- bibliography.htm | 2 +- concept_check.htm | 8 ++++---- concept_covering.htm | 2 +- creating_concepts.htm | 2 +- implementation.htm | 2 +- prog_with_concepts.htm | 2 +- reference.htm | 2 +- using_concept_check.htm | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bibliography.htm b/bibliography.htm index 2c42925..4fcc8fe 100644 --- a/bibliography.htm +++ b/bibliography.htm @@ -56,7 +56,7 @@ A. A. Stepanov and M. Lee
Copyright © 2000 -Jeremy Siek(Jeremy Siek(jsiek@osl.iu.edu) Andrew Lumsdaine(lums@osl.iu.edu)
diff --git a/concept_check.htm b/concept_check.htm index 0f70167..50c640b 100644 --- a/concept_check.htm +++ b/concept_check.htm @@ -124,9 +124,9 @@
  • Reference
  • -

    Jeremy Siek contributed this - library. Beman Dawes managed - the formal review. Dave +

    Jeremy Siek contributed this + library. Beman Dawes managed + the formal review. Dave Abrahams contributed a rewrite that updated syntax to be more compatible with proposed syntax for concept support the C++ core language.

    @@ -319,7 +319,7 @@ boost/concept_check.hpp:236: error: no match for ‘operator<’ in ‘((boos Copyright © 2000 - Jeremy Siek(Jeremy Siek(jsiek@osl.iu.edu) Andrew Lumsdaine(lums@osl.iu.edu), 2007 David Abrahams. diff --git a/concept_covering.htm b/concept_covering.htm index 96c3208..d3997e1 100644 --- a/concept_covering.htm +++ b/concept_covering.htm @@ -115,7 +115,7 @@ public: Copyright © 2000 - Jeremy Siek(Jeremy Siek(jsiek@osl.iu.edu) Andrew Lumsdaine(lums@osl.iu.edu), 2007 David Abrahams. diff --git a/creating_concepts.htm b/creating_concepts.htm index f6cca8f..7961a91 100644 --- a/creating_concepts.htm +++ b/creating_concepts.htm @@ -147,7 +147,7 @@ BOOST_CONCEPT_USAGE(InputIterator) Copyright © 2000 - Jeremy Siek(Jeremy Siek(jsiek@osl.iu.edu) Andrew Lumsdaine(lums@osl.iu.edu), 2007 David Abrahams. diff --git a/implementation.htm b/implementation.htm index 6df94ca..008fbed 100644 --- a/implementation.htm +++ b/implementation.htm @@ -195,7 +195,7 @@ type. Copyright © 2000 - Jeremy Siek(Jeremy Siek(jsiek@osl.iu.edu) Andrew Lumsdaine(lums@osl.iu.edu), 2007 David Abrahams. diff --git a/prog_with_concepts.htm b/prog_with_concepts.htm index 2aa9e22..fb04aed 100644 --- a/prog_with_concepts.htm +++ b/prog_with_concepts.htm @@ -134,7 +134,7 @@ amount of flexibility within which to work. Copyright © 2000 - Jeremy Siek(Jeremy Siek(jsiek@osl.iu.edu) Andrew Lumsdaine(lums@osl.iu.edu), 2007 David Abrahams. diff --git a/reference.htm b/reference.htm index 0e1797b..a8a2aa0 100644 --- a/reference.htm +++ b/reference.htm @@ -398,7 +398,7 @@ BOOST_CLASS_REQUIRES4(type1, type2, type3, type4, Copyright © 2000 - Jeremy Siek(Jeremy Siek(jsiek@osl.iu.edu) Andrew Lumsdaine(lums@osl.iu.edu), 2007 David Abrahams. diff --git a/using_concept_check.htm b/using_concept_check.htm index 3dc311d..ba75282 100644 --- a/using_concept_check.htm +++ b/using_concept_check.htm @@ -176,7 +176,7 @@ BOOST_CONCEPT_ASSERT((BidirectionalIterator<std::list<int>::iterator> Copyright © 2000 - Jeremy Siek(Jeremy Siek(jsiek@osl.iu.edu) Andrew Lumsdaine(lums@osl.iu.edu), 2007 David Abrahams. From a61d13975199c9914f97ed18e4281f2dda1a7388 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 10 Feb 2008 15:02:17 +0000 Subject: [PATCH 03/32] Point links to the pages that used to be in 'more' to the site. [SVN r43210] --- concept_check.htm | 4 ++-- creating_concepts.htm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/concept_check.htm b/concept_check.htm index 50c640b..9ddcf8d 100644 --- a/concept_check.htm +++ b/concept_check.htm @@ -26,7 +26,7 @@
    The Concept Check library allows one to add explicit statement and checking of concepts in the style + "http://www.boost.org/more/generic_programming.html#concept">concepts in the style of the proposed C++ language extension. @@ -36,7 +36,7 @@

    Generic programming in C++ is characterized by the use of template parameters to represent abstract data types (or “concepts”). However, the + "http://www.boost.org/more/generic_programming.html#concept">concepts”). However, the C++ language itself does not provide a mechanism for the writer of a class or function template to explicitly state the concept that the user-supplied template argument should model (or conform to). Template parameters are diff --git a/creating_concepts.htm b/creating_concepts.htm index 7961a91..d579aaf 100644 --- a/creating_concepts.htm +++ b/creating_concepts.htm @@ -76,7 +76,7 @@ struct InputIterator InputIterator concept.

    Next, we declare the concept's associated types + "http://www.boost.org/more/generic_programming.html#associated_type">associated types as member typedefs. The associated difference type is required to be a signed integer, and the iterator category has to be convertible to std::input_iterator_tag, so we assert those relationships. The syntax for From e7fbe05ee2aff65de22db7f45313851957cb65da Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Tue, 25 Mar 2008 20:47:38 +0000 Subject: [PATCH 04/32] Work around intel-10.0-win compiler bug [SVN r43861] --- include/boost/concept/requires.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) mode change 100755 => 100644 include/boost/concept/requires.hpp diff --git a/include/boost/concept/requires.hpp b/include/boost/concept/requires.hpp old mode 100755 new mode 100644 index 5570b64..024ba74 --- a/include/boost/concept/requires.hpp +++ b/include/boost/concept/requires.hpp @@ -4,6 +4,7 @@ #ifndef BOOST_CONCEPT_REQUIRES_DWA2006430_HPP # define BOOST_CONCEPT_REQUIRES_DWA2006430_HPP +# include # include # include # include @@ -38,8 +39,11 @@ struct Requires_ : ::boost::parameter::aux::unaryfunptr_arg_type # endif }; - -#define BOOST_CONCEPT_REQUIRES_(r,data,t) + (::boost::_requires_::value) +# if BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(1010)) +# define BOOST_CONCEPT_REQUIRES_(r,data,t) | (::boost::_requires_::value) +# else +# define BOOST_CONCEPT_REQUIRES_(r,data,t) + (::boost::_requires_::value) +# endif #if defined(NDEBUG) || BOOST_WORKAROUND(BOOST_MSVC, < 1300) From cc5dcdfb3334ba9966a07d0749ae81d5563f12e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Fri, 23 May 2008 08:59:49 +0000 Subject: [PATCH 05/32] Worked around an unused variable compiler warning displayed in concept_check.hpp when _ITERATOR_ is not defined. [SVN r45671] --- include/boost/concept_check.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp index 4e9fddf..09f6e22 100644 --- a/include/boost/concept_check.hpp +++ b/include/boost/concept_check.hpp @@ -144,6 +144,8 @@ namespace boost void const_constraints(const TT& b) { #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL a = b; // const required for argument to assignment +#else + ignore_unused_variable_warning(b); #endif } private: From b3fc10803fe07996725f658fa151c23cb3010d98 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 25 Jul 2008 09:11:23 +0000 Subject: [PATCH 06/32] Improve visibility of concept failure messages [SVN r47793] --- include/boost/concept/detail/general.hpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) mode change 100755 => 100644 include/boost/concept/detail/general.hpp diff --git a/include/boost/concept/detail/general.hpp b/include/boost/concept/detail/general.hpp old mode 100755 new mode 100644 index f36f9c4..14f1567 --- a/include/boost/concept/detail/general.hpp +++ b/include/boost/concept/detail/general.hpp @@ -29,6 +29,16 @@ struct requirement static void failed() { ((Model*)0)->~Model(); } }; +struct failed {}; + +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION +template +struct requirement +{ + static void failed() { ((Model*)0)->~Model(); } +}; +# endif + # ifdef BOOST_OLD_CONCEPT_SUPPORT template @@ -42,17 +52,28 @@ struct requirement_ : mpl::if_< concept::not_satisfied , constraint +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION + , requirement +# else , requirement +# endif >::type {}; # else // For GCC-2.x, these can't have exactly the same name +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION template struct requirement_ - : requirement + : requirement {}; +# else +template +struct requirement_ + : requirement +{}; +# endif # endif From 5c06a2ea0b33e4fb6e11d0b58add66813c0aa0f1 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 25 Jul 2008 09:26:15 +0000 Subject: [PATCH 07/32] No compilers without partial specialization see this file. [SVN r47794] --- include/boost/concept/detail/general.hpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/include/boost/concept/detail/general.hpp b/include/boost/concept/detail/general.hpp index 14f1567..79ecbe0 100644 --- a/include/boost/concept/detail/general.hpp +++ b/include/boost/concept/detail/general.hpp @@ -31,13 +31,11 @@ struct requirement struct failed {}; -# ifndef BOOST_NO_PARTIAL_SPECIALIZATION template struct requirement { static void failed() { ((Model*)0)->~Model(); } }; -# endif # ifdef BOOST_OLD_CONCEPT_SUPPORT @@ -52,28 +50,17 @@ struct requirement_ : mpl::if_< concept::not_satisfied , constraint -# ifndef BOOST_NO_PARTIAL_SPECIALIZATION , requirement -# else - , requirement -# endif >::type {}; # else // For GCC-2.x, these can't have exactly the same name -# ifndef BOOST_NO_PARTIAL_SPECIALIZATION template struct requirement_ : requirement {}; -# else -template -struct requirement_ - : requirement -{}; -# endif # endif From 63c674c575390fb4ff11b6b67a53359a719acf72 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 25 Jul 2008 09:38:53 +0000 Subject: [PATCH 08/32] Improve visibility of concept failure messages [SVN r47797] --- include/boost/concept/detail/msvc.hpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) mode change 100755 => 100644 include/boost/concept/detail/msvc.hpp diff --git a/include/boost/concept/detail/msvc.hpp b/include/boost/concept/detail/msvc.hpp old mode 100755 new mode 100644 index 3aadb79..d71d91b --- a/include/boost/concept/detail/msvc.hpp +++ b/include/boost/concept/detail/msvc.hpp @@ -14,6 +14,7 @@ namespace boost { namespace concept { + template struct check { @@ -22,7 +23,19 @@ struct check x->~Model(); } }; - + +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION +struct failed {}; +template +struct check +{ + virtual void failed(Model* x) + { + x->~Model(); + } +}; +# endif + # ifdef BOOST_OLD_CONCEPT_SUPPORT namespace detail @@ -38,7 +51,11 @@ struct require : mpl::if_c< not_satisfied::value , detail::constraint +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION , check +# else + , check +# endif >::type {}; @@ -46,7 +63,11 @@ struct require template struct require - : check +# ifndef BOOST_NO_PARTIAL_SPECIALIZATION + : check +# else + : check +# endif {}; # endif From eb4c1f2587a863a94c33dfc6167a1bb69dea504c Mon Sep 17 00:00:00 2001 From: Stephan Diederich Date: Wed, 17 Sep 2008 18:44:34 +0000 Subject: [PATCH 09/32] silence MSVC8 warnings through pragmas, fixes #2296 [SVN r48821] --- include/boost/concept_check.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp index 09f6e22..12ec2ad 100644 --- a/include/boost/concept_check.hpp +++ b/include/boost/concept_check.hpp @@ -171,6 +171,11 @@ namespace boost TT b; }; +#if (defined _MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4510 ) // default constructor could not be generated +# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required +#endif // The SGI STL version of Assignable requires copy constructor and operator= BOOST_concept(SGIAssignable,(TT)) { @@ -192,6 +197,9 @@ namespace boost } TT a; }; +#if (defined _MSC_VER) +# pragma warning( pop ) +#endif BOOST_concept(Convertible,(X)(Y)) { From 80de3d1903d7f89ad5855a3025062c9f7622fb85 Mon Sep 17 00:00:00 2001 From: "Michael A. Jackson" Date: Sat, 1 Nov 2008 13:15:41 +0000 Subject: [PATCH 10/32] Continuing merge of CMake build system files into trunk with the encouragement of Doug Gregor [SVN r49510] --- CMakeLists.txt | 23 +++++++++++++++++++++++ module.cmake | 1 + test/CMakeLists.txt | 6 ++++++ 3 files changed, 30 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 module.cmake create mode 100644 test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3190d9d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,23 @@ +#---------------------------------------------------------------------------- +# This file was automatically generated from the original CMakeLists.txt file +# Add a variable to hold the headers for the library +set (lib_headers + concept_check.hpp + concept_archetype.hpp + concept_check +) + +# Add a library target to the build system +boost_library_project( + concept_check + # SRCDIRS + TESTDIRS test + HEADERS ${lib_headers} + # DOCDIRS + DESCRIPTION "Tools for generic programming." + MODULARIZED + AUTHORS "Jeremy Siek " + # MAINTAINERS +) + + diff --git a/module.cmake b/module.cmake new file mode 100644 index 0000000..7519ee3 --- /dev/null +++ b/module.cmake @@ -0,0 +1 @@ +boost_module(concept_check DEPENDS preprocessor concept) \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..48c08d3 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,6 @@ +# this fails but looks like it isn't the build +# boost_test_run(../stl_concept_covering) +boost_test_run(concept_check_test ../concept_check_test.cpp) +boost_test_run(class_concept_check_test ../class_concept_check_test.cpp) +boost_test_compile_fail(concept_check_fail_expected ../concept_check_fail_expected.cpp) +boost_test_compile_fail(class_concept_fail_expected ../class_concept_fail_expected.cpp) From 30dc63f52f14babbf67bc2900fa976e7fc2c1662 Mon Sep 17 00:00:00 2001 From: "Michael A. Jackson" Date: Fri, 7 Nov 2008 17:02:56 +0000 Subject: [PATCH 11/32] Updating CMake files to latest trunk. Added dependency information for regression tests and a few new macros for internal use. [SVN r49627] --- test/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 48c08d3..2a85231 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,3 +1,5 @@ +boost_additional_test_dependencies(concept_check BOOST_DEPENDS utility) + # this fails but looks like it isn't the build # boost_test_run(../stl_concept_covering) boost_test_run(concept_check_test ../concept_check_test.cpp) From a37267f1810cc03eaa84441b4056e7989f7cb929 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 17 Feb 2009 10:05:58 +0000 Subject: [PATCH 12/32] Add PDF generation options to fix external links to point to the web site. Added a few more Boostbook based libs that were missed first time around. Fixed PDF naming issues. [SVN r51284] --- doc/Jamfile.v2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 7b00065..f69d0b5 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -1,4 +1,7 @@ project boost/concepts ; import boostbook : boostbook ; -boostbook concepts : reference/concepts.xml ; +boostbook concepts : reference/concepts.xml + : + pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html + ; From dc164705ad840b19d98e71f09eb7110804915afc Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 21 Feb 2009 18:49:48 +0000 Subject: [PATCH 13/32] Minor markup fix in concept check documentation. [SVN r51369] --- doc/reference/concepts.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/reference/concepts.xml b/doc/reference/concepts.xml index bd7cce0..feb41de 100644 --- a/doc/reference/concepts.xml +++ b/doc/reference/concepts.xml @@ -51,7 +51,7 @@ and Boost Graph and Property Map documentation, the SGI Standard Template Library documentation and the Hewlett-Packard STL, under the following license: -

    Permission to use, copy, modify, distribute and +
    Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appears in all copies and that both that copyright @@ -59,7 +59,7 @@ documentation. Silicon Graphics makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied - warranty.
    + warranty.
    Concept reference From deea7c6a589b82d7ec211857e91b0040f31d3919 Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Sun, 31 May 2009 01:48:28 +0000 Subject: [PATCH 14/32] Fixed more links to property_map [SVN r53478] --- using_concept_check.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/using_concept_check.htm b/using_concept_check.htm index ba75282..2d08db2 100644 --- a/using_concept_check.htm +++ b/using_concept_check.htm @@ -32,7 +32,7 @@ complete list. In addition, other boost libraries come with concept checking classes for the concepts that are particular to those libraries. For example, there are graph - concepts and property map + concepts and property map concepts. Also, whenever anyone writing function templates needs to express requirements that are not yet stated by an existing concept, a new concept checking class should be created. How to do this is explained @@ -136,7 +136,7 @@ BOOST_CONCEPT_REQUIRES( corresponding concept checking class will have multiple template parameters. The following example shows how BOOST_CONCEPT_REQUIRES is used with the ReadWritePropertyMap + "../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap concept, which takes two type parameters: a property map and the key type for the map.

    
    From e234ae22f601da793d06cee7b60da308a71b4ac3 Mon Sep 17 00:00:00 2001
    From: Dave Abrahams 
    Date: Mon, 8 Jun 2009 14:41:16 +0000
    Subject: [PATCH 15/32] concept:: => concepts::  fixes #865
    
    [SVN r53751]
    ---
     concept_check.htm                                |  2 +-
     .../concept/detail/backward_compatibility.hpp    | 16 ++++++++++++++++
     include/boost/concept/detail/borland.hpp         |  5 +++--
     include/boost/concept/detail/general.hpp         |  9 +++++----
     include/boost/concept/detail/has_constraints.hpp |  6 ++++--
     include/boost/concept/detail/msvc.hpp            |  7 ++++---
     include/boost/concept/usage.hpp                  |  7 ++++---
     7 files changed, 37 insertions(+), 15 deletions(-)
     create mode 100644 include/boost/concept/detail/backward_compatibility.hpp
     mode change 100755 => 100644 include/boost/concept/detail/borland.hpp
     mode change 100755 => 100644 include/boost/concept/detail/has_constraints.hpp
     mode change 100755 => 100644 include/boost/concept/usage.hpp
    
    diff --git a/concept_check.htm b/concept_check.htm
    index 9ddcf8d..1dd72c2 100644
    --- a/concept_check.htm
    +++ b/concept_check.htm
    @@ -250,7 +250,7 @@ bad_error_eg.cpp:8:   instantiated from here
     boost/concept_check.hpp: In destructor ‘boost::LessThanComparable<TT>::~
       LessThanComparable() [with TT = std::complex<float>]’:
     boost/concept/detail/general.hpp:29:   instantiated from ‘static void boost::
    -  concept::requirement<Model>::failed() [with Model = boost::
    +  concepts::requirement<Model>::failed() [with Model = boost::
       LessThanComparable<std::complex<float> >]’
     boost/concept/requires.hpp:30:   instantiated from ‘boost::_requires_<void
       (*)(boost::LessThanComparable<std::complex<float> >)>’
    diff --git a/include/boost/concept/detail/backward_compatibility.hpp b/include/boost/concept/detail/backward_compatibility.hpp
    new file mode 100644
    index 0000000..88d5921
    --- /dev/null
    +++ b/include/boost/concept/detail/backward_compatibility.hpp
    @@ -0,0 +1,16 @@
    +// Copyright David Abrahams 2009. Distributed under the Boost
    +// Software License, Version 1.0. (See accompanying
    +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    +#ifndef BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
    +# define BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
    +
    +namespace boost
    +{
    +  namespace concepts {}
    +
    +# if !defined(BOOST_NO_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD)
    +  namespace concept = concepts;
    +# endif 
    +} // namespace boost::concept
    +
    +#endif // BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
    diff --git a/include/boost/concept/detail/borland.hpp b/include/boost/concept/detail/borland.hpp
    old mode 100755
    new mode 100644
    index 59fec55..300d5d4
    --- a/include/boost/concept/detail/borland.hpp
    +++ b/include/boost/concept/detail/borland.hpp
    @@ -5,8 +5,9 @@
     # define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
     
     # include 
    +# include 
     
    -namespace boost { namespace concept {
    +namespace boost { namespace concepts {
     
     template 
     struct require;
    @@ -21,7 +22,7 @@ struct require
       enum                                                  \
       {                                                     \
           BOOST_PP_CAT(boost_concept_check,__LINE__) =      \
    -      boost::concept::require::instantiate  \
    +      boost::concepts::require::instantiate  \
       }
     
     }} // namespace boost::concept
    diff --git a/include/boost/concept/detail/general.hpp b/include/boost/concept/detail/general.hpp
    index 79ecbe0..e3014c1 100644
    --- a/include/boost/concept/detail/general.hpp
    +++ b/include/boost/concept/detail/general.hpp
    @@ -5,6 +5,7 @@
     # define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
     
     # include 
    +# include 
     
     # ifdef BOOST_OLD_CONCEPT_SUPPORT
     #  include 
    @@ -13,7 +14,7 @@
     
     // This implementation works on Comeau and GCC, all the way back to
     // 2.95
    -namespace boost { namespace concept {
    +namespace boost { namespace concepts {
     
     template 
     struct requirement_;
    @@ -48,7 +49,7 @@ struct constraint
     template 
     struct requirement_
       : mpl::if_<
    -        concept::not_satisfied
    +        concepts::not_satisfied
           , constraint
           , requirement
         >::type
    @@ -65,8 +66,8 @@ struct requirement_
     # endif
     
     #  define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr )             \
    -    typedef ::boost::concept::detail::instantiate<          \
    -    &::boost::concept::requirement_::failed>    \
    +    typedef ::boost::concepts::detail::instantiate<          \
    +    &::boost::concepts::requirement_::failed>    \
           BOOST_PP_CAT(boost_concept_check,__LINE__)
     
     }}
    diff --git a/include/boost/concept/detail/has_constraints.hpp b/include/boost/concept/detail/has_constraints.hpp
    old mode 100755
    new mode 100644
    index 3112b55..7a33813
    --- a/include/boost/concept/detail/has_constraints.hpp
    +++ b/include/boost/concept/detail/has_constraints.hpp
    @@ -6,7 +6,9 @@
     
     # include 
     # include 
    -namespace boost { namespace concept {
    +# include 
    +
    +namespace boost { namespace concepts {
     
     namespace detail
     { 
    @@ -43,6 +45,6 @@ struct not_satisfied
         typedef mpl::bool_ type;
     };
     
    -}} // namespace boost::concept::detail
    +}} // namespace boost::concepts::detail
     
     #endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
    diff --git a/include/boost/concept/detail/msvc.hpp b/include/boost/concept/detail/msvc.hpp
    index d71d91b..9fbd250 100644
    --- a/include/boost/concept/detail/msvc.hpp
    +++ b/include/boost/concept/detail/msvc.hpp
    @@ -5,6 +5,7 @@
     # define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
     
     # include 
    +# include 
     
     # ifdef BOOST_OLD_CONCEPT_SUPPORT
     #  include 
    @@ -12,7 +13,7 @@
     # endif
     
     
    -namespace boost { namespace concept {
    +namespace boost { namespace concepts {
     
     
     template 
    @@ -91,7 +92,7 @@ struct require
     enum                                                \
     {                                                   \
         BOOST_PP_CAT(boost_concept_check,__LINE__) =    \
    -    sizeof(::boost::concept::require)    \
    +    sizeof(::boost::concepts::require)    \
     }
       
     # else // Not vc-7.1
    @@ -104,7 +105,7 @@ require_(void(*)(Model));
     enum                                                    \
     {                                                       \
         BOOST_PP_CAT(boost_concept_check,__LINE__) =        \
    -      sizeof(::boost::concept::require_((ModelFnPtr)0)) \
    +      sizeof(::boost::concepts::require_((ModelFnPtr)0)) \
     }
       
     # endif
    diff --git a/include/boost/concept/usage.hpp b/include/boost/concept/usage.hpp
    old mode 100755
    new mode 100644
    index 9af8ca3..5eee493
    --- a/include/boost/concept/usage.hpp
    +++ b/include/boost/concept/usage.hpp
    @@ -6,8 +6,9 @@
     
     # include 
     # include 
    +# include 
     
    -namespace boost { namespace concept { 
    +namespace boost { namespace concepts { 
     
     # if BOOST_WORKAROUND(__GNUC__, == 2)
     
    @@ -25,13 +26,13 @@ struct usage_requirements
     
     #   define BOOST_CONCEPT_USAGE(model)                                    \
           model(); /* at least 2.96 and 3.4.3 both need this :( */           \
    -      BOOST_CONCEPT_ASSERT((boost::concept::usage_requirements)); \
    +      BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \
           ~model()
     
     #  else
     
     #   define BOOST_CONCEPT_USAGE(model)                                    \
    -      BOOST_CONCEPT_ASSERT((boost::concept::usage_requirements)); \
    +      BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \
           ~model()
     
     #  endif
    
    From 9ceeae9e9fb0e7e8beda58c63fab6cb238d54dfd Mon Sep 17 00:00:00 2001
    From: Daniel James 
    Date: Wed, 22 Jul 2009 22:35:08 +0000
    Subject: [PATCH 16/32] Add boost license info to documentation for a few
     libraries.
    
      * Boost.Any: Kevlin Henney is in blanket-permission.txt
      * Boost.Variant: Eric Friedman and Itay Maman are both in blanket-permissions.txt
      * Boost.Concept: Idiana University, University of Notre Dame du Lac, Jeremy Siek,
        Lie-Quan Lee, Andrew Lumsdaine are all listed under blanket permissions.
    
      SGI and HP aren't so their license is left alone.
    
    [SVN r55098]
    ---
     doc/reference/concepts.xml | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/doc/reference/concepts.xml b/doc/reference/concepts.xml
    index feb41de..ffe32c1 100644
    --- a/doc/reference/concepts.xml
    +++ b/doc/reference/concepts.xml
    @@ -38,6 +38,12 @@
         
     
         
    +      Distributed under the Boost Software License, Version 1.0.
    +      (See accompanying file LICENSE_1_0.txt or copy at 
    +      http://www.boost.org/LICENSE_1_0.txt)
    +      
    +
           This product includes software developed at the University
           of Notre Dame and the Pervasive Technology Labs at Indiana
           University. For technical information contact Andrew Lumsdaine
    
    From d9282dbe8c98695529493f54be0486a976318ecc Mon Sep 17 00:00:00 2001
    From: "Troy D. Straszheim" 
    Date: Sun, 26 Jul 2009 00:49:56 +0000
    Subject: [PATCH 17/32] Copyrights on CMakeLists.txt to keep them from clogging
     up the inspect reports.  This is essentially the same commit as r55095 on the
     release branch.
    
    [SVN r55159]
    ---
     CMakeLists.txt      | 6 ++++++
     test/CMakeLists.txt | 6 ++++++
     2 files changed, 12 insertions(+)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index 3190d9d..073ef90 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -1,3 +1,9 @@
    +#
    +# Copyright Troy D. Straszheim
    +#
    +# Distributed under the Boost Software License, Version 1.0.
    +# See http://www.boost.org/LICENSE_1_0.txt
    +#
     #----------------------------------------------------------------------------
     # This file was automatically generated from the original CMakeLists.txt file
     # Add a variable to hold the headers for the library
    diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
    index 2a85231..fea159f 100644
    --- a/test/CMakeLists.txt
    +++ b/test/CMakeLists.txt
    @@ -1,3 +1,9 @@
    +#
    +# Copyright Troy D. Straszheim
    +#
    +# Distributed under the Boost Software License, Version 1.0.
    +# See http://www.boost.org/LICENSE_1_0.txt
    +#
     boost_additional_test_dependencies(concept_check BOOST_DEPENDS utility)
     
     # this fails but looks like it isn't the build
    
    From c12ec71acb7e2ca7cc552bf9d5019cf9349f60f6 Mon Sep 17 00:00:00 2001
    From: "Troy D. Straszheim" 
    Date: Sat, 17 Oct 2009 02:07:38 +0000
    Subject: [PATCH 18/32] rm cmake from trunk.  I'm not entirely sure this is
     necessary to satisfy the inspect script, but I'm not taking any chances, and
     it is easy to put back
    
    [SVN r56942]
    ---
     CMakeLists.txt      | 29 -----------------------------
     module.cmake        |  1 -
     test/CMakeLists.txt | 14 --------------
     3 files changed, 44 deletions(-)
     delete mode 100644 CMakeLists.txt
     delete mode 100644 module.cmake
     delete mode 100644 test/CMakeLists.txt
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    deleted file mode 100644
    index 073ef90..0000000
    --- a/CMakeLists.txt
    +++ /dev/null
    @@ -1,29 +0,0 @@
    -#
    -# Copyright Troy D. Straszheim
    -#
    -# Distributed under the Boost Software License, Version 1.0.
    -# See http://www.boost.org/LICENSE_1_0.txt
    -#
    -#----------------------------------------------------------------------------
    -# This file was automatically generated from the original CMakeLists.txt file
    -# Add a variable to hold the headers for the library
    -set (lib_headers
    -    concept_check.hpp
    -    concept_archetype.hpp
    -    concept_check
    -)
    -
    -# Add a library target to the build system
    -boost_library_project(
    -  concept_check
    -  #  SRCDIRS 
    -  TESTDIRS  test
    -  HEADERS ${lib_headers}
    -  #  DOCDIRS 
    -  DESCRIPTION  "Tools for generic programming."
    -  MODULARIZED 
    -  AUTHORS  "Jeremy Siek "
    -  #  MAINTAINERS 
    -)
    -
    -
    diff --git a/module.cmake b/module.cmake
    deleted file mode 100644
    index 7519ee3..0000000
    --- a/module.cmake
    +++ /dev/null
    @@ -1 +0,0 @@
    -boost_module(concept_check DEPENDS preprocessor concept)
    \ No newline at end of file
    diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
    deleted file mode 100644
    index fea159f..0000000
    --- a/test/CMakeLists.txt
    +++ /dev/null
    @@ -1,14 +0,0 @@
    -#
    -# Copyright Troy D. Straszheim
    -#
    -# Distributed under the Boost Software License, Version 1.0.
    -# See http://www.boost.org/LICENSE_1_0.txt
    -#
    -boost_additional_test_dependencies(concept_check BOOST_DEPENDS utility)
    -
    -# this fails but looks like it isn't the build
    -# boost_test_run(../stl_concept_covering)
    -boost_test_run(concept_check_test ../concept_check_test.cpp)
    -boost_test_run(class_concept_check_test ../class_concept_check_test.cpp)
    -boost_test_compile_fail(concept_check_fail_expected ../concept_check_fail_expected.cpp)
    -boost_test_compile_fail(class_concept_fail_expected ../class_concept_fail_expected.cpp)
    
    From e8bd11887b09c9b818814ec61146f2ea095447f7 Mon Sep 17 00:00:00 2001
    From: John Maddock 
    Date: Thu, 4 Mar 2010 18:01:36 +0000
    Subject: [PATCH 19/32] Fixes #3980.
    
    [SVN r60150]
    ---
     include/boost/concept/detail/has_constraints.hpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/include/boost/concept/detail/has_constraints.hpp b/include/boost/concept/detail/has_constraints.hpp
    index 7a33813..a309db3 100644
    --- a/include/boost/concept/detail/has_constraints.hpp
    +++ b/include/boost/concept/detail/has_constraints.hpp
    @@ -21,7 +21,7 @@ namespace detail
       template 
       struct wrap_constraints {};
         
    -#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580)
    +#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__)
       // Work around the following bogus error in Sun Studio 11, by
       // turning off the has_constraints function entirely:
       //    Error: complex expression not allowed in dependent template
    
    From 0eac9e329b81dfe765f0bce040a8d3c4c1d7a807 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?J=C3=BCrgen=20Hunold?= 
    Date: Fri, 9 Apr 2010 09:04:51 +0000
    Subject: [PATCH 20/32] Silence gcc warnings when using UnaryFunction with
     reference parameters.
    
    [SVN r61152]
    ---
     include/boost/concept_check.hpp | 10 +++++++++-
     1 file changed, 9 insertions(+), 1 deletion(-)
    
    diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp
    index 12ec2ad..f051c72 100644
    --- a/include/boost/concept_check.hpp
    +++ b/include/boost/concept_check.hpp
    @@ -330,7 +330,15 @@ namespace boost
           {
               f(arg);
           }
    -      
    +
    +#if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4))
    +      // Declare a dummy construktor to make gcc happy.
    +      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
    +      // (warning: non-static reference "const double& boost::UnaryFunction::arg"
    +      // in class without a constructor [-Wuninitialized])
    +      UnaryFunction();
    +#endif
    +
           Func f;
           Arg arg;
       };
    
    From 3f1842a89e477e666cad6b1d3313de3468670889 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?J=C3=BCrgen=20Hunold?= 
    Date: Sat, 10 Apr 2010 17:50:26 +0000
    Subject: [PATCH 21/32] Dummy-Constructor only for gcc > 4.
    
    [SVN r61185]
    ---
     include/boost/concept_check.hpp | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp
    index f051c72..7ee3036 100644
    --- a/include/boost/concept_check.hpp
    +++ b/include/boost/concept_check.hpp
    @@ -331,7 +331,8 @@ namespace boost
               f(arg);
           }
     
    -#if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4))
    +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
    +                      && BOOST_WORKAROUND(__GNUC__, > 3)))
           // Declare a dummy construktor to make gcc happy.
           // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
           // (warning: non-static reference "const double& boost::UnaryFunction::arg"
    
    From 7e0926d77f93e36b13e902804e0b8bb5a0c26cb9 Mon Sep 17 00:00:00 2001
    From: Jeremiah Willcock 
    Date: Tue, 8 Jun 2010 19:23:09 +0000
    Subject: [PATCH 22/32] Fixed typo in comment
    
    [SVN r62595]
    ---
     include/boost/concept/usage.hpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/include/boost/concept/usage.hpp b/include/boost/concept/usage.hpp
    index 5eee493..21547c3 100644
    --- a/include/boost/concept/usage.hpp
    +++ b/include/boost/concept/usage.hpp
    @@ -39,6 +39,6 @@ struct usage_requirements
     
     # endif 
     
    -}} // namespace boost::concept
    +}} // namespace boost::concepts
     
     #endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP
    
    From d4658af6d79d8107da898cfe74553e81b4f44fd3 Mon Sep 17 00:00:00 2001
    From: Jeremiah Willcock 
    Date: Tue, 8 Jun 2010 23:28:23 +0000
    Subject: [PATCH 23/32] Moved Collection concept into Boost.ConceptCheck; moved
     other MultiArray concepts into boost::multi_array_concepts and documented
     them in reference.xml (do not know how to rebuild HTML from that); fixes
     #4032
    
    [SVN r62611]
    ---
     include/boost/concept_check.hpp | 38 +++++++++++++++++++++++++++++++++
     reference.htm                   |  4 ++++
     2 files changed, 42 insertions(+)
    
    diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp
    index 7ee3036..58bd8b2 100644
    --- a/include/boost/concept_check.hpp
    +++ b/include/boost/concept_check.hpp
    @@ -1,5 +1,7 @@
     //
     // (C) Copyright Jeremy Siek 2000.
    +// Copyright 2002 The Trustees of Indiana University.
    +//
     // Distributed under the Boost Software License, Version 1.0. (See
     // accompanying file LICENSE_1_0.txt or copy at
     // http://www.boost.org/LICENSE_1_0.txt)
    @@ -999,6 +1001,42 @@ namespace boost
     
       // HashedAssociativeContainer
     
    +  BOOST_concept(Collection,(C))
    +  {
    +      BOOST_CONCEPT_USAGE(Collection)
    +      {
    +        boost::function_requires >();
    +        boost::function_requires >();
    +        boost::function_requires >();
    +        const_constraints(c);
    +        i = c.begin();
    +        i = c.end();
    +        c.swap(c);
    +      }
    +
    +      void const_constraints(const C& c) {
    +        ci = c.begin();
    +        ci = c.end();
    +        n = c.size();
    +        b = c.empty();
    +      }
    +
    +    private:
    +      typedef typename C::value_type value_type;
    +      typedef typename C::iterator iterator;
    +      typedef typename C::const_iterator const_iterator;
    +      typedef typename C::reference reference;
    +      typedef typename C::const_reference const_reference;
    +      // typedef typename C::pointer pointer;
    +      typedef typename C::difference_type difference_type;
    +      typedef typename C::size_type size_type;
    +
    +      C c;
    +      bool b;
    +      iterator i;
    +      const_iterator ci;
    +      size_type n;
    +  };
     } // namespace boost
     
     # include 
    diff --git a/reference.htm b/reference.htm
    index a8a2aa0..7c113e6 100644
    --- a/reference.htm
    +++ b/reference.htm
    @@ -279,6 +279,10 @@ struct SortedAssociativeContainer;
    +
    +template <class C>
    +struct Collection;
     

    Basic Archetype From a1772df31bd9bf2dad172db61abe2befacc3eb7e Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Tue, 8 Jun 2010 23:37:21 +0000 Subject: [PATCH 24/32] Added char as an integral type; fixes #2629 [SVN r62612] --- include/boost/concept_check.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp index 58bd8b2..a6b5d20 100644 --- a/include/boost/concept_check.hpp +++ b/include/boost/concept_check.hpp @@ -72,6 +72,7 @@ namespace boost T x; }; + template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; From f81493caa18ffed40713505bef55d4ac66e535dc Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 20 Jun 2010 18:00:48 +0000 Subject: [PATCH 25/32] Update various libraries' documentation build. Mostly to use the images and css files under doc/src instead of doc/html, usually be deleting the settings in order to use the defaults. Also add 'boost.root' to some builds in order to fix links which rely on it. [SVN r63146] --- doc/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index f69d0b5..500fa14 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -4,4 +4,5 @@ import boostbook : boostbook ; boostbook concepts : reference/concepts.xml : pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html + boost.root=../../../.. ; From b4ff615db88d6d33ee882f266c638b6e3ba7862a Mon Sep 17 00:00:00 2001 From: Neil Groves Date: Thu, 23 Dec 2010 00:43:10 +0000 Subject: [PATCH 26/32] Eliminate warnings from BinaryFunction, UnaryPredicate, BinaryPredicate concept check classes. [SVN r67422] --- include/boost/concept_check.hpp | 139 ++++++++++++++++++++------------ 1 file changed, 87 insertions(+), 52 deletions(-) diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp index a6b5d20..8345e0a 100644 --- a/include/boost/concept_check.hpp +++ b/include/boost/concept_check.hpp @@ -38,14 +38,14 @@ namespace boost // // Backward compatibility // - + template inline void function_requires(Model* = 0) { BOOST_CONCEPT_ASSERT((Model)); - } + } template inline void ignore_unused_variable_warning(T const&) {} - + # define BOOST_CLASS_REQUIRE(type_var, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept)) @@ -58,14 +58,14 @@ namespace boost # define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept)) - + // // Begin concept definitions // BOOST_concept(Integer, (T)) { BOOST_CONCEPT_USAGE(Integer) - { + { x.error_type_must_be_an_integer_type(); } private: @@ -90,7 +90,7 @@ namespace boost # endif BOOST_concept(SignedInteger,(T)) { - BOOST_CONCEPT_USAGE(SignedInteger) { + BOOST_CONCEPT_USAGE(SignedInteger) { x.error_type_must_be_a_signed_integer_type(); } private: @@ -104,16 +104,16 @@ namespace boost template <> struct SignedInteger< ::boost::long_long_type> {}; # elif defined(BOOST_HAS_MS_INT64) template <> struct SignedInteger<__int64> {}; -# endif +# endif BOOST_concept(UnsignedInteger,(T)) { - BOOST_CONCEPT_USAGE(UnsignedInteger) { + BOOST_CONCEPT_USAGE(UnsignedInteger) { x.error_type_must_be_an_unsigned_integer_type(); } private: T x; }; - + template <> struct UnsignedInteger {}; template <> struct UnsignedInteger {}; template <> struct UnsignedInteger {}; @@ -155,7 +155,7 @@ namespace boost TT a; }; - + BOOST_concept(CopyConstructible,(TT)) { BOOST_CONCEPT_USAGE(CopyConstructible) { @@ -300,7 +300,7 @@ namespace boost BOOST_concept(Generator,(Func)(Return)) { BOOST_CONCEPT_USAGE(Generator) { test(is_void()); } - + private: void test(boost::mpl::false_) { @@ -313,22 +313,22 @@ namespace boost { f(); } - + Func f; }; BOOST_concept(UnaryFunction,(Func)(Return)(Arg)) { BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void()); } - + private: void test(boost::mpl::false_) { f(arg); // "priming the pump" this way keeps msvc6 happy (ICE) Return r = f(arg); - ignore_unused_variable_warning(r); + ignore_unused_variable_warning(r); } - + void test(boost::mpl::true_) { f(arg); @@ -357,12 +357,21 @@ namespace boost Return r = f(first, second); // require operator() (void)r; } - + void test(boost::mpl::true_) { f(first,second); } - + +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::BinaryFunction::arg" + // in class without a constructor [-Wuninitialized]) + BinaryFunction(); +#endif + Func f; First first; Second second; @@ -374,6 +383,15 @@ namespace boost require_boolean_expr(f(arg)); // require operator() returning bool } private: +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::UnaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + UnaryPredicate(); +#endif + Func f; Arg arg; }; @@ -384,6 +402,14 @@ namespace boost require_boolean_expr(f(a, b)); // require operator() returning bool } private: +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::BinaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + BinaryPredicate(); +#endif Func f; First a; Second b; @@ -393,7 +419,7 @@ namespace boost BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second)) : BinaryPredicate { - BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { + BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { const_constraints(f); } private: @@ -401,6 +427,15 @@ namespace boost // operator() must be a const member function require_boolean_expr(fun(a, b)); } +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::Const_BinaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + Const_BinaryPredicate(); +#endif + Func f; First a; Second b; @@ -410,7 +445,7 @@ namespace boost : Generator { typedef typename Func::result_type result_type; - + BOOST_CONCEPT_USAGE(AdaptableGenerator) { BOOST_CONCEPT_ASSERT((Convertible)); @@ -441,7 +476,7 @@ namespace boost typedef typename Func::first_argument_type first_argument_type; typedef typename Func::second_argument_type second_argument_type; typedef typename Func::result_type result_type; - + ~AdaptableBinaryFunction() { BOOST_CONCEPT_ASSERT((Convertible)); @@ -479,7 +514,7 @@ namespace boost { BOOST_CONCEPT_ASSERT((SignedInteger)); BOOST_CONCEPT_ASSERT((Convertible)); - + TT j(i); (void)*i; // require dereference operator ++j; // require preincrement operator @@ -493,7 +528,7 @@ namespace boost : Assignable { BOOST_CONCEPT_USAGE(OutputIterator) { - + ++i; // require preincrement operator i++; // require postincrement operator *i++ = t; // require postincrement and assignment @@ -512,11 +547,11 @@ namespace boost BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category , std::forward_iterator_tag >)); - + typename InputIterator::reference r = *i; ignore_unused_variable_warning(r); } - + private: TT i; }; @@ -578,7 +613,7 @@ namespace boost n = i - j; // require difference operator (void)i[n]; // require element access operator } - + private: TT a, b; TT i, j; @@ -616,7 +651,7 @@ namespace boost BOOST_CONCEPT_ASSERT((InputIterator)); const_constraints(c); } - + private: void const_constraints(const C& cc) { i = cc.begin(); @@ -637,19 +672,19 @@ namespace boost typedef typename C::reference reference; typedef typename C::iterator iterator; typedef typename C::pointer pointer; - + BOOST_CONCEPT_USAGE(Mutable_Container) { BOOST_CONCEPT_ASSERT(( Assignable)); - + BOOST_CONCEPT_ASSERT((InputIterator)); - + i = c.begin(); i = c.end(); c.swap(c2); } - + private: iterator i; C c, c2; @@ -665,7 +700,7 @@ namespace boost typename ForwardContainer::const_iterator >)); } - }; + }; BOOST_concept(Mutable_ForwardContainer,(C)) : ForwardContainer @@ -678,7 +713,7 @@ namespace boost typename Mutable_ForwardContainer::iterator >)); } - }; + }; BOOST_concept(ReversibleContainer,(C)) : ForwardContainer @@ -692,9 +727,9 @@ namespace boost BOOST_CONCEPT_ASSERT(( BidirectionalIterator< typename ReversibleContainer::const_iterator>)); - + BOOST_CONCEPT_ASSERT((BidirectionalIterator)); - + const_constraints(c); } private: @@ -711,17 +746,17 @@ namespace boost , ReversibleContainer { typedef typename C::reverse_iterator reverse_iterator; - + BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer) { typedef typename Mutable_ForwardContainer::iterator iterator; BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); - + reverse_iterator i = c.rbegin(); i = c.rend(); } - private: + private: C c; }; @@ -737,7 +772,7 @@ namespace boost RandomAccessIterator< typename RandomAccessContainer::const_iterator >)); - + const_constraints(c); } private: @@ -746,7 +781,7 @@ namespace boost const_reference r = cc[n]; ignore_unused_variable_warning(r); } - + C c; size_type n; }; @@ -762,11 +797,11 @@ namespace boost { BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); - + typename self::reference r = c[i]; ignore_unused_variable_warning(r); } - + private: typename Mutable_ReversibleContainer::size_type i; C c; @@ -782,7 +817,7 @@ namespace boost { BOOST_CONCEPT_USAGE(Sequence) { - S + S c(n), c2(n, t), c3(first, last); @@ -807,7 +842,7 @@ namespace boost typename Sequence::const_reference r = c.front(); ignore_unused_variable_warning(r); } - + typename S::value_type t; typename S::size_type n; typename S::value_type* first, *last; @@ -866,11 +901,11 @@ namespace boost c.erase(r.first, r.second); const_constraints(c); BOOST_CONCEPT_ASSERT((BinaryPredicate)); - + typedef typename AssociativeContainer::value_type value_type_; BOOST_CONCEPT_ASSERT((BinaryPredicate)); } - + // Redundant with the base concept, but it helps below. typedef typename C::const_iterator const_iterator; private: @@ -896,7 +931,7 @@ namespace boost BOOST_CONCEPT_USAGE(UniqueAssociativeContainer) { C c(first, last); - + pos_flag = c.insert(t); c.insert(first, last); @@ -914,7 +949,7 @@ namespace boost BOOST_CONCEPT_USAGE(MultipleAssociativeContainer) { C c(first, last); - + pos = c.insert(t); c.insert(first, last); @@ -957,7 +992,7 @@ namespace boost { BOOST_CONCEPT_USAGE(SortedAssociativeContainer) { - C + C c(kc), c2(first, last), c3(first, last, kc); @@ -965,15 +1000,15 @@ namespace boost p = c.upper_bound(k); p = c.lower_bound(k); r = c.equal_range(k); - + c.insert(p, t); - + ignore_unused_variable_warning(c); ignore_unused_variable_warning(c2); ignore_unused_variable_warning(c3); const_constraints(c); } - + void const_constraints(const C& c) { kc = c.key_comp(); @@ -983,7 +1018,7 @@ namespace boost cp = c.lower_bound(k); cr = c.equal_range(k); } - + private: typename C::key_compare kc; typename C::value_compare vc; From 15afb20c84551613f75f5cf4bfa6519311bb72f9 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Fri, 7 Jan 2011 00:23:47 +0000 Subject: [PATCH 27/32] Applied patch - refs #4918; will merge to release after tests cycle [SVN r67742] --- include/boost/concept_check.hpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp index 8345e0a..01b2f4e 100644 --- a/include/boost/concept_check.hpp +++ b/include/boost/concept_check.hpp @@ -139,20 +139,21 @@ namespace boost { BOOST_CONCEPT_USAGE(Assignable) { #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = a; // require assignment operator + a = b; // require assignment operator #endif - const_constraints(a); + const_constraints(b); } private: - void const_constraints(const TT& b) { + void const_constraints(const TT& x) { #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = b; // const required for argument to assignment + a = x; // const required for argument to assignment #else - ignore_unused_variable_warning(b); + ignore_unused_variable_warning(x); #endif } private: TT a; + TT b; }; @@ -183,22 +184,23 @@ namespace boost BOOST_concept(SGIAssignable,(TT)) { BOOST_CONCEPT_USAGE(SGIAssignable) { - TT b(a); + TT c(a); #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = a; // require assignment operator + a = b; // require assignment operator #endif - const_constraints(a); - ignore_unused_variable_warning(b); + const_constraints(b); + ignore_unused_variable_warning(c); } private: - void const_constraints(const TT& b) { - TT c(b); + void const_constraints(const TT& x) { + TT c(x); #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = b; // const required for argument to assignment + a = x; // const required for argument to assignment #endif ignore_unused_variable_warning(c); } TT a; + TT b; }; #if (defined _MSC_VER) # pragma warning( pop ) From d66a39d4fcb7bf4ca3094f5f518e6b7287a0288d Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 15 Mar 2011 12:54:46 +0000 Subject: [PATCH 28/32] Change to use BOOST_HAS_CONCEPTS since BOOST_NO_CONCEPTS has been removed (it's been dropped from the standard). [SVN r70000] --- include/boost/concept/detail/backward_compatibility.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/concept/detail/backward_compatibility.hpp b/include/boost/concept/detail/backward_compatibility.hpp index 88d5921..66d573e 100644 --- a/include/boost/concept/detail/backward_compatibility.hpp +++ b/include/boost/concept/detail/backward_compatibility.hpp @@ -8,7 +8,7 @@ namespace boost { namespace concepts {} -# if !defined(BOOST_NO_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD) +# if defined(BOOST_HAS_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD) namespace concept = concepts; # endif } // namespace boost::concept From d78b6bae1c269f91218aa4232839560c76bcaa73 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Tue, 29 Mar 2011 15:14:53 +0000 Subject: [PATCH 29/32] Suppress warnings on msvc 10. [SVN r70699] --- include/boost/concept_check.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp index 01b2f4e..19a5d23 100644 --- a/include/boost/concept_check.hpp +++ b/include/boost/concept_check.hpp @@ -562,10 +562,10 @@ namespace boost : ForwardIterator { BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { - *i++ = *i; // require postincrement and assignment + *i++ = *j; // require postincrement and assignment } private: - TT i; + TT i, j; }; BOOST_concept(BidirectionalIterator,(TT)) @@ -591,10 +591,10 @@ namespace boost { BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) { - *i-- = *i; // require postdecrement and assignment + *i-- = *j; // require postdecrement and assignment } private: - TT i; + TT i, j; }; BOOST_concept(RandomAccessIterator,(TT)) From 52adefee9aa33ed4ef7dc0bc3f9f909b10ad8321 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Wed, 6 Apr 2011 22:26:42 +0000 Subject: [PATCH 30/32] Supress msvc warnings. Fixes #5102. [SVN r71053] --- include/boost/concept/detail/msvc.hpp | 9 +++++++++ include/boost/concept_check.hpp | 18 ++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/include/boost/concept/detail/msvc.hpp b/include/boost/concept/detail/msvc.hpp index 9fbd250..078dd22 100644 --- a/include/boost/concept/detail/msvc.hpp +++ b/include/boost/concept/detail/msvc.hpp @@ -6,12 +6,17 @@ # include # include +# include # ifdef BOOST_OLD_CONCEPT_SUPPORT # include # include # endif +# ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable:4100) +# endif namespace boost { namespace concepts { @@ -111,4 +116,8 @@ enum \ # endif }} +# ifdef BOOST_MSVC +# pragma warning(pop) +# endif + #endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp index 19a5d23..97d704b 100644 --- a/include/boost/concept_check.hpp +++ b/include/boost/concept_check.hpp @@ -32,6 +32,12 @@ # include # include +#if (defined _MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4510 ) // default constructor could not be generated +# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required +#endif + namespace boost { @@ -175,11 +181,6 @@ namespace boost TT b; }; -#if (defined _MSC_VER) -# pragma warning( push ) -# pragma warning( disable : 4510 ) // default constructor could not be generated -# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required -#endif // The SGI STL version of Assignable requires copy constructor and operator= BOOST_concept(SGIAssignable,(TT)) { @@ -202,9 +203,6 @@ namespace boost TT a; TT b; }; -#if (defined _MSC_VER) -# pragma warning( pop ) -#endif BOOST_concept(Convertible,(X)(Y)) { @@ -1077,6 +1075,10 @@ namespace boost }; } // namespace boost +#if (defined _MSC_VER) +# pragma warning( pop ) +#endif + # include #endif // BOOST_CONCEPT_CHECKS_HPP From 60b5eb331cce45aab8086ed074950ec08d915cee Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Sun, 18 Dec 2011 21:09:34 +0000 Subject: [PATCH 31/32] Applied fixed version of patch from #6293; fixes #6293 [SVN r76050] --- reference.htm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reference.htm b/reference.htm index 7c113e6..ae8d502 100644 --- a/reference.htm +++ b/reference.htm @@ -366,6 +366,12 @@ template <class Concept> void function_requires(); +

    function_requires() has been deprecated in favor of BOOST_CONCEPT_ASSERT. + This means that function_requires< Concept >(); + becomes BOOST_CONCEPT_ASSERT((Concept)); + (don't forget to #include "boost/concept/assert.hpp"). + +

    
    From 38154ae6cf792cc741bbedca40111c0b5b5d8861 Mon Sep 17 00:00:00 2001
    From: "Jeffrey Lee Hellrung, Jr." 
    Date: Fri, 18 May 2012 02:58:12 +0000
    Subject: [PATCH 32/32] [concept_check] "Shadowed variable warning" (refs
     #6738)
    
    [SVN r78501]
    ---
     include/boost/concept_check.hpp | 10 +++++-----
     1 file changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp
    index 97d704b..9cfd281 100644
    --- a/include/boost/concept_check.hpp
    +++ b/include/boost/concept_check.hpp
    @@ -1050,11 +1050,11 @@ namespace boost
             c.swap(c);
           }
     
    -      void const_constraints(const C& c) {
    -        ci = c.begin();
    -        ci = c.end();
    -        n = c.size();
    -        b = c.empty();
    +      void const_constraints(const C& cc) {
    +        ci = cc.begin();
    +        ci = cc.end();
    +        n = cc.size();
    +        b = cc.empty();
           }
     
         private:
    

    Deprecated Macros