Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error OSG 3.0.0/Fedora 15/GCC 4.6.0 #28

Closed
AlexBobkov opened this issue Sep 2, 2011 · 2 comments
Closed

Compile error OSG 3.0.0/Fedora 15/GCC 4.6.0 #28

AlexBobkov opened this issue Sep 2, 2011 · 2 comments

Comments

@AlexBobkov
Copy link
Contributor

In file included from /opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Resource:24:0,
from /opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Skins:24,
from /opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Style:32,
from /opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/GEOS:26,
from /opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Geometry.cpp:20:
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags:57:18: error: declaration of ‘class T’
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags:34:14: error: shadows template parm ‘class T’
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags:67:18: error: declaration of ‘class T’
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags:34:14: error: shadows template parm ‘class T’
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags: In member function ‘bool osgEarth::Symbology::Taggable::containsTags(const T&) const’:
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags:59:18: error: need ‘typename’ before ‘T:: const_iterator’ because ‘T’ is a dependent scope
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags:59:36: error: expected ‘;’ before ‘i’
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags:59:54: error: ‘i’ was not declared in this scope
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags: In static member function ‘static std::string osgEarth::Symbology::Taggable::tagString(const T&)’:
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags:70:18: error: need ‘typename’ before ‘T:: const_iterator’ because ‘T’ is a dependent scope
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags:70:36: error: expected ‘;’ before ‘i’
/opt/BUILD/osgEarth/source-orig/src/osgEarthSymbology/Tags:70:54: error: ‘i’ was not declared in this scope
make[2]: *** [src/osgEarthSymbology/CMakeFiles/osgEarthSymbology.dir/Geometry.cpp.o] Error 1
make[1]: *** [src/osgEarthSymbology/CMakeFiles/osgEarthSymbology.dir/all] Error 2
make: *** [all] Error 2

@AlexBobkov
Copy link
Contributor Author

This is a possible fix for file osgEarthSymbology/Tags:

    template<typename T1>
    bool containsTags( const T1& tags ) const {
        for(typename T1::const_iterator i = tags.begin(); i != tags.end(); i++ ) {
            if ( _tags.find( normalize( *i ) ) == _tags.end() )
                return false;
        }
        return true;
    }
    const TagSet& tags() const { return _tags; }

    template<typename T1>
    static std::string tagString(const T1& tags) {
        std::stringstream buf;
        for(typename T1::const_iterator i = tags.begin(); i != tags.end(); i++ )
            buf << (i != tags.begin()? " " : "") << *i;
        std::string result = buf.str();
        return result;
    }

@gwaldron
Copy link
Owner

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants