Просмотр исходного кода

remove std_min and std_max, update minmax coding guidelines

[SVN r23162]
Eric Niebler 22 лет назад
Родитель
Сommit
707bca5ee5
15 измененных файлов с 28 добавлено и 21 удалено
  1. 1 1
      libs/algorithm
  2. 1 1
      libs/concept_check
  3. 1 1
      libs/format
  4. 1 1
      libs/graph
  5. 1 1
      libs/lambda
  6. 1 1
      libs/numeric/interval
  7. 1 1
      libs/numeric/ublas
  8. 1 1
      libs/pool
  9. 1 1
      libs/python
  10. 1 1
      libs/random
  11. 1 1
      libs/regex
  12. 1 1
      libs/spirit
  13. 1 1
      libs/test
  14. 1 1
      libs/variant
  15. 14 7
      more/lib_guide.htm

+ 1 - 1
libs/algorithm

@@ -1 +1 @@
-Subproject commit 77303abc557517a68da95b0982c21f0a77782f72
+Subproject commit 752c65be3520358bdbb6e5aee0d473086678586e

+ 1 - 1
libs/concept_check

@@ -1 +1 @@
-Subproject commit 1b8f363e9004a6cd111e04a48eaefcf06da03210
+Subproject commit 9678d4a3f2c2a7b8ae95c268799206fec306ac3d

+ 1 - 1
libs/format

@@ -1 +1 @@
-Subproject commit d09013ce9c1de1e291e6e5549e375773556305e3
+Subproject commit 806a448be7119765258ebc7bfb453abd73fb5688

+ 1 - 1
libs/graph

@@ -1 +1 @@
-Subproject commit cf24fa4ca0bd042fa007d9b173d3746b82feb3de
+Subproject commit e3dd9042b175a15bdb325cc54486a1b08db7feba

+ 1 - 1
libs/lambda

@@ -1 +1 @@
-Subproject commit b99048eab3122c8f79fb904e70cff8e44d313874
+Subproject commit a80b8a59a0f2dbaf6071057f8419b9f6bd83dd9b

+ 1 - 1
libs/numeric/interval

@@ -1 +1 @@
-Subproject commit 32f6f4501863d9e69d10062929633c5acb668f58
+Subproject commit 175901733e98cd16bf475d341c295a8843192f2a

+ 1 - 1
libs/numeric/ublas

@@ -1 +1 @@
-Subproject commit f439cd2ca599151be5fc1c0a85fd3f6c2c2f4c65
+Subproject commit 6085f9282b060659e0af93666e0edcddf24e1659

+ 1 - 1
libs/pool

@@ -1 +1 @@
-Subproject commit 4751c81a59270afb27f593109c156d064f22cb91
+Subproject commit c6efcd2b9042e17491d5d95545b3c0cb5d1c936a

+ 1 - 1
libs/python

@@ -1 +1 @@
-Subproject commit c6587596b1ac3573e01e176809efe89a20bae59a
+Subproject commit 9d7097177de2c2d9759293f7f75b3582bda3fa22

+ 1 - 1
libs/random

@@ -1 +1 @@
-Subproject commit 3ab77175bc3f92b2d3fd597590483147e7889623
+Subproject commit 2f7b6e8f3d67d75333c74c44c41478840c98d557

+ 1 - 1
libs/regex

@@ -1 +1 @@
-Subproject commit d310bc983507397586306e44253d9fd81c38bb55
+Subproject commit 8d994b14b28fc7ee2e9197456ca5315ef421838d

+ 1 - 1
libs/spirit

@@ -1 +1 @@
-Subproject commit aafd151e5039e5c9d2e3f95072fa0b44099f9c73
+Subproject commit 175054f518330f9195d0ebe0620ddd495720dbe6

+ 1 - 1
libs/test

@@ -1 +1 @@
-Subproject commit e63b92bf0f5ccf7e65a3ab84f9a47abebde7fb51
+Subproject commit ecda2f0b9d2dca53fb61be084b2db73a9838ffeb

+ 1 - 1
libs/variant

@@ -1 +1 @@
-Subproject commit 5bb8bbcd3229d25613974b7bf19722b700e16179
+Subproject commit ab5613293fcbf6ae3800f254d3f2d170ffd2b7fb

+ 14 - 7
more/lib_guide.htm

@@ -305,12 +305,19 @@
                   If you want to call <code>std::min()</code> or <code>std::max()</code>:<br>&nbsp;
                   <ul>
                      <li>
-                        Use <code>(std::min)(a,b)</code> if you do not require argument-dependent
-                        look-up.</li>&nbsp;
+                        If you do not require argument-dependent look-up, use <code>(std::min)(a,b)</code>.
+                     </li>&nbsp;
                      <li>
-                        Use <code>boost::std_min(a,b)</code> if you do require argument-dependent look-up.
-                        <code>boost::std_min()</code> delegates to <code>std::min()</code>.</li>&nbsp;
-                  </ul>
+                        If you do require argument-dependent look-up, you should:<br>&nbsp;
+                        <ul>
+                           <li><code>#include &lt;boost/minmax.hpp&gt;</code></li>&nbsp;
+                           <li>Use <code>BOOST_USING_STD_MIN();</code> to bring <code>std::min()</code> into
+                               the current scope.</li>&nbsp;
+                           <li>Use <code>min BOOST_PREVENT_MACRO_SUBSTITUTION (a,b);</code> to make an
+                               argument-dependent call to <code>min(a,b)</code>.</li>&nbsp;
+                        </ul>
+                     </li>
+                  </ul>&nbsp;
                </li>
                <li>
                   If you want to call <code>std::numeric_limits&lt;int&gt;::max()</code>, use
@@ -324,7 +331,7 @@
                   If you want to declare or define a function or a member function named <code>min</code>
                   or <code>max</code>, then you must use the <code>BOOST_PREVENT_MACRO_SUBSTITUTION</code>
                   macro. Instead of writing <code>int min() { return 0; }</code> you should write
-                  <code>int min BOOST_PREVENT_MACRO_SUBSTITUTION () { return 0; }</code>This is true
+                  <code>int min BOOST_PREVENT_MACRO_SUBSTITUTION () { return 0; }</code> This is true
                   regardless if the function is a free (namespace scope) function, a member function or a
                   static member function, and it applies for the function declaration as well as the
                   function definition.<br>&nbsp;
@@ -369,7 +376,7 @@
                <td>If any build files.</td>
             </tr>
             <tr>
-               <td>doc</td>
+               <td><code>doc</code></td>
                <td>Documentation (HTML) files.</td>
                <td>If several doc files.</td>
             </tr>

粤ICP备19079148号