fork download
  1. #include <memory>
  2.  
  3. template <typename T, typename A = std::allocator<T> >
  4. class B{
  5. public:
  6. char* hoge(){
  7. typename A::template rebind<char>::other d;
  8. return d.allocate(1);
  9. }
  10. };
  11.  
  12. int main(){
  13. B<int> b;
  14. b.hoge();
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 2808KB
stdin
Standard input is empty
stdout
Standard output is empty