the alternative code I came up with is
bool attribNameIsInSpecElement(std::string tagName, std::string sattrib, VSEI* 
piSpecEl, LSAI* piSpecAttrib, bool isXHTML, bool isXML) {
    for (piSpecEl = &(vseSpecElements.begin());
        *piSpecEl != vseSpecElements.end();
        *piSpecEl++) {
        if (compare(tagName,(*piSpecEl)->tagName,isXHTML,isXML)) {
            for (piSpecAttrib =&((*piSpecEl)->lsAttributes.begin());
                *piSpecAttrib != (*piSpecEl)->lsAttributes.end();
                *piSpecAttrib++) {
                if (compare((*piSpecAttrib)->name,sattrib,isXHTML,isXML)) {
                    //at this point, iAttrib and iSpecEl both point to valid 
element and attrib iterators.
                    return true;
                }
            }
        }
    }
    //at this point, iSpecEl points to vseSpecElement.end() and iAttrib points 
to lsAttributes.end()
    return false;
}


32\errgw32bmatch2:bmatch2.cpp:402:43: error: taking address of temporary 
[-fpermissive]
32\errgw32bmatch2:bmatch2.cpp:406:58: error: taking address of temporary 
[-fpermissive]
32\errgw32bmatch2:bmatch2.cpp:406:58: error: cannot convert 
'std::list<std::basic_string<char> >::iterator* {aka 
std::_List_iterator<std::basic_string
<char> >*}' to 'LSAI* {aka std::_List_iterator<SAttribute>*}' in assignment
32\errgw32bmatch2:bmatch2.cpp:407:55: error: no match for 'operator!=' in '* 
piSpecAttrib != piSpecEl->__gnu_cxx::__normal_iterator<_Iterator, _Contai
ner>::operator-><SElement*, std::vector<SElement> 
>()->SElement::lsAttributes.std::list<_Tp, 
_Alloc>::end<std::basic_string<char>, std::allocator<std:
:basic_string<char> > >()'


in other words, I cannot use gcc to make a syntax validator.
any ideas? I currently seem to have no way to make this code work.





>________________________________
> From: Jim Michaels <jmich...@yahoo.com>
>To: mingw64 users <mingw-w64-public@lists.sourceforge.net> 
>Sent: Monday, November 5, 2012 9:39 PM
>Subject: [Mingw-w64-public] bug in gcc? has nothing defined for iterator 
>references
> 
>
>32\errgw32bmatch2:bmatch2.cpp:404:49: error: no match for 'operator=' in 
>'iSpecAttrib = (& iSpecEl)->__gnu_cxx::__normal_iterator<_Iterator, 
>_Container>::operator-><SElement*, std::vector<SElement> 
>>()->SElement::lsAttributes.std::list<_Tp, 
>_Alloc>::begin<std::basic_string<char>, std::allocator<std::basic_string<char> 
>> >()'
>
>
>
>32\errgw32bmatch2:bmatch2.cpp:404:93: error: no match for 'operator!=' in 
>'iSpecAttrib != (& iSpecEl)->__gnu_cxx::__normal_iterator<_Iterator, 
>_Container>::operator-><SElement*, std::vector<SElement> 
>>()->SElement::lsAttributes.std::list<_Tp, 
>_Alloc>::end<std::basic_string<char>, std::allocator<std::basic_string<char> > 
>>()'
>
>typedef struct {
>    std::string
>        name,
>        val;
>    bool isBoolean;
>    VUI hitLineNumbers;
>} SAttribute;
>typedef  std::list<SAttribute> LSA;
>typedef  std::list<SAttribute>::iterator LSAI;
>
>
>bool attribNameIsInSpecElement(std::string tagName, std::string attrib, VSEI& 
>iSpecEl, LSAI& iSpecAttrib, bool isXHTML, bool isXML) {
>    for (iSpecEl=vseSpecElements.begin(); iSpecEl != vseSpecElements.end(); 
>iSpecEl++) {
>        if (compare(tagName,iSpecEl->tagName,isXHTML,isXML)) {
>            for (iSpecAttrib=iSpecEl->lsAttributes.begin(); iSpecAttrib != 
>iSpecEl->lsAttributes.end(); iSpecAttrib++) {
>
>
>
>where it's having trouble is with assigning and equating to LSAI variables. 
>specifically last and first line of function nothing is defined as operators 
>for any iterator that's a reference.
>
>maybe there's something I am missing here. I wanted to modify the original 
>iSpecAttrib. 
>I
 don't know enough about iterators to figure out how to pass a value back in an 
argument to the original variable in c++ now except to use pointers...
>I really wanted to use references, they are SO much more convenient.
> 
>-------------
>Jim Michaels
>jmich...@yahoo.com
>j...@renewalcomputerservices.com
>http://RenewalComputerServices.com
>http://JesusnJim.com (my personal site, has software)
>---
>IEC Units: Computer RAM & SSD measurements, microsoft disk size measurements 
>(note: they will say GB or MB or KB or TB when it is IEC
 Units!):
>[KiB] [MiB] [GiB] [TiB]
>[2^10B=1,024^1B=1KiB]
>[2^20B=1,024^2B=1,048,576B=1MiB]
>[2^30B=1,024^3B=1,073,741,824B=1GiB]
>[2^40B=1,024^4B=1,099,511,627,776B=1TiB]
>[2^50B=1,024^5B=1,125,899,906,842,624B=1PiB]
>SI Units: Hard disk industry disk size measurements:
>
>[KB] [MB] [GB] [TB]
>[10^3B=1,000B=1KB]
>[10^6B=1,000,000B=1MB]
>[10^9B=1,000,000,000B=1GB]
>[10^12B=1,000,000,000,000B=1TB]
>[10^15B=1,000,000,000,000,000B=1PB]
>
>
>------------------------------------------------------------------------------
>LogMeIn Central: Instant, anywhere, Remote PC access and management.
>Stay in control, update software, and manage PCs from one command center
>Diagnose problems and improve visibility into emerging IT issues
>Automate, monitor and manage. Do more in less time with Central
>http://p.sf.net/sfu/logmein12331_d2d
>_______________________________________________
>Mingw-w64-public mailing list
>Mingw-w64-public@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
>
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to