var_error.cpp 439 B

123456789101112131415161718
  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. //[var_error
  8. #define VAR(type, n) type var ## n
  9. VAR(int, 1); // OK.
  10. VAR(std::map<int, char>, 2); // Error.
  11. //]
  12. int main() { return 0; }