boost_no_bcb_partial_spec.ipp 955 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // (C) Copyright Terje Slettebo 2002.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // MACRO: BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
  6. // TITLE: Full partial specialization support.
  7. // DESCRIPTION: Borland C++ Builder has some rather specific partial
  8. // specialisation bugs which this code tests for.
  9. #include <vector>
  10. namespace boost_bcb_partial_specialization_bug{
  11. template<class T1,class T2>
  12. class Test
  13. {
  14. };
  15. template<class T1,class T2>
  16. class Test<std::vector<T1>,T2>
  17. {
  18. };
  19. template<class T>
  20. class Test<std::vector<int>,T>
  21. {
  22. };
  23. template <class T>
  24. struct is_const{};
  25. template <class T>
  26. struct is_const<T const>{};
  27. int test()
  28. {
  29. Test<std::vector<int>,double> v;
  30. is_const<const int> ci;
  31. (void)v; // warning suppression
  32. (void)ci;
  33. return 0;
  34. }
  35. }