aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-04-12 22:04:22 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-04-12 22:19:45 +0300
commitf8e5cbf6c58fe2794172ba8b6a219e692fbddcec (patch)
tree64247f845b847f446811e9941dd21f47e091ac40
parent3caf9a9c929c18c0c1dfee89f299079b7da5b0cc (diff)
Suppress VC's bogus "requires the compiler to capture 'this'" warning
-rw-r--r--bpkg/fetch-git.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/bpkg/fetch-git.cxx b/bpkg/fetch-git.cxx
index 6a1eadb..0c21af6 100644
--- a/bpkg/fetch-git.cxx
+++ b/bpkg/fetch-git.cxx
@@ -1537,7 +1537,13 @@ namespace bpkg
cstrings ()),
v,
"origin",
- remapped_refspecs ? *remapped_refspecs : refspecs))
+ //
+ // Note that has_value() is used here to work around bogus
+ // "requires the compiler to capture 'this'" VC warning.
+ //
+ (remapped_refspecs.has_value ()
+ ? *remapped_refspecs
+ : refspecs)))
fail << "unable to fetch " << dir << endg;
// If we fetched shallow then let's make sure that the method we use to