misc.cpp 830 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // misc.cpp
  2. //
  3. // (C) Copyright Eric Niebler 2008.
  4. // Use, modification and distribution are subject to the
  5. // Boost Software License, Version 1.0. (See accompanying file
  6. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. /*
  8. Revision history:
  9. 4 March 2008 : Initial version.
  10. */
  11. #include <vector>
  12. #include <boost/test/minimal.hpp>
  13. #include <boost/foreach.hpp>
  14. struct xxx : std::vector<int>
  15. {
  16. virtual ~xxx() = 0;
  17. };
  18. void test_abstract(xxx& rng)
  19. {
  20. BOOST_FOREACH (int x, rng)
  21. {
  22. (void)x;
  23. }
  24. }
  25. struct yyy : std::vector<int>
  26. {
  27. void test()
  28. {
  29. BOOST_FOREACH(int x, *this)
  30. {
  31. (void)x;
  32. }
  33. }
  34. };
  35. ///////////////////////////////////////////////////////////////////////////////
  36. // test_main
  37. //
  38. int test_main( int, char*[] )
  39. {
  40. return 0;
  41. }