pdidev / pdi

The PDI Data Interface
https://pdi.dev
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Compilation issue #426

Closed jbigot closed 2 months ago

jbigot commented 2 years ago
[ 75%] Building CXX object tests/CMakeFiles/serialize_tests.dir/serialize_tests.cxx.o
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx: In member function 'virtual void serialize_test_03_Test::TestBody()':
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:584:14: error: 'unique_ptr' is not a member of 'std'
  584 |         std::unique_ptr<double> pointer {new double};
      |              ^~~~~~~~~~
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:31:1: note: 'std::unique_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
   30 | #include <stddef.h>
  +++ |+#include <memory>
   31 | #include <stdio.h>
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:584:25: error: expected primary-expression before 'double'
  584 |         std::unique_ptr<double> pointer {new double};
      |                         ^~~~~~
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:585:14: error: 'unique_ptr' is not a member of 'std'
  585 |         std::unique_ptr<int[]> array {new int[8]};
      |              ^~~~~~~~~~
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:585:14: note: 'std::unique_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:585:25: error: expected primary-expression before 'int'
  585 |         std::unique_ptr<int[]> array {new int[8]};
      |                         ^~~
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:586:26: error: 'array' was not declared in this scope; did you mean 'std::array'?
  586 |         int* array_ptr = array.get();
      |                          ^~~~~
      |                          std::array
In file included from /tmp/tmp.v2PGic8C4i/build-dep/include/gtest/internal/gtest-port.h:677,
                 from /tmp/tmp.v2PGic8C4i/build-dep/include/gtest/internal/gtest-internal.h:40,
                 from /tmp/tmp.v2PGic8C4i/build-dep/include/gtest/gtest.h:58,
                 from /home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:28:
/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/gcc-12.1.0-dsrj7g5a3jok5v2h55wg33iyt6p33r7q/lib/gcc/x86_64-pc-linux-gnu/12.1.0/../../../../include/c++/12.1.0/tuple:1595:45: note: 'std::array' declared here
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:588:14: error: 'unique_ptr' is not a member of 'std'
  588 |         std::unique_ptr<int*[]> pointer_array {new int*[8]};
      |              ^~~~~~~~~~
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:588:14: note: 'std::unique_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:588:25: error: expected primary-expression before 'int'
  588 |         std::unique_ptr<int*[]> pointer_array {new int*[8]};
      |                         ^~~
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:591:17: error: 'pointer_array' was not declared in this scope; did you mean 'pointer_to_array'?
  591 |                 pointer_array[i] = new int;
      |                 ^~~~~~~~~~~~~
      |                 pointer_to_array
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:596:10: error: 'pointer' was not declared in this scope
  596 |         *pointer = 1.234;
      |          ^~~~~~~
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:601:19: error: 'pointer_array' was not declared in this scope; did you mean 'pointer_to_array'?
  601 |                 *(pointer_array[i]) = 42 + i;
      |                   ^~~~~~~~~~~~~
      |                   pointer_to_array
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:607:36: error: 'pointer_array' was not declared in this scope; did you mean 'pointer_to_array'?
  607 |         PDI_share("pointer_array", pointer_array.get(), PDI_OUT);
      |                                    ^~~~~~~~~~~~~
      |                                    pointer_to_array
In file included from /tmp/tmp.v2PGic8C4i/build-dep/include/gtest/gtest.h:1874:
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:617:9: error: template argument 1 is invalid
  617 |         EXPECT_EQ(*pointer, *pointer_serialized);
      |         ^~~~~~~~~
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:620:17: error: template argument 1 is invalid
  620 |                 EXPECT_EQ(array[i], pointer_to_array_serialized[i]);
      |                 ^~~~~~~~~
/home/ci/pdi-master/plugins/serialize/tests/serialize_tests.cxx:624:17: error: template argument 1 is invalid
  624 |                 EXPECT_EQ(*(pointer_array[i]), pointer_array_serialized[i]);
      |                 ^~~~~~~~~
jbigot commented 2 years ago

mentioned in commit decebaf995f823bef0112a638104783a5ddca8cf