You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

688 lines
18 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: stlsoft/algorithms/std/alt.hpp
  3. *
  4. * Purpose: Standard-equivalent algorithms for use with implementations that
  5. * do or do not have a standard library.
  6. *
  7. * Created: 17th January 2002
  8. * Updated: 15th July 2010
  9. *
  10. * Home: http://stlsoft.org/
  11. *
  12. * Copyright (c) 2005-2010, Matthew Wilson and Synesis Software
  13. * All rights reserved.
  14. *
  15. * Redistribution and use in source and binary forms, with or without
  16. * modification, are permitted provided that the following conditions are met:
  17. *
  18. * - Redistributions of source code must retain the above copyright notice, this
  19. * list of conditions and the following disclaimer.
  20. * - Redistributions in binary form must reproduce the above copyright notice,
  21. * this list of conditions and the following disclaimer in the documentation
  22. * and/or other materials provided with the distribution.
  23. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
  24. * any contributors may be used to endorse or promote products derived from
  25. * this software without specific prior written permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  28. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  29. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  30. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  31. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  32. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  33. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  34. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  35. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  36. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  37. * POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. * ////////////////////////////////////////////////////////////////////// */
  40. /** \file stlsoft/algorithms/std/alt.hpp
  41. *
  42. * \brief [C++ only] Contains various standard functions, or their
  43. * equivalents
  44. * (\ref group__library__algorithms "Algorithms" Library).
  45. */
  46. #ifndef STLSOFT_INCL_STLSOFT_ALGORITHMS_STD_HPP_ALT
  47. #define STLSOFT_INCL_STLSOFT_ALGORITHMS_STD_HPP_ALT
  48. // For backwards compatibility, we define this here to disable stlsoft/util/std/algorithm.hpp
  49. #define STLSOFT_INCL_STLSOFT_UTIL_STD_HPP_ALGORITHM
  50. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  51. # define STLSOFT_VER_STLSOFT_ALGORITHMS_STD_HPP_ALT_MAJOR 3
  52. # define STLSOFT_VER_STLSOFT_ALGORITHMS_STD_HPP_ALT_MINOR 4
  53. # define STLSOFT_VER_STLSOFT_ALGORITHMS_STD_HPP_ALT_REVISION 4
  54. # define STLSOFT_VER_STLSOFT_ALGORITHMS_STD_HPP_ALT_EDIT 77
  55. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  56. /* /////////////////////////////////////////////////////////////////////////
  57. * Auto-generation and compatibility
  58. */
  59. /*
  60. [<[STLSOFT-AUTO:NO-UNITTEST]>]
  61. */
  62. /* /////////////////////////////////////////////////////////////////////////
  63. * Includes
  64. */
  65. #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
  66. # include <stlsoft/stlsoft.h>
  67. #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
  68. #if defined(STLSOFT_CF_std_NAMESPACE)
  69. # include <algorithm>
  70. #endif /* STLSOFT_CF_std_NAMESPACE */
  71. #if !defined(STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT)
  72. # ifndef STLSOFT_INCL_STLSOFT_META_HPP_YESNO
  73. # include <stlsoft/meta/yesno.hpp> // yes_type, no_type
  74. # endif /* !STLSOFT_INCL_STLSOFT_META_HPP_YESNO */
  75. #endif /* STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT */
  76. #ifndef STLSOFT_INCL_STLSOFT_INTERNAL_H_SAFESTR
  77. # include <stlsoft/internal/safestr.h>
  78. #endif /* !STLSOFT_INCL_STLSOFT_INTERNAL_H_SAFESTR */
  79. /* /////////////////////////////////////////////////////////////////////////
  80. * Namespace
  81. */
  82. #ifndef _STLSOFT_NO_NAMESPACE
  83. namespace stlsoft
  84. {
  85. #endif /* _STLSOFT_NO_NAMESPACE */
  86. /* /////////////////////////////////////////////////////////////////////////
  87. * Helper functions
  88. */
  89. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  90. # ifdef STLSOFT_CF_NAMESPACE_SUPPORT
  91. namespace std_alt_algorithms_util_
  92. {
  93. # endif /* STLSOFT_CF_NAMESPACE_SUPPORT */
  94. template<ss_typename_param_k I>
  95. void std_advance_impl( I &i
  96. , ss_ptrdiff_t n
  97. # if !defined(STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT)
  98. , no_type
  99. # endif /* !STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT */
  100. )
  101. {
  102. if(n < 0)
  103. {
  104. for(; 0 != n; --i, ++n)
  105. {}
  106. }
  107. else
  108. {
  109. for(; 0 != n; ++i, --n)
  110. {}
  111. }
  112. }
  113. template<ss_typename_param_k I>
  114. void std_advance_impl( I *&i
  115. , ss_ptrdiff_t n
  116. # if !defined(STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT)
  117. , yes_type
  118. # endif /* !STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT */
  119. )
  120. {
  121. i += n;
  122. }
  123. # if !defined(STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT)
  124. template< ss_typename_param_k T1
  125. , ss_typename_param_k T2
  126. >
  127. no_type is_ptr_(T1 const&, T2 const*) { return no_type(); }
  128. template<ss_typename_param_k T>
  129. yes_type is_ptr_(T const*, T const**) { return yes_type(); }
  130. # endif /* !STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT */
  131. # ifdef STLSOFT_CF_NAMESPACE_SUPPORT
  132. } // namespace std_alt_algorithms_util_
  133. # endif /* STLSOFT_CF_NAMESPACE_SUPPORT */
  134. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  135. /* /////////////////////////////////////////////////////////////////////////
  136. * Functions
  137. */
  138. /** \brief Equivalent to std::advance()
  139. *
  140. * \ingroup group__library__algorithms
  141. */
  142. template<ss_typename_param_k I>
  143. // [[synesis:function:algorithm: std_advance(T<I> &i, ss_ptrdiff_t n)]]
  144. void std_advance(I &i, ss_ptrdiff_t n)
  145. {
  146. #ifdef STLSOFT_CF_std_NAMESPACE
  147. stlsoft_ns_qual_std(advance)(i, n);
  148. #else /* ? STLSOFT_CF_std_NAMESPACE */
  149. # ifdef STLSOFT_CF_NAMESPACE_SUPPORT
  150. using std_alt_algorithms_util_::std_advance_impl;
  151. # if !defined(STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT)
  152. using std_alt_algorithms_util_::is_ptr_;
  153. # endif /* !STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT */
  154. # endif /* STLSOFT_CF_NAMESPACE_SUPPORT */
  155. # if defined(STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT)
  156. std_advance_impl(i, n);
  157. # else /* ? STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT */
  158. std_advance_impl(i, n, is_ptr_(i, &i));
  159. # endif /* STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT */
  160. #endif /* STLSOFT_CF_std_NAMESPACE */
  161. }
  162. /** \brief Equivalent to std::copy()
  163. *
  164. * \ingroup group__library__algorithms
  165. */
  166. template< ss_typename_param_k I
  167. , ss_typename_param_k O
  168. >
  169. // [[synesis:function:algorithm: std_copy(T<I> first, T<I> last, T<O> dest)]]
  170. inline O std_copy(I first, I last, O dest)
  171. {
  172. #if defined(STLSOFT_CF_std_NAMESPACE) && \
  173. !defined(STLSOFT_USING_SAFE_STR_FUNCTIONS)
  174. return stlsoft_ns_qual_std(copy)(first, last, dest);
  175. #else /* ? STLSOFT_CF_std_NAMESPACE */
  176. for(; first != last; ++first, ++dest)
  177. {
  178. *dest = *first;
  179. }
  180. return dest;
  181. #endif /* STLSOFT_CF_std_NAMESPACE */
  182. }
  183. /** \brief Equivalent to std::count_if()
  184. *
  185. * \ingroup group__library__algorithms
  186. */
  187. template< ss_typename_param_k I
  188. , ss_typename_param_k UP
  189. >
  190. // [[synesis:function:algorithm: std_count_if(T<I> first, T<I> last, T<UP> pred)]]
  191. inline ss_size_t std_count_if(I first, I last, UP pred)
  192. {
  193. #ifdef STLSOFT_CF_std_NAMESPACE
  194. return stlsoft_ns_qual_std(count_if)(first, last, pred);
  195. #else /* ? STLSOFT_CF_std_NAMESPACE */
  196. ss_size_t r;
  197. for (r = 0; first != last; ++first)
  198. {
  199. if(pred(*first))
  200. {
  201. ++r;
  202. }
  203. }
  204. return r;
  205. #endif /* STLSOFT_CF_std_NAMESPACE */
  206. }
  207. /** \brief Equivalent to std::fill()
  208. *
  209. * \ingroup group__library__algorithms
  210. */
  211. template< ss_typename_param_k O
  212. , ss_typename_param_k V
  213. >
  214. // [[synesis:function:algorithm: std_fill(T<O> first, T<O> last, T<V> const& value)]]
  215. inline void std_fill(O first, O last, V const& value)
  216. {
  217. #ifdef STLSOFT_CF_std_NAMESPACE
  218. stlsoft_ns_qual_std(fill)(first, last, value);
  219. #else /* ? STLSOFT_CF_std_NAMESPACE */
  220. for(; first != last; ++first)
  221. {
  222. *first = value;
  223. }
  224. #endif /* STLSOFT_CF_std_NAMESPACE */
  225. }
  226. /** \brief Equivalent to std::fill_n()
  227. *
  228. * \ingroup group__library__algorithms
  229. */
  230. template< ss_typename_param_k O
  231. , ss_typename_param_k V
  232. >
  233. // [[synesis:function:algorithm: std_fill_n(T<O> dest, ss_size_t n, T<V> const& value)]]
  234. inline void std_fill_n(O dest, ss_size_t n, V const& value)
  235. {
  236. #if defined(STLSOFT_CF_std_NAMESPACE) && \
  237. !defined(STLSOFT_USING_SAFE_STR_FUNCTIONS)
  238. stlsoft_ns_qual_std(fill_n)(dest, n, value);
  239. #else /* ? STLSOFT_CF_std_NAMESPACE */
  240. for(; 0 != n; ++dest, --n)
  241. {
  242. *dest = value;
  243. }
  244. #endif /* STLSOFT_CF_std_NAMESPACE */
  245. }
  246. /** \brief Equivalent to std::find()
  247. *
  248. * \ingroup group__library__algorithms
  249. */
  250. template< ss_typename_param_k I
  251. , ss_typename_param_k V
  252. >
  253. // [[synesis:function:algorithm: std_find(T<I> first, T<I> last, T<V> const& value)]]
  254. inline I std_find(I first, I last, V const& value)
  255. {
  256. #ifdef STLSOFT_CF_std_NAMESPACE
  257. return stlsoft_ns_qual_std(find)(first, last, value);
  258. #else /* ? STLSOFT_CF_std_NAMESPACE */
  259. for(; first != last; ++first)
  260. {
  261. if(value == *first)
  262. {
  263. break;
  264. }
  265. }
  266. return first;
  267. #endif /* STLSOFT_CF_std_NAMESPACE */
  268. }
  269. /** \brief Equivalent to std::find_if()
  270. *
  271. * \ingroup group__library__algorithms
  272. */
  273. template< ss_typename_param_k I
  274. , ss_typename_param_k UP
  275. >
  276. // [[synesis:function:algorithm: std_find_if(T<I> first, T<I> last, T<UP> pred)]]
  277. inline I std_find_if(I first, I last, UP pred)
  278. {
  279. #ifdef STLSOFT_CF_std_NAMESPACE
  280. return stlsoft_ns_qual_std(find_if)(first, last, pred);
  281. #else /* ? STLSOFT_CF_std_NAMESPACE */
  282. for(; first != last; ++first)
  283. {
  284. if(pred(*first))
  285. {
  286. break;
  287. }
  288. }
  289. return first;
  290. #endif /* STLSOFT_CF_std_NAMESPACE */
  291. }
  292. /** \brief Equivalent to std::for_each()
  293. *
  294. * \ingroup group__library__algorithms
  295. */
  296. template< ss_typename_param_k I
  297. , ss_typename_param_k UF
  298. >
  299. // [[synesis:function:algorithm: std_for_each(T<I> first, T<I> last, T<UF> func)]]
  300. inline UF std_for_each(I first, I last, UF func)
  301. {
  302. #ifdef STLSOFT_CF_std_NAMESPACE
  303. return stlsoft_ns_qual_std(for_each)(first, last, func);
  304. #else /* ? STLSOFT_CF_std_NAMESPACE */
  305. for(; first != last; ++first)
  306. {
  307. func(*first);
  308. }
  309. return func;
  310. #endif /* STLSOFT_CF_std_NAMESPACE */
  311. }
  312. /** \brief Equivalent to std::replace()
  313. *
  314. * \ingroup group__library__algorithms
  315. */
  316. template< ss_typename_param_k I
  317. , ss_typename_param_k T
  318. >
  319. // [[synesis:function:algorithm: std_replace(T<I> first, T<I> last, T<V> const& valFind, T<V> const& valReplace)]]
  320. inline void std_replace(I first, I last, T const& valFind, T const& valReplace)
  321. {
  322. for(; first != last; ++first)
  323. {
  324. if(valFind == *first)
  325. {
  326. *first = valReplace;
  327. }
  328. }
  329. }
  330. #ifdef STLSOFT_CF_std_NAMESPACE
  331. /** \brief Equivalent to std::sort()
  332. *
  333. * \ingroup group__library__algorithms
  334. */
  335. template <ss_typename_param_k RI>
  336. // [[synesis:function:algorithm: std_sort(T<RI> first, T<RI> last)]]
  337. inline void sort(RI first, RI last)
  338. {
  339. stlsoft_ns_qual_std(sort)(first, last);
  340. }
  341. /** \brief Equivalent to std::sort()
  342. *
  343. * \ingroup group__library__algorithms
  344. */
  345. template< ss_typename_param_k RI
  346. , ss_typename_param_k BP
  347. >
  348. // [[synesis:function:algorithm: std_sort(T<RI> first, T<RI> last, T<BP> pred)]]
  349. inline void std_sort(RI first, RI last, BP pred)
  350. {
  351. stlsoft_ns_qual_std(sort)(first, last, pred);
  352. }
  353. #else /* ? STLSOFT_CF_std_NAMESPACE */
  354. // Nothing current defined
  355. template <ss_typename_param_k RI>
  356. inline void sort(RI first, RI last);
  357. // Nothing current defined
  358. template< ss_typename_param_k RI
  359. , ss_typename_param_k BP
  360. >
  361. inline void std_sort(RI first, RI last, BP pred);
  362. #endif /* STLSOFT_CF_std_NAMESPACE */
  363. /** \brief Equivalent to std::transform()
  364. *
  365. * \ingroup group__library__algorithms
  366. */
  367. template< ss_typename_param_k I
  368. , ss_typename_param_k O
  369. , ss_typename_param_k UF
  370. >
  371. // [[synesis:function:algorithm: std_transform(T<I> first, T<I> last, T<O> dest, T<UF> func)]]
  372. inline O std_transform(I first, I last, O dest, UF func)
  373. {
  374. #if defined(STLSOFT_CF_std_NAMESPACE) && \
  375. !defined(STLSOFT_USING_SAFE_STR_FUNCTIONS)
  376. return stlsoft_ns_qual_std(transform)(first, last, dest, func);
  377. #else /* ? STLSOFT_CF_std_NAMESPACE */
  378. for(; first != last; ++first, ++dest)
  379. {
  380. *dest = func(*first);
  381. }
  382. return dest;
  383. #endif /* STLSOFT_CF_std_NAMESPACE */
  384. }
  385. /** \brief Equivalent to std::unique()
  386. *
  387. * \ingroup group__library__algorithms
  388. */
  389. template< ss_typename_param_k FI
  390. , ss_typename_param_k BP
  391. >
  392. // [[synesis:function:algorithm: std_unique(T<FI> first, T<FI> last, T<BP> pred)]]
  393. inline FI std_unique(FI first, FI last, BP pred)
  394. {
  395. #ifdef STLSOFT_ENFORCE_ORDERING
  396. stlsoft_assert("range passed to unique() is not strict-weak ordered", is_strict_weak_ordered(first, last, pred));
  397. #endif /* STLSOFT_ENFORCE_ORDERING */
  398. #ifdef STLSOFT_CF_std_NAMESPACE
  399. return stlsoft_ns_qual_std(unique)(first, last, pred);
  400. #else /* ? STLSOFT_CF_std_NAMESPACE */
  401. if(first != last)
  402. {
  403. # ifdef _DEBUG
  404. const FI start = first;
  405. # endif /* _DEBUG */
  406. FI curr = first; // The first elements is always unique
  407. for(++first; first != last; ++first)
  408. {
  409. if(pred(*first, *curr))
  410. {
  411. ; // Same, so skip it
  412. }
  413. else
  414. {
  415. ++curr;
  416. if(first != curr)
  417. {
  418. *curr = *first;
  419. }
  420. }
  421. }
  422. first = ++curr;
  423. }
  424. return first;
  425. #endif /* STLSOFT_CF_std_NAMESPACE */
  426. }
  427. /** \brief Equivalent to std::unique()
  428. *
  429. * \ingroup group__library__algorithms
  430. */
  431. template <ss_typename_param_k FI>
  432. // [[synesis:function:algorithm: std_unique(T<FI> first, T<FI> last)]]
  433. inline FI std_unique(FI first, FI last)
  434. {
  435. #ifdef STLSOFT_ENFORCE_ORDERING
  436. stlsoft_assert("range passed to unique() is not strict-weak ordered", is_strict_weak_ordered(first, last));
  437. #endif /* STLSOFT_ENFORCE_ORDERING */
  438. #ifdef STLSOFT_CF_std_NAMESPACE
  439. return stlsoft_ns_qual_std(unique)(first, last);
  440. #else /* ? STLSOFT_CF_std_NAMESPACE */
  441. if(first != last)
  442. {
  443. # ifdef _DEBUG
  444. const FI start = first;
  445. # endif /* _DEBUG */
  446. FI curr = first; // The first elements is always unique
  447. for(++first; first != last; ++first)
  448. {
  449. if(*first == *curr)
  450. {
  451. ; // Same, so skip it
  452. }
  453. else
  454. {
  455. ++curr;
  456. if(first != curr)
  457. {
  458. *curr = *first;
  459. }
  460. }
  461. }
  462. first = ++curr;
  463. }
  464. return first;
  465. #endif /* STLSOFT_CF_std_NAMESPACE */
  466. }
  467. /** \brief Equivalent to std::unique_copy()
  468. *
  469. * \ingroup group__library__algorithms
  470. */
  471. template< ss_typename_param_k FI
  472. , ss_typename_param_k OI
  473. >
  474. // [[synesis:function:algorithm: std_unique_copy(T<FI> first, T<FI> last, T<OI> dest)]]
  475. inline OI std_unique_copy(FI first, FI last, OI dest)
  476. {
  477. #ifdef STLSOFT_ENFORCE_ORDERING
  478. stlsoft_assert("range passed to unique_copy() is not strict-weak ordered", is_strict_weak_ordered(first, last));
  479. #endif /* STLSOFT_ENFORCE_ORDERING */
  480. #ifdef STLSOFT_CF_std_NAMESPACE
  481. return stlsoft_ns_qual_std(unique_copy)(first, last, dest);
  482. #else /* ? STLSOFT_CF_std_NAMESPACE */
  483. if(first != last)
  484. {
  485. # ifdef _DEBUG
  486. const FI start = first;
  487. # endif /* _DEBUG */
  488. FI curr = first; // The first elements is always unique
  489. *dest++ = *first++;
  490. for(; first != last; ++first)
  491. {
  492. if(*first == *curr)
  493. {
  494. ; // Same, so skip it
  495. }
  496. else
  497. {
  498. curr = first;
  499. *dest++ = *first;
  500. }
  501. }
  502. first = ++curr;
  503. }
  504. return dest;
  505. #endif /* STLSOFT_CF_std_NAMESPACE */
  506. }
  507. /** \brief Equivalent to std::unique_copy()
  508. *
  509. * \ingroup group__library__algorithms
  510. */
  511. template< ss_typename_param_k FI
  512. , ss_typename_param_k OI
  513. , ss_typename_param_k BP
  514. >
  515. // [[synesis:function:algorithm: std_unique_copy(T<FI> first, T<FI> last, T<OI> dest, T<BP> pred)]]
  516. inline OI std_unique_copy(FI first, FI last, OI dest, BP pred)
  517. {
  518. #ifdef STLSOFT_ENFORCE_ORDERING
  519. stlsoft_assert("range passed to unique_copy() is not strict-weak ordered", is_strict_weak_ordered(first, last, pred));
  520. #endif /* STLSOFT_ENFORCE_ORDERING */
  521. #ifdef STLSOFT_CF_std_NAMESPACE
  522. return stlsoft_ns_qual_std(unique_copy)(first, last, dest, pred);
  523. #else /* ? STLSOFT_CF_std_NAMESPACE */
  524. if(first != last)
  525. {
  526. # ifdef _DEBUG
  527. const FI start = first;
  528. # endif /* _DEBUG */
  529. FI curr = first; // The first elements is always unique
  530. *dest++ = *first++;
  531. for(; first != last; ++first)
  532. {
  533. if(pred(*first, *curr))
  534. {
  535. ; // Same, so skip it
  536. }
  537. else
  538. {
  539. curr = first;
  540. *dest++ = *first;
  541. }
  542. }
  543. first = ++curr;
  544. }
  545. return dest;
  546. #endif /* STLSOFT_CF_std_NAMESPACE */
  547. }
  548. ////////////////////////////////////////////////////////////////////////////
  549. /// @} // end of group algorithms_std_alt
  550. ////////////////////////////////////////////////////////////////////////////
  551. // Unit-testing
  552. #ifdef STLSOFT_UNITTEST
  553. # include "./unittest/alt_unittest_.h"
  554. #endif /* STLSOFT_UNITTEST */
  555. /* ////////////////////////////////////////////////////////////////////// */
  556. #ifndef _STLSOFT_NO_NAMESPACE
  557. } // namespace stlsoft
  558. #endif /* _STLSOFT_NO_NAMESPACE */
  559. /* ////////////////////////////////////////////////////////////////////// */
  560. #endif /* !STLSOFT_INCL_STLSOFT_ALGORITHMS_STD_HPP_ALT */
  561. /* ///////////////////////////// end of file //////////////////////////// */