This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a3f828  ARROW-6647: [C++] Stop using member initializer for shared_ptr
6a3f828 is described below

commit 6a3f828b468fc3e2e107b7590ab30bb94c8edb01
Author: Sutou Kouhei <[email protected]>
AuthorDate: Sat Sep 21 19:26:29 2019 -0500

    ARROW-6647: [C++] Stop using member initializer for shared_ptr
    
    It doesn't work with g++ 4.8.5 on CentOS 7:
    
        % g++ --version
        g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
        Copyright (C) 2015 Free Software Foundation, Inc.
        This is free software; see the source for copying conditions.  There is 
NO
        warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.
    
    Error message:
    
        
/root/rpmbuild/BUILD/apache-arrow-0.15.0/cpp/src/arrow/python/python_to_arrow.cc:
 In instantiation of 'arrow::Status arrow::py::GetConverterFlat(const 
std::shared_ptr<arrow::DataType>&, bool, 
std::unique_ptr<arrow::py::SeqConverter>*) [with arrow::py::NullCoding 
null_coding = (arrow::py::NullCoding)1]':
        
/root/rpmbuild/BUILD/apache-arrow-0.15.0/cpp/src/arrow/python/python_to_arrow.cc:1001:5:
   required from here
        
/root/rpmbuild/BUILD/apache-arrow-0.15.0/cpp/src/arrow/python/python_to_arrow.cc:864:7:
 error: conversion from 'std::nullptr_t' to non-scalar type 
'std::shared_ptr<arrow::DecimalType>' requested
         class DecimalConverter
               ^
        
/root/rpmbuild/BUILD/apache-arrow-0.15.0/cpp/src/arrow/python/python_to_arrow.cc:894:10:
 note: synthesized method 
'arrow::py::DecimalConverter<(arrow::py::NullCoding)1>::DecimalConverter()' 
first required here
             *out = std::unique_ptr<SeqConverter>(new TYPE_CLASS<null_coding>); 
\
                  ^
        
/root/rpmbuild/BUILD/apache-arrow-0.15.0/cpp/src/arrow/python/python_to_arrow.cc:915:5:
 note: in expansion of macro 'SIMPLE_CONVERTER_CASE'
             SIMPLE_CONVERTER_CASE(DECIMAL, DecimalConverter);
             ^
        
/root/rpmbuild/BUILD/apache-arrow-0.15.0/cpp/src/arrow/python/python_to_arrow.cc:
 In instantiation of 'arrow::Status arrow::py::GetConverterFlat(const 
std::shared_ptr<arrow::DataType>&, bool, 
std::unique_ptr<arrow::py::SeqConverter>*) [with arrow::py::NullCoding 
null_coding = (arrow::py::NullCoding)0]':
        
/root/rpmbuild/BUILD/apache-arrow-0.15.0/cpp/src/arrow/python/python_to_arrow.cc:1004:5:
   required from here
        
/root/rpmbuild/BUILD/apache-arrow-0.15.0/cpp/src/arrow/python/python_to_arrow.cc:864:7:
 error: conversion from 'std::nullptr_t' to non-scalar type 
'std::shared_ptr<arrow::DecimalType>' requested
         class DecimalConverter
               ^
        
/root/rpmbuild/BUILD/apache-arrow-0.15.0/cpp/src/arrow/python/python_to_arrow.cc:894:10:
 note: synthesized method 
'arrow::py::DecimalConverter<(arrow::py::NullCoding)0>::DecimalConverter()' 
first required here
             *out = std::unique_ptr<SeqConverter>(new TYPE_CLASS<null_coding>); 
\
                  ^
        
/root/rpmbuild/BUILD/apache-arrow-0.15.0/cpp/src/arrow/python/python_to_arrow.cc:915:5:
 note: in expansion of macro 'SIMPLE_CONVERTER_CASE'
             SIMPLE_CONVERTER_CASE(DECIMAL, DecimalConverter);
             ^
    
    Closes #5456 from kou/cpp-stop-using-member-initializer-for-shared-ptr and 
squashes the following commits:
    
    8f3e2d6d6 <Sutou Kouhei> Remove needless constructor
    e10372ea1 <Sutou Kouhei>  Stop using member initializer for shared_ptr
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Wes McKinney <[email protected]>
---
 cpp/src/arrow/python/python_to_arrow.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpp/src/arrow/python/python_to_arrow.cc 
b/cpp/src/arrow/python/python_to_arrow.cc
index 0a39bfe..c841f5b 100644
--- a/cpp/src/arrow/python/python_to_arrow.cc
+++ b/cpp/src/arrow/python/python_to_arrow.cc
@@ -881,7 +881,7 @@ class DecimalConverter
   }
 
  private:
-  std::shared_ptr<DecimalType> decimal_type_ = nullptr;
+  std::shared_ptr<DecimalType> decimal_type_;
 };
 
 #define NUMERIC_CONVERTER(TYPE_ENUM, TYPE)                                     
    \

Reply via email to