boost_has_macro_use_facet.ipp 836 B

1234567891011121314151617181920212223242526272829303132333435
  1. // (C) Copyright John Maddock 2001.
  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_HAS_MACRO_USE_FACET
  7. // TITLE: macro version of use_facet: _USE
  8. // DESCRIPTION: The standard library lacks a conforming std::use_facet,
  9. // but has a macro _USE(loc, Type) that does the job.
  10. // This is primarily for the Dinkumware std lib.
  11. #include <locale>
  12. #ifndef _USE
  13. #error "macro _USE not defined"
  14. #endif
  15. namespace boost_has_macro_use_facet{
  16. int test()
  17. {
  18. std::locale l;
  19. const std::ctype<char>& ct = std::_USE(l, std::ctype<char>);
  20. return 0;
  21. }
  22. }