In-class initialization doesn't work for template

For the following program, clang (see below for version) complains about the in-class initialization of a struct using a constant pointer, but only when it occurs in a template - the non-template case works:

struct foo
{
  int *pi;
};

struct fie
{
  static int i;
};

struct bar
{
  static constexpr foo f = { &fie::i }; // works
};

template <class T>
struct baz
{
  static constexpr foo f = { &T::i }; // error
};

class zip
{
  const foo *p, *q;
public:
  zip(void);
};

zip::zip(void) : p(&bar::f), q(&baz<fie>::f) {}

jjk$ clang++ --version
Apple clang version 3.1 (tags/Apple/clang-318.0.54) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
jjk$ clang++ --std=c++11 --stdlib=libc++ -O3 -S foo.cpp
foo.cpp:19:24: error: in-class initializer for static data member of type 'const foo' requires 'constexpr' specifier
  static constexpr foo f = { &T::i };
                       ^ ~~~~~~~~~
  constexpr
foo.cpp:29:33: note: in instantiation of template class 'baz<fie>' requested here
zip::zip(void) : p(&bar::f), q(&baz<fie>::f) {}
                                ^
1 error generated.

Is this a bug in clang, or am I doing something illegal?

Thanks,

  Jens.

Hello,

For the following program, clang (see below for version) complains about the in-class initialization of a struct using a constant pointer, but only when it occurs in a template - the non-template case works:

This program compiles here with clang r159923. I guess it was a bug in clang that was fixed in
the meantime.

Jonathan