[/
  Copyright 2011 - 2020 John Maddock.
  Copyright 2013 - 2019 Paul A. Bristow.
  Copyright 2013 Christopher Kormanyos.

  Distributed under the Boost Software License, Version 1.0.
  (See accompanying file LICENSE_1_0.txt or copy at
  http://www.boost.org/LICENSE_1_0.txt).
]

[section:debug_adaptor debug_adaptor]

`#include <boost/multiprecision/debug_adaptor.hpp>`

   namespace boost{ namespace multiprecision{

   template <Backend>
   class debug_adaptor;

   template <class Number>
   using debug_adaptor_t = number<debug_adaptor<typename Number::backend_type>, Number::et>

   }} // namespaces

The `debug_adaptor` type is used in conjunction with `number` and some other backend type: it acts as a thin wrapper around
some other backend to class `number` and intercepts all operations on that object storing the result as a string within itself.

This type provides `numeric_limits` support whenever the template argument Backend does so.

This type is particularly useful when your debugger provides a good view of `std::string`: when this is the case
multiprecision values can easily be inspected in the debugger by looking at the `debug_value` member of `debug_adaptor`.
The down side of this approach is that runtimes are much slower when using this type.  Set against that it can make
debugging very much easier, certainly much easier than sprinkling code with `printf` statements.

When used in conjunction with the Visual C++ debugger visualisers, the value of a multiprecision type that uses this
backend is displayed in the debugger just a __fundamental value would be, here we're inspecting a value of type
`number<debug_adaptor<cpp_dec_float<50> > >`:

[$../debugger1.png]

Otherwise you will need to expand out the view and look at the "debug_value" member:

[$../debugger2.png]

It works for all the backend types equally too, here it is inspecting a `number<debug_adaptor<gmp_rational> >`:

[$../debugger3.png]

The template alias `debug_adaptor_t` is used as a shortcut for converting some other number type to it's debugged equivalent,
for example:

   using mpfr_float_debug = debug_adaptor_t<mpfr_float>;

Defines `mpfr_float_debug` to be the debugged equivalent of `mpfr_float`.


[endsect] [/section:debug_adaptor debug_adaptor]
