boost_no_two_phase_lookup.ipp 793 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // (C) Copyright Alisdair Meredith 2006.
  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 most recent version.
  6. // MACRO: BOOST_NO_TWO_PHASE_NAME_LOOKUP
  7. // TITLE: Two phase name lookup
  8. // DESCRIPTION: If the compiler does not perform two phase name lookup
  9. namespace boost_no_two_phase_name_lookup {
  10. template< class T >
  11. struct base {
  12. int call() {
  13. return 1;
  14. }
  15. };
  16. int call() {
  17. return 0;
  18. }
  19. template< class T >
  20. struct derived : base< T > {
  21. int call_test() {
  22. return call();
  23. }
  24. };
  25. int test()
  26. {
  27. derived< int > d;
  28. return d.call_test();
  29. }
  30. }