#include <memory>

template <typename T, typename A = std::allocator<T> >
class B{
public:
  char* hoge(){
    typename A::template rebind<char>::other d;
    return d.allocate(1);
  }
};

int main(){
  B<int> b;
  b.hoge();
  return 0;
}