diff --git a/cpp/include/cudf/scalar/scalar.hpp b/cpp/include/cudf/scalar/scalar.hpp index 0e14b0c6bf5..13a3da14cce 100644 --- a/cpp/include/cudf/scalar/scalar.hpp +++ b/cpp/include/cudf/scalar/scalar.hpp @@ -45,23 +45,10 @@ namespace cudf { */ class scalar { public: - virtual ~scalar() = default; - scalar(scalar&& other) = default; - + virtual ~scalar() = default; scalar& operator=(scalar const& other) = delete; scalar& operator=(scalar&& other) = delete; - /** - * @brief Construct a new scalar object by deep copying another. - * - * @param other The scalar to copy. - * @param stream CUDA stream used for device memory operations. - * @param mr Device memory resource to use for device memory allocation. - */ - scalar(scalar const& other, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, - rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); - /** * @brief Returns the scalar's logical value type. */ @@ -103,6 +90,19 @@ class scalar { scalar() = delete; + scalar(scalar&& other) = default; + + /** + * @brief Construct a new scalar object by deep copying another. + * + * @param other The scalar to copy. + * @param stream CUDA stream used for device memory operations. + * @param mr Device memory resource to use for device memory allocation. + */ + scalar(scalar const& other, + rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); + /** * @brief Construct a new scalar object. * diff --git a/cpp/tests/binaryop/binop-fixture.hpp b/cpp/tests/binaryop/binop-fixture.hpp index 25e1de2d368..65243b1ae2e 100644 --- a/cpp/tests/binaryop/binop-fixture.hpp +++ b/cpp/tests/binaryop/binop-fixture.hpp @@ -74,7 +74,7 @@ struct BinaryOperationTest : public cudf::test::BaseFixture { cudf::test::UniformRandomGenerator rand_gen(r_min, r_max); uint8_t size = rand_gen.generate(); std::string str{"ஔⒶbc⁂∰ൠ \tنж水✉♪✿™"}; - return cudf::scalar_type_t(string_view(str.data(), size)); + return cudf::scalar_type_t(str.substr(0, size)); } };