forked from boostorg/tuple
SGI MIPSpro workaround in default_arg error checking
[SVN r10998]
This commit is contained in:
@ -83,7 +83,16 @@ struct default_arg {
|
|||||||
template <class T>
|
template <class T>
|
||||||
struct default_arg<T&> {
|
struct default_arg<T&> {
|
||||||
static T& f() {
|
static T& f() {
|
||||||
|
#ifndef __sgi
|
||||||
return generate_error<T>::no_default_values_for_reference_types;
|
return generate_error<T>::no_default_values_for_reference_types;
|
||||||
|
#else
|
||||||
|
// MIPSpro instantiates functions even when it should not, so
|
||||||
|
// this technique can not be used for error checking.
|
||||||
|
// The simple workaround is to just not have this error checking
|
||||||
|
// with MIPSpro.
|
||||||
|
static T x;
|
||||||
|
return x;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user