diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-05 20:07:27 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-05 20:11:52 +0100 |
commit | 526e746c3a95ee1dfbdf222e61d28ccc5be3cc98 (patch) | |
tree | fa8d8554eb4784dd4cf696bb20e66bb42ea2ef90 /sw/inc/ring.hxx | |
parent | 6cd053ebf2289fda4c5abd523db493d570ebb1c3 (diff) |
ugly preliminary hack for keeping ggc 4.6 happy
Change-Id: I41d605b5acbb54969d6b2cb68f06583983ee0d4b
Diffstat (limited to 'sw/inc/ring.hxx')
-rw-r--r-- | sw/inc/ring.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx index 913d62a362b6..b75173374a73 100644 --- a/sw/inc/ring.hxx +++ b/sw/inc/ring.hxx @@ -27,6 +27,13 @@ #include <boost/iterator/iterator_facade.hpp> #include <boost/intrusive/circular_list_algorithms.hpp> +#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) +// gcc 4.6 backwards compat hack, remove ASAP when we drop support +class SwPaM; +class SwViewShell; +class _SaveMergeRedlines; +#endif + namespace sw { template <typename value_type> class RingContainer; @@ -101,8 +108,18 @@ namespace sw static node_ptr get_previous(const_node_ptr n) { return const_cast<node_ptr>(static_cast<const_node_ptr>(n))->GetPrevInRing(); }; static void set_previous(node_ptr n, node_ptr previous) { n->pPrev = previous; }; }; +#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) + // gcc 4.6 backwards compat hack, remove ASAP when we drop support + friend class sw::RingContainer<SwPaM>; + friend class sw::RingContainer<const SwPaM>; + friend class sw::RingContainer<SwViewShell>; + friend class sw::RingContainer<const SwViewShell>; + friend class sw::RingContainer<_SaveMergeRedlines>; + friend class sw::RingContainer<const _SaveMergeRedlines>; +#else friend ring_container; friend const_ring_container; +#endif friend typename ring_container::iterator; friend typename ring_container::const_iterator; friend typename const_ring_container::iterator; |