File tree Expand file tree Collapse file tree 4 files changed +14
-17
lines changed
Expand file tree Collapse file tree 4 files changed +14
-17
lines changed Original file line number Diff line number Diff line change 2323# include < string>
2424#endif
2525
26- #if BOOST_LEAF_CFG_DIAGNOSTICS
27-
2826// __has_include is currently supported by GCC and Clang. However GCC 4.9 may have issues and
2927// returns 1 for 'defined( __has_include )', while '__has_include' is actually not supported:
3028// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63662
4644# endif
4745#endif
4846
49- #endif // #if BOOST_LEAF_CFG_DIAGNOSTICS
50-
5147namespace boost { namespace leaf {
5248
5349namespace detail
Original file line number Diff line number Diff line change 88#include < boost/leaf/writer.hpp>
99#include < boost/leaf/detail/exception_base.hpp>
1010
11- #include < iosfwd>
11+ #include < boost/leaf/config.hpp>
12+ #include < type_traits>
13+
14+ #if BOOST_LEAF_CFG_DIAGNOSTICS
15+ # include < iostream>
16+ #else
17+ # include < iosfwd>
18+ #endif
1219
1320namespace boost { namespace leaf {
1421
22+ template <class E >
23+ struct show_in_diagnostics : std::integral_constant<bool , BOOST_LEAF_CFG_DIAGNOSTICS>
24+ {
25+ };
26+
1527namespace detail
1628{
1729 template <class T , class E = void >
Original file line number Diff line number Diff line change 99#include < boost/leaf/detail/optional.hpp>
1010#include < boost/leaf/detail/function_traits.hpp>
1111#include < boost/leaf/detail/capture_list.hpp>
12-
13- #if BOOST_LEAF_CFG_DIAGNOSTICS
14- # include < boost/leaf/detail/diagnostics_writer.hpp>
15- # include < ostream>
16- #endif
12+ #include < boost/leaf/detail/diagnostics_writer.hpp>
1713
1814#include < cstring>
1915
@@ -104,10 +100,8 @@ namespace detail
104100 void serialize_ (Writer & w, E const & e)
105101 {
106102 serialize (w, e);
107- #if BOOST_LEAF_CFG_DIAGNOSTICS
108103 if ( detail::diagnostics_writer * ow = w.template get <detail::diagnostics_writer>() )
109104 ow->write (e);
110- #endif
111105 }
112106}
113107
Original file line number Diff line number Diff line change 2121
2222namespace boost { namespace leaf {
2323
24- template <class E >
25- struct show_in_diagnostics : std::true_type
26- {
27- };
28-
2924class writer
3025{
3126 parsed const type_;
You can’t perform that action at this time.
0 commit comments