Your problem is that a genric type (with no constraint) has to be "compilable" for any type. Since not all types have an == operator your code will not compile.
One way to resolve it is to add a class constraint however since your using default(TValue) that would suggest you want the code to work with other types. (otherwise just use null instead of default(TValue). One solution might be something similar to what Bryan Watts suggests
bool DoSomething<TValue>(TValue value) {
return EqualityComparer<TValue>.Default.Equals(value, default(TValue));
}
or you could wrap it up in an extension method
bool IsDefault<TValue>(this TValue value) {
return EqualityComparer<TValue>.Default.Equals(value, default(TValue));
}