aboutsummaryrefslogtreecommitdiff
path: root/build2/cc
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cc')
-rw-r--r--build2/cc/common.cxx6
-rw-r--r--build2/cc/compile-rule.cxx23
-rw-r--r--build2/cc/guess.cxx4
-rw-r--r--build2/cc/link-rule.cxx4
-rw-r--r--build2/cc/pkgconfig.cxx4
-rw-r--r--build2/cc/windows-rpath.cxx4
6 files changed, 23 insertions, 22 deletions
diff --git a/build2/cc/common.cxx b/build2/cc/common.cxx
index d4c60ec..085ed41 100644
--- a/build2/cc/common.cxx
+++ b/build2/cc/common.cxx
@@ -179,8 +179,8 @@ namespace build2
if (pn > dn &&
p.compare (0, dn, ds) == 0 &&
- (path::traits::is_separator (ds[dn - 1]) ||
- path::traits::is_separator (p[dn])))
+ (path::traits_type::is_separator (ds[dn - 1]) ||
+ path::traits_type::is_separator (p[dn])))
return true;
}
@@ -277,7 +277,7 @@ namespace build2
//
auto sys_simple = [&sysd, &sys, &find_sysd] (const string& p) -> bool
{
- bool s (!path::traits::absolute (p));
+ bool s (!path::traits_type::absolute (p));
if (!s)
{
diff --git a/build2/cc/compile-rule.cxx b/build2/cc/compile-rule.cxx
index 94e50cd..170e358 100644
--- a/build2/cc/compile-rule.cxx
+++ b/build2/cc/compile-rule.cxx
@@ -1549,7 +1549,7 @@ namespace build2
if (p > 1 && p + 1 < l.size () && // 2 chars before, 1 after.
l[p - 2] == ' ' &&
alpha (l[p - 1]) &&
- path::traits::is_separator (l[p + 1]))
+ path::traits_type::is_separator (l[p + 1]))
p = l.rfind (':', p - 2);
}
@@ -2006,13 +2006,14 @@ namespace build2
//
if (const strings* ih = import_hdr)
{
- auto i (lower_bound (ih->begin (),
- ih->end (),
- hp,
- [] (const string& x, const string& y)
- {
- return path::traits::compare (x, y) < 0;
- }));
+ auto i (
+ lower_bound (ih->begin (),
+ ih->end (),
+ hp,
+ [] (const string& x, const string& y)
+ {
+ return path::traits_type::compare (x, y) < 0;
+ }));
if (i != ih->end () && *i == hp)
{
@@ -2745,8 +2746,8 @@ namespace build2
// -I$src/out_*). We just need to add a trailing directory
// separator if it's not already there.
//
- if (!dir_path::traits::is_separator (ds.back ()))
- ds += dir_path::traits::directory_separator;
+ if (!dir_path::traits_type::is_separator (ds.back ()))
+ ds += dir_path::traits_type::directory_separator;
dir_path d (move (ds), dir_path::exact); // Move the buffer in.
@@ -4383,7 +4384,7 @@ namespace build2
// FOObar
//
bool fs (fc == '_' || fc == '-' || fc == '.' ||
- path::traits::is_separator (fc));
+ path::traits_type::is_separator (fc));
bool ms (mc == '_' || mc == '.');
if (fs && ms)
diff --git a/build2/cc/guess.cxx b/build2/cc/guess.cxx
index 0932083..f5db253 100644
--- a/build2/cc/guess.cxx
+++ b/build2/cc/guess.cxx
@@ -219,7 +219,7 @@ namespace build2
// Analyze the last path component only.
//
const string& s (xc.string ());
- size_t s_p (path::traits::find_leaf (s));
+ size_t s_p (path::traits_type::find_leaf (s));
size_t s_n (s.size ());
// Name separator characters (e.g., '-' in 'g++-4.8').
@@ -1810,7 +1810,7 @@ namespace build2
{
if (pre.second != 0 &&
pre.second != string::npos &&
- !path::traits::is_separator (xc.string ()[pre.second - 1]))
+ !path::traits_type::is_separator (xc.string ()[pre.second - 1]))
{
r.bin_pattern.assign (xc.string (), 0, pre.second);
r.bin_pattern += '*'; // '-' or similar is already there.
diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx
index 80ba503..372d077 100644
--- a/build2/cc/link-rule.cxx
+++ b/build2/cc/link-rule.cxx
@@ -1528,7 +1528,7 @@ namespace build2
// better than checking for a platform-specific extension (maybe
// we should cache it somewhere).
//
- size_t p (path::traits::find_extension (f));
+ size_t p (path::traits_type::find_extension (f));
if (p == string::npos)
return;
@@ -1553,7 +1553,7 @@ namespace build2
//
string o (d.link ? "-Wl,-rpath-link," : "-Wl,-rpath,");
- size_t p (path::traits::rfind_separator (f));
+ size_t p (path::traits_type::rfind_separator (f));
assert (p != string::npos);
o.append (f, 0, (p != 0 ? p : 1)); // Don't include trailing slash.
diff --git a/build2/cc/pkgconfig.cxx b/build2/cc/pkgconfig.cxx
index 6f30dc9..dcf3cff 100644
--- a/build2/cc/pkgconfig.cxx
+++ b/build2/cc/pkgconfig.cxx
@@ -1317,7 +1317,7 @@ namespace build2
auto strip_lib = [&n] ()
{
if (n.size () > 3 &&
- path::traits::compare (n.c_str (), 3, "lib", 3) == 0)
+ path::traits_type::compare (n.c_str (), 3, "lib", 3) == 0)
n.erase (0, 3);
};
@@ -1328,7 +1328,7 @@ namespace build2
//
n = t->path ().leaf ().base ().base ().string ();
- if (path::traits::compare (n.c_str (), n.size (),
+ if (path::traits_type::compare (n.c_str (), n.size (),
l.name.c_str (), l.name.size ()) != 0)
strip_lib ();
}
diff --git a/build2/cc/windows-rpath.cxx b/build2/cc/windows-rpath.cxx
index 0a19db2..9ad2602 100644
--- a/build2/cc/windows-rpath.cxx
+++ b/build2/cc/windows-rpath.cxx
@@ -92,7 +92,7 @@ namespace build2
//
// Though this can happen on MinGW with direct DLL link...
//
- size_t p (path::traits::find_extension (f));
+ size_t p (path::traits_type::find_extension (f));
if (p == string::npos || casecmp (f.c_str () + p + 1, "dll") != 0)
return;
@@ -170,7 +170,7 @@ namespace build2
}
else
{
- size_t p (path::traits::find_extension (f));
+ size_t p (path::traits_type::find_extension (f));
if (p != string::npos && casecmp (f.c_str () + p + 1, "dll") == 0)
{