http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57818
Bug ID: 57818 Summary: A strange template output Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: liweifriends at gmail dot com Hi: I have tried the following code in gcc 4.8.1 template<const float* b> struct h { static constexpr float value() { return *b; } }; constexpr float a = 3.0f; int main() { cout<<a<<endl; //3 cout<<h<&a>::value<<endl; //1 return 0; } the output of h<&a>::value seems not correct. Is this a bug? Or just because the unsupported of C++ ?