WillAyd commented on code in PR #799:
URL: https://github.com/apache/arrow-adbc/pull/799#discussion_r1231437551
##########
c/driver/postgresql/connection.cc:
##########
@@ -185,6 +186,10 @@ class PqGetObjectsHelper {
na_error_ = {0};
}
+ static const inline std::unordered_map<std::string, std::string>
PgTableTypes = {
Review Comment:
Without the `inline` keyword I get the following error:
```
/home/willayd/clones/arrow-adbc/c/driver/postgresql/connection.cc:189:61:
error: in-class initialization of static data member ‘const
std::unordered_map<std::__cxx11::basic_string<char>,
std::__cxx11::basic_string<char> >
{anonymous}::PqGetObjectsHelper::PgTableTypes’ of non-literal type
189 | static const std::unordered_map<std::string, std::string>
PgTableTypes = {
|
^~~~~~~~~~~~
/home/willayd/clones/arrow-adbc/c/driver/postgresql/connection.cc:191:79:
error: temporary of non-literal type ‘const
std::unordered_map<std::__cxx11::basic_string<char>,
std::__cxx11::basic_string<char> >’ in a constant expression
191 | {"toast_table", "t"}, {"foreign_table", "f"},
{"partitioned_table", "p"}};
```
AFAICT this is a C++17 feature
https://stackoverflow.com/a/38043566/621736
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]