regression_const_real_policies.cpp 677 B

12345678910111213141516171819202122232425
  1. // Copyright (c) 2001-2011 Hartmut Kaiser
  2. // Copyright (c) 2011 Jeroen Habraken
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. // compile test verifying it's possible to use const types for real_policies.
  7. #include <boost/spirit/include/karma.hpp>
  8. #include <iterator>
  9. #include <string>
  10. int main()
  11. {
  12. using namespace boost::spirit::karma;
  13. typedef real_generator<double const, real_policies<double const> >
  14. double_const_type;
  15. std::string generated;
  16. generate(std::back_inserter(generated), double_const_type(), 1.0);
  17. return 0;
  18. }