perfect_fwd.hpp 967 B

12345678910111213141516171819202122232425262728
  1. /* Copyright 2006-2008 Joaquin M Lopez Munoz.
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * http://www.boost.org/LICENSE_1_0.txt)
  5. *
  6. * See http://www.boost.org/libs/flyweight for library home page.
  7. */
  8. /* Brute force implementation of perfect forwarding overloads.
  9. * Usage: include after having defined the argument macros:
  10. * BOOST_FLYWEIGHT_PERFECT_FWD_NAME
  11. * BOOST_FLYWEIGHT_PERFECT_FWD_BODY
  12. */
  13. /* This user_definable macro limits the maximum number of arguments to
  14. * be perfect forwarded. Beware combinatorial explosion: manual perfect
  15. * forwarding for n arguments produces 2^n distinct overloads.
  16. */
  17. #if !defined(BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS)
  18. #define BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS 5
  19. #endif
  20. #if BOOST_FLYWEIGHT_LIMIT_PERFECT_FWD_ARGS<=5
  21. #include <boost/flyweight/detail/pp_perfect_fwd.hpp>
  22. #else
  23. #include <boost/flyweight/detail/dyn_perfect_fwd.hpp>
  24. #endif