Skip to content

Fix compilation with clang and -std=c++11

Phil Smith requested to merge github/fork/jstasiak/master into master

Created by: jstasiak

Without this patch I used to get following errors:

In file included from /Users/aa/projects/ununu/ungine/main.cpp:3:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/sauce.h:4:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/binder.h:12:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/internal/clause.h:11:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/internal/instance_binding.h:4:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/injector.h:10:
/Users/aa/projects/ununu/deps/sauce/sauce/internal/base_injector.h:70:14: error: use 'template' keyword to treat 'validateAcyclic' as a dependent template name
    bindings.validateAcyclic<Normalized>(validateProviding, injector, ids, name);
             ^
             template 
/Users/aa/projects/ununu/deps/sauce/sauce/internal/base_injector.h:84:14: error: use 'template' keyword to treat 'eagerlyInject' as a dependent template name
    bindings.eagerlyInject<Scope>(injector);
             ^
             template 
In file included from /Users/aa/projects/ununu/ungine/main.cpp:3:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/sauce.h:4:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/binder.h:12:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/internal/clause.h:12:
/Users/aa/projects/ununu/deps/sauce/sauce/internal/method_binding.h:56:31: error: 'injectHelper' following the 'template' keyword does not refer to a template
        return this->template injectHelper<T>(binding, injector, dependencyName);
                     ~~~~~~~~ ^~~~~~~~~~~~
/Users/aa/projects/ununu/deps/sauce/sauce/internal/method_binding.h:56:43: error: expected unqualified-id
        return this->template injectHelper<T>(binding, injector, dependencyName);
                                          ^
/Users/aa/projects/ununu/deps/sauce/sauce/internal/method_binding.h:56:44: error: 'T' does not refer to a value
        return this->template injectHelper<T>(binding, injector, dependencyName);
                                           ^
/Users/aa/projects/ununu/deps/sauce/sauce/internal/method_binding.h:46:23: note: declared here
    template<typename T, int i>
                      ^
/Users/aa/projects/ununu/deps/sauce/sauce/internal/method_binding.h:88:24: error: 'validateAcyclicHelper' following the 'template' keyword does not refer to a template
        this->template validateAcyclicHelper<T>(binding, injector, ids, dependencyName);
              ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~
/Users/aa/projects/ununu/deps/sauce/sauce/internal/method_binding.h:88:45: error: expected unqualified-id
        this->template validateAcyclicHelper<T>(binding, injector, ids, dependencyName);
                                            ^
/Users/aa/projects/ununu/deps/sauce/sauce/internal/method_binding.h:88:46: error: 'T' does not refer to a value
        this->template validateAcyclicHelper<T>(binding, injector, ids, dependencyName);
                                             ^
/Users/aa/projects/ununu/deps/sauce/sauce/internal/method_binding.h:77:23: note: declared here
    template<typename T, int i>
                      ^
In file included from /Users/aa/projects/ununu/ungine/main.cpp:3:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/sauce.h:4:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/binder.h:12:
In file included from /Users/aa/projects/ununu/deps/sauce/sauce/internal/clause.h:13:
/Users/aa/projects/ununu/deps/sauce/sauce/internal/new_binding.h:61:31: error: 'injectHelper' following the 'template' keyword does not refer to a template
        return this->template injectHelper<T>(binding, injector, dependencyName);
                     ~~~~~~~~ ^~~~~~~~~~~~
/Users/aa/projects/ununu/deps/sauce/sauce/internal/new_binding.h:61:43: error: expected unqualified-id
        return this->template injectHelper<T>(binding, injector, dependencyName);
                                          ^
/Users/aa/projects/ununu/deps/sauce/sauce/internal/new_binding.h:61:44: error: 'T' does not refer to a value
        return this->template injectHelper<T>(binding, injector, dependencyName);
                                           ^
/Users/aa/projects/ununu/deps/sauce/sauce/internal/new_binding.h:51:23: note: declared here
    template<typename T, int i>
                      ^
/Users/aa/projects/ununu/deps/sauce/sauce/internal/new_binding.h:94:24: error: 'validateAcyclicHelper' following the 'template' keyword does not refer to a template
        this->template validateAcyclicHelper<T>(binding, injector, ids, dependencyName);
              ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~
/Users/aa/projects/ununu/deps/sauce/sauce/internal/new_binding.h:94:45: error: expected unqualified-id
        this->template validateAcyclicHelper<T>(binding, injector, ids, dependencyName);
                                            ^
/Users/aa/projects/ununu/deps/sauce/sauce/internal/new_binding.h:94:46: error: 'T' does not refer to a value
        this->template validateAcyclicHelper<T>(binding, injector, ids, dependencyName);
                                             ^
/Users/aa/projects/ununu/deps/sauce/sauce/internal/new_binding.h:85:23: note: declared here
    template<typename T, int i>
                      ^

Merge request reports