unittest/heap_test.cc
static void ConstRefTest(const DoublePtr& ptr1) {
  DoublePtr ptr2(ptr1);  // Compiler error here.
  EXPECT_EQ(&ptr2, ptr2.OtherEnd()->OtherEnd());
  EXPECT_TRUE(ptr1.OtherEnd() == nullptr);
}
// Helper checks that the compiler rejects use of a copy constructor with
// a const argument and the default copy constructor is properly hidden by
// the non-const version.
Helper checks that the compiler rejects use of a copy constructor with
a const argument and the default copy constructor is properly hidden by
the non-const version.
Helper checks that the compiler rejects use of a copy constructor with a const argument and the default copy constructor is properly hidden by the non - const version .
static void ConstRefTest(const DoublePtr& ptr1) {
  DoublePtr ptr2(ptr1);  
  EXPECT_EQ(&ptr2, ptr2.OtherEnd()->OtherEnd());
  EXPECT_TRUE(ptr1.OtherEnd() == nullptr);
}
static void ConstRefTest ( const DoublePtr & ptr1 ) { DoublePtr ptr2 ( ptr1 ) ; EXPECT_EQ ( & ptr2 , ptr2 . OtherEnd ( ) -> OtherEnd ( ) ) ; EXPECT_TRUE ( ptr1 . OtherEnd ( ) == nullptr ) ; }
Helper checks that the compiler rejects use of a copy constructor with
a const argument and the default copy constructor is properly hidden by
the non-const version.
Helper checks that the compiler rejects use of a copy constructor with a const argument and the default copy constructor is properly hidden by the non - const version .
// Compiler error here.