diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-30 11:12:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-13 12:42:41 +0200 |
commit | b262d2c9c56eed18d043dccefac02b54a6ae2f95 (patch) | |
tree | 010e5c6cce042e0fbf25817a62659d251c220acf /build2/file.cxx | |
parent | f93038fbee1631b95922b0742e0fd00fa8dae02e (diff) |
Implement pattern-based variable typing, tighten variable type update
Diffstat (limited to 'build2/file.cxx')
-rw-r--r-- | build2/file.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/build2/file.cxx b/build2/file.cxx index 72d2807..755ff0f 100644 --- a/build2/file.cxx +++ b/build2/file.cxx @@ -900,10 +900,11 @@ namespace build2 // config.import.<proj> // - // Note: overridable variable with path auto-completion. - // { - const variable& var (vp.insert<abs_dir_path> (n, true)); + // Note: pattern-typed in context.cxx:reset() as an overridable + // variable of type abs_dir_path (path auto-completion). + // + const variable& var (vp.insert (n)); if (auto l = iroot[var]) { @@ -934,7 +935,10 @@ namespace build2 { auto lookup = [&iroot, &vp, &loc] (string name) -> path { - const variable& var (vp.insert<path> (name, true)); + // Note: pattern-typed in context.cxx:reset() as an overridable + // variable of type path. + // + const variable& var (vp.insert (move (name))); path r; if (auto l = iroot[var]) |