LINUX.ORG.RU

GCC в RH 7.1 и STL


0

0

Никто не подскажет, как лучше всего решить подобную проблему:

в стандарте STL есть следующие методы для basic_string: int compare(const basic_string& s) const int compare(size_type pos, size_type n, const basic_string& s) const int compare(size_type pos, size_type n, const basic_string& s, size_type pos1, size_type n1) const int compare(const charT* s) const int compare(size_type pos, size_type n, const charT* s, size_type len = npos) const

в то же время в STL, который идет вместе с GCC (2.96.81), файл /usr/include/g++-3/std/bastring.h присутствуют следующие: int compare (const basic_string& str, size_type pos = 0, size_type n = npos) const; int compare (const charT* s, size_type pos, size_type n) const; int compare (const charT* s, size_type pos = 0) const;

Как наиболее правильно и быстро решить эту проблему - не конкретно несоответствие методов compare, а возможное несоответствие еще чего-либо в STL ?

anonymous

Poprobui ispol'zovat' tol'ko to chto opisano v standarte, krome etogo poprobui lib: stlport, u menja v SuSe 7.2 idet v bazovoi postavke.

tvn
()

Ты будешь смеяться, но string и basic_string _не_ являются частью STL.

Havoc ★★★★
()

:)) Interesno a list<> i vector<> tuda hot' vhodjat?:)))

tvn
()

Входят. list и vector - это standard template library, а basic_string и string - C++ standard library.

justme
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.