deepzliu commented on code in PR #34555:
URL: https://github.com/apache/arrow/pull/34555#discussion_r1135406563
##########
cpp/src/arrow/util/type_fwd.h:
##########
@@ -45,17 +45,18 @@ struct Scope;
struct Compression {
/// \brief Compression algorithm
+ // prefix 'ACT'(arrow compression type) to avoid nameing conflicts.
enum type {
Review Comment:
'enum class type {' has the same error if macro definition before,
like:`#define SNAPPY 1`.
The error is 'expected identifier before numeric constant'.
Total sample code:
```
#include <iostream>
#define SNAPPY 1
enum class Compression {
/// \brief Compression algorithm
UNCOMPRESSED,
SNAPPY,
GZIP,
BROTLI,
ZSTD,
LZ4,
LZ4_FRAME,
LZO,
BZ2,
LZ4_HADOOP
};
int main() {
std::cout << "UNCOMPRESSED: " <<
static_cast<int>(Compression::UNCOMPRESSED) << std::endl;
std::cout << "SNAPPY: " << static_cast<int>(Compression::SNAPPY) <<
std::endl;
return 0;
}
```
--
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]