var.cpp 562 B

1234567891011121314151617181920212223242526
  1. // Copyright (C) 2009-2012 Lorenzo Caminiti
  2. // Distributed under the Boost Software License, Version 1.0
  3. // (see accompanying file LICENSE_1_0.txt or a copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // Home at http://www.boost.org/libs/utility/identity_type
  6. #include <map>
  7. #define VAR(type, n) type var ## n
  8. VAR(int, 1); // OK.
  9. //[var_typedef
  10. typedef std::map<int, char> map_type;
  11. VAR(map_type, 3); // OK.
  12. //]
  13. //[var_ok
  14. #include <boost/utility/identity_type.hpp>
  15. VAR(BOOST_IDENTITY_TYPE((std::map<int, char>)), 4); // OK.
  16. //]
  17. int main() { return 0; }