You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "mattisonchao (via GitHub)" <gi...@apache.org> on 2023/05/15 14:39:48 UTC

[GitHub] [pulsar-client-cpp] mattisonchao opened a new issue, #268: [Bug] C++ versions less than C++14 are not supported.

mattisonchao opened a new issue, #268:
URL: https://github.com/apache/pulsar-client-cpp/issues/268

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing similar.
   
   
   ### Version
   
   3.2.0-candidate-3
   
   ### Minimal reproduce step
   
   ```
   cmake .
   make
   ```
   
   ### What did you expect to see?
   
   run `make` success.
   
   ### What did you see instead?
   
   ```
   [ 64%] Building CXX object tests/CMakeFiles/pulsar-tests.dir/AcknowledgeTest.cc.o
   In file included from /Users/mattisonchao/Projects/apache/pulsar-client-cpp/tests/AcknowledgeTest.cc:19:
   In file included from /usr/local/include/gtest/gtest.h:64:
   In file included from /usr/local/include/gtest/gtest-assertion-result.h:46:
   In file included from /usr/local/include/gtest/gtest-message.h:57:
   /usr/local/include/gtest/internal/gtest-port.h:270:2: error: C++ versions less than C++14 are not supported.
   #error C++ versions less than C++14 are not supported.
    ^
   In file included from /Users/mattisonchao/Projects/apache/pulsar-client-cpp/tests/AcknowledgeTest.cc:19:
   In file included from /usr/local/include/gtest/gtest.h:65:
   In file included from /usr/local/include/gtest/gtest-death-test.h:43:
   In file included from /usr/local/include/gtest/internal/gtest-death-test-internal.h:47:
   In file included from /usr/local/include/gtest/gtest-matchers.h:48:
   In file included from /usr/local/include/gtest/gtest-printers.h:115:
   /usr/local/include/gtest/internal/gtest-internal.h:636:54: error: too few template arguments for class template 'less'
     typedef ::std::map<std::string, CodeLocation, std::less<>> RegisteredTestsMap;
                                                        ^
   /Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/c++/v1/__functional/operations.h:473:29: note: template is declared here
   struct _LIBCPP_TEMPLATE_VIS less
                               ^
   In file included from /Users/mattisonchao/Projects/apache/pulsar-client-cpp/tests/AcknowledgeTest.cc:19:
   In file included from /usr/local/include/gtest/gtest.h:65:
   In file included from /usr/local/include/gtest/gtest-death-test.h:43:
   In file included from /usr/local/include/gtest/internal/gtest-death-test-internal.h:47:
   In file included from /usr/local/include/gtest/gtest-matchers.h:48:
   In file included from /usr/local/include/gtest/gtest-printers.h:115:
   /usr/local/include/gtest/internal/gtest-internal.h:613:22: error: member reference base type 'testing::internal::TypedTestSuitePState::RegisteredTestsMap' (aka 'int') is not a structure or union
       registered_tests_.insert(
       ~~~~~~~~~~~~~~~~~^~~~~~~
   /usr/local/include/gtest/internal/gtest-internal.h:619:29: error: member reference base type 'const testing::internal::TypedTestSuitePState::RegisteredTestsMap' (aka 'const int') is not a structure or union
       return registered_tests_.count(test_name) > 0;
   ```
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
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: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] merlimat commented on issue #268: [Bug] C++ versions less than C++14 are not supported.

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on issue #268:
URL: https://github.com/apache/pulsar-client-cpp/issues/268#issuecomment-1548151994

   It seems this is to a newer version of GTest. You can also pass `cmake . -DBUILD_TESTS=OFF` to disable it.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] mattisonchao commented on issue #268: [Bug] C++ versions less than C++14 are not supported.

Posted by "mattisonchao (via GitHub)" <gi...@apache.org>.
mattisonchao commented on issue #268:
URL: https://github.com/apache/pulsar-client-cpp/issues/268#issuecomment-1548002793

   Changing the project version in the `CMakeLists.txt` from C++ 11 to C++ 14 can solve this problem. (workaround)


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] BewareMyPower closed issue #268: [Bug] C++ versions less than C++14 are not supported.

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower closed issue #268: [Bug]  C++ versions less than C++14 are not supported.
URL: https://github.com/apache/pulsar-client-cpp/issues/268


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] tisonkun commented on issue #268: [Bug] C++ versions less than C++14 are not supported.

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #268:
URL: https://github.com/apache/pulsar-client-cpp/issues/268#issuecomment-1548171915

   @merlimat we don't have a test for C++11, do we?
   
   If we write:
   
   ```
   set(CMAKE_CXX_STANDARD 11)
   set(CMAKE_C_STANDARD 11)
   ```
   
   Perhaps we should add a CI job to ensure that C++11 works (or it does work without tests?).


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-cpp] BewareMyPower commented on issue #268: [Bug] C++ versions less than C++14 are not supported.

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on issue #268:
URL: https://github.com/apache/pulsar-client-cpp/issues/268#issuecomment-1548740140

   @tisonkun These two lines (actually only the 1st line) means the build uses the C++11 standard. If a dependency requires C++14 or higher, it won't work. The existing CI jobs are already ensuring the C++11 works.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org