我使用的是Clang 3.4.2。在查看此处提供的解决方案时:
Shared memory Vectors in boost with
该行:
typedef basic_string<char, std::char_traits<char>, salloc::rebind<char>::other> shared_string;
给我错误:
error: use 'template' keyword to treat 'rebind' as a dependent template name
typedef basic_string<char, std::char_traits<char>, salloc::rebind<char>::other> shared_string;
我试过了:
typedef basic_string<char, std::char_traits<char>, salloc::template rebind<char>::other> shared_string;
甚至:
typedef basic_string<char, std::char_traits<char>, template salloc::rebind<char>::other> shared_string;
但我仍然得到错误。
有人可以帮助纠正我吗?