Provide std::map<>::at for use in run_compile_commands
Many compilers we support do not provide the at() member of std::map. Use the workaround added by commit a7e7a04a (Fix run_compile_commands build on Apple GCC 3.3, 2011-05-16) for all compilers.
This commit is contained in:
parent
4e2185cbd0
commit
169bb05f90
@ -5,7 +5,6 @@ public:
|
|||||||
class CommandType: public std::map<cmStdString, cmStdString>
|
class CommandType: public std::map<cmStdString, cmStdString>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ < 4
|
|
||||||
cmStdString const& at(cmStdString const& k) const
|
cmStdString const& at(cmStdString const& k) const
|
||||||
{
|
{
|
||||||
const_iterator i = this->find(k);
|
const_iterator i = this->find(k);
|
||||||
@ -13,7 +12,6 @@ public:
|
|||||||
static cmStdString empty;
|
static cmStdString empty;
|
||||||
return empty;
|
return empty;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
typedef std::vector<CommandType> TranslationUnitsType;
|
typedef std::vector<CommandType> TranslationUnitsType;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user