value_pack.hpp 928 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ///////////////////////////////////////////////////////////////
  2. // Copyright 2013 John Maddock. Distributed under the Boost
  3. // Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
  5. #ifndef BOOST_MP_CPP_INT_VP_HPP
  6. #define BOOST_MP_CPP_INT_VP_HPP
  7. namespace boost {
  8. namespace multiprecision {
  9. namespace literals { namespace detail {
  10. template <limb_type... VALUES>
  11. struct value_pack
  12. {
  13. constexpr value_pack() {}
  14. typedef value_pack<0, VALUES...> next_type;
  15. };
  16. template <class T>
  17. struct is_value_pack
  18. {
  19. static constexpr bool value = false;
  20. };
  21. template <limb_type... VALUES>
  22. struct is_value_pack<value_pack<VALUES...> >
  23. {
  24. static constexpr bool value = true;
  25. };
  26. struct negate_tag
  27. {};
  28. constexpr negate_tag make_negate_tag()
  29. {
  30. return negate_tag();
  31. }
  32. }}}} // namespace boost::multiprecision::literals::detail
  33. #endif // BOOST_MP_CPP_INT_CORE_HPP