aboutsummaryrefslogtreecommitdiff
path: root/bpkg/options-types.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-10-11 17:42:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-10-11 17:42:38 +0200
commitd6858f2d1612027d79acf8ea231f7b4c5859efa1 (patch)
tree77920c35f45749b3fe8d0999482400ebf80f8f5a /bpkg/options-types.hxx
parent61349dcf5fbfeab888ea345ebec3d887777a2782 (diff)
Work around compiler issues in qualified_option class template
Diffstat (limited to 'bpkg/options-types.hxx')
-rw-r--r--bpkg/options-types.hxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/bpkg/options-types.hxx b/bpkg/options-types.hxx
index 3438be1..76650f1 100644
--- a/bpkg/options-types.hxx
+++ b/bpkg/options-types.hxx
@@ -31,7 +31,7 @@ namespace bpkg
//
// const char* option_qualifiers[] = {"foo", "bar", nullptr};
//
- template <const char* Q[], typename V>
+ template <const char* const* Q, typename V>
class qualified_option: public std::map<string, V>
{
public:
@@ -39,7 +39,7 @@ namespace bpkg
template <typename T>
explicit
- qualified_option (T v) {this->emplace ("", std::move (v));}
+ qualified_option (T v) {this->emplace (string (), V (std::move (v)));}
qualified_option (): qualified_option (V ()) {}
@@ -50,7 +50,7 @@ namespace bpkg
{
auto verify = [&q] ()
{
- for (const char** p (Q); *p != nullptr; ++p)
+ for (const char* const* p (Q); *p != nullptr; ++p)
{
if (q == *p)
return true;
@@ -70,7 +70,7 @@ namespace bpkg
}
};
- extern const char* openssl_commands[];
+ extern const char* openssl_commands[3]; // Clang bug requres explicit size.
}
#endif // BPKG_OPTIONS_TYPES_HXX