main.cpp 756 B

12345678910111213141516171819202122232425262728293031
  1. // (C) Copyright John Maddock 2003.
  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. // See http://www.boost.org/libs/config for the most recent version.
  6. //
  7. // before we do anything else, we need to mess with the compilers ABI:
  8. //
  9. #include <boost/config.hpp>
  10. #ifdef BOOST_MSVC
  11. #pragma pack(1)
  12. #elif defined(__BORLANDC__)
  13. #pragma option -Ve- -Vx- -a1 -b-
  14. #endif
  15. #include <stdio.h>
  16. #include "abi_test.hpp"
  17. int main()
  18. {
  19. abi_test t;
  20. if((t.inline_one() != t.virtual_one()) || (t.inline_two() != t.virtual_two()))
  21. {
  22. fwrite("Failed ABI test", 1, 15, stdout);
  23. return -1;
  24. }
  25. return 0;
  26. }