From aae568eca6a9de86dadd4156aa898f16bef6e76b Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sat, 17 Jun 2023 16:58:03 -0700 Subject: [PATCH] Add comment explaining "option.template get_value()". --- libgnucash/engine/gnc-optiondb.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libgnucash/engine/gnc-optiondb.cpp b/libgnucash/engine/gnc-optiondb.cpp index 39488eeff69..97a5286fe15 100644 --- a/libgnucash/engine/gnc-optiondb.cpp +++ b/libgnucash/engine/gnc-optiondb.cpp @@ -392,6 +392,14 @@ option_path(const GncOption& option, GSList* list) list->data = (void*)option.get_section().c_str(); } +/* The usage "option.template get_value()" looks weird, but it's required + * by the C++ standard: "When the name of a member template specialization + * appears after . or -> in a postfix-expression, or after nested-name-specifier + * in a qualified-id, and the postfix-expression or qualified-id explicitly + * depends on a template-parameter (14.6.2), the member template name must be + * prefixed by the keyword template. Otherwise the name is assumed to name a + * non-template." + */ static inline KvpValue* kvp_value_from_bool_option(const GncOption& option) {