]> git.lyx.org Git - features.git/commitdiff
Hacky fix for the boost::tie stuff.
authorAngus Leeming <leeming@lyx.org>
Sun, 2 Sep 2001 14:43:59 +0000 (14:43 +0000)
committerAngus Leeming <leeming@lyx.org>
Sun, 2 Sep 2001 14:43:59 +0000 (14:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2657 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/buffer.C

index 1cc42bcf86f45cf780d506fb6f675525717be83b..b7f543d172646d722930d9536ea5b32839a0bc18 100644 (file)
@@ -5,6 +5,9 @@
  
 2001-09-02  Angus Leeming  <a.leeming@ic.ac.uk>
 
+       * buffer.C (getLists): replace boost::tie code with an explicit pair
+       as boost::tie can break some compilers.
+
        * iterators.h: Added a std:: declaration to the return type of
        ParIterator::size.
 
index de4866e3b9b9d6aa9ae4fec9dac6902fe679cb8e..d94e6b922eab40d300f79de196d24136b646a512 100644 (file)
@@ -32,8 +32,6 @@
 #include <locale>
 #endif
 
-#include <boost/tuple/tuple.hpp>
-
 #ifdef __GNUG__
 #pragma implementation
 #endif
@@ -3576,10 +3574,21 @@ Buffer::Lists const Buffer::getLists() const
 {
        Lists l;
        Paragraph * par = paragraph;
+
+#if 1
+       std::pair<bool, LyXTextClassList::size_type> const tmp =
+               textclasslist.NumberOfLayout(params.textclass, "Caption");
+       bool const found = tmp.first;
+       LyXTextClassList::size_type const cap = tmp.second;
+       
+#else
+       // This is the prefered way to to this, but boost::tie can break
+       // some compilers
        bool found;
        LyXTextClassList::size_type cap;
        boost::tie(found, cap) = textclasslist
                .NumberOfLayout(params.textclass, "Caption");
+#endif
 
        while (par) {
                char const labeltype =