Quantcast
Viewing all articles
Browse latest Browse all 40524

ofParameter.h compile error

Hi there,

I'm trying to compile the examples of ofxOpenNI and ofxNI2, none of them work due to the same error from this part of ofParameter.h


template <class T> yes check(T const&);
no check(no);

template <typename T>
struct has_loading_support {
    static istream & stream;
    static T & x;
    static const bool value = sizeof(check(stream >> x)) == sizeof(yes);
};

template <typename T>
struct has_saving_support {
    static ostream & stream;
    static T & x;
    static const bool value = sizeof(check(stream << x)) == sizeof(yes);
};

Where I get this:

    ../../../libs/openFrameworks/types/ofParameter.h:327:21: warning: declaration does not declare anything [-Wmissing-declarations]
        template <class T> yes check(T const&);
                           ^~~
../../../libs/openFrameworks/types/ofParameter.h:328:2: warning: declaration does not declare anything [-Wmissing-declarations]
        no check(no);
        ^~
../../../libs/openFrameworks/types/ofParameter.h:334:57: error: expected expression
            static const bool value = sizeof(check(stream >> x)) == sizeof(char);
                                                               ^
../../../libs/openFrameworks/types/ofParameter.h:341:57: error: expected expression
            static const bool value = sizeof(check(stream << x)) == sizeof(char);

This is driving me nuts, makes me wonder why have I accepted yet another Kinect project (I guess it still impresses a lot of people out there)

I'm on OS X 10.10.5
OF from master branch
XCode 7.1, also fails with 6.3.2


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>