Github user nsuke commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1103#discussion_r81464488
  
    --- Diff: lib/cpp/src/thrift/concurrency/PosixThreadFactory.h ---
    @@ -39,7 +39,14 @@ class PosixThreadFactory : public ThreadFactory {
       /**
        * POSIX Thread scheduler policies
        */
    -  enum POLICY { OTHER, FIFO, ROUND_ROBIN };
    +  class Policy {
    +  public:
    +    enum value {
    +      OTHER       = 0,
    +      FIFO        = 1,
    +      ROUND_ROBIN = 2
    +    };
    --- End diff --
    
    What is the purpose here ?
    At first glance I thought you were emulating C++11 enum class, but it does 
not provide type safety, and method signatures get noisy with ::value.
    There's certainly a way to avoid ::value and provide limited type-safety, 
but not sure if it's worth changing public API.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to