May be not a bug... But, why error occurs in the following code? #include <tuple> #include <utility> using namespace std; template<class ..._Attrs> class VertexBuffer { static constexpr const bool ownIndices = sizeof...(_Attrs) == 0; void test(){ static_asssert(ownIndices, "Link to owned indices!!"); } } int main(){} error: there are no arguments to 'static_asssert' that depend on a template parameter, so a declaration of 'static_asssert' must be available [-fpermissive] static_asssert(ownIndices, "Link to owned indices!!"); ^ Doesn't ownIndices template-dependent value? Compiled with MinGW 4.9
I am going to take a guess that you forgot to specify -std=c++11 or equivalent?
No, I compile it with -std=c++1y Here, live example http://ideone.com/KsGrnH (though that is gcc-4.8.1)
Typo, check the exact spelling of what g++ is complaining about.
Typo indeed. I'm so sorry.
The spell-checker would have been helpful here. It would have said: did you mean 'static_assert'?
Well, classical "static_asssert is not a function/variable/etc" would be enough for me. Because "there are no arguments to 'static_asssert' that depend on a template parameter" means that there IS such a function, but it does not accept current parameters set (IMHO).
(In reply to tower120 from comment #6) > Because "there are no arguments to 'static_asssert' that depend on a > template parameter" means that there IS such a function, but it does not > accept current parameters set (IMHO). No. "A declaration must be available" does not mean "a declaration is available but it is not usable"