BIND 10 #2081: EXPECT_EQ worry

BIND 10 Development do-not-reply at isc.org
Tue Jul 3 22:46:56 UTC 2012


#2081: EXPECT_EQ worry
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  UnAssigned
  fdupont                            |                Status:  new
                       Type:         |             Milestone:
  defect                             |            Resolution:
                   Priority:         |             Sensitive:  0
  medium                             |           Sub-Project:  Core
                  Component:         |  Estimated Difficulty:  3
  libdns++                           |           Total Hours:  0
                   Keywords:         |
            Defect Severity:  N/A    |
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by fdupont):

 The error occurs only with VS 2008 (2010 doesn't even emit a warning, I
 can try 2012 beta if you want), the output is (twice?):

 {{{
 c:\cygwin\home\dupont\bind10\src\lib\dns\tests\rdata_nsec3param_like_unittest.cc(178)
 : error C2355: 'this' : can only be referenced inside non-static member
 functions
 c:\cygwin\home\dupont\bind10\src\lib\dns\tests\rdata_nsec3param_like_unittest.cc(176)
 : while compiling class template member function 'void `anonymous-
 namespace'::NSEC3PARAMLikeTest_toText_Test<gtest_TypeParam_>::TestBody(void)'
         with
         [
             gtest_TypeParam_=Type
         ]
         c:\cygwin\home\dupont\gtest\include\gtest\internal\gtest-
 internal.h(661) : see reference to class template instantiation
 '`anonymous-namespace'::NSEC3PARAMLikeTest_toText_Test<gtest_TypeParam_>'
 being compiled
         with
         [
             gtest_TypeParam_=Type
         ]
         c:\cygwin\home\dupont\gtest\include\gtest\internal\gtest-
 internal.h(647) : while compiling class template member function 'bool
 testing::internal::TypeParameterizedTest<Fixture,TestSel,Types>::Register(const
 char *,const char *,const char *,int)'
         with
         [
             Fixture=`anonymous-namespace'::NSEC3PARAMLikeTest,
             TestSel=testing::internal::TemplateSel<`anonymous-
 namespace'::NSEC3PARAMLikeTest_toText_Test>,
             Types=`anonymous-
 namespace'::gtest_type_params_NSEC3PARAMLikeTest_
         ]
 c:\cygwin\home\dupont\bind10\src\lib\dns\tests\rdata_nsec3param_like_unittest.cc(176)
 : see reference to class template instantiation
 'testing::internal::TypeParameterizedTest<Fixture,TestSel,Types>' being
 compiled
         with
         [
             Fixture=`anonymous-namespace'::NSEC3PARAMLikeTest,
             TestSel=testing::internal::TemplateSel<`anonymous-
 namespace'::NSEC3PARAMLikeTest_toText_Test>,
             Types=`anonymous-
 namespace'::gtest_type_params_NSEC3PARAMLikeTest_
         ]
 c:\cygwin\home\dupont\bind10\src\lib\dns\tests\rdata_nsec3param_like_unittest.cc(178)
 : error C2227: left of '->salt_txt' must point to
 class/struct/union/generic type
 c:\cygwin\home\dupont\bind10\src\lib\dns\tests\rdata_nsec3param_like_unittest.cc(178)
 : error C2955: 'testing::internal::EqHelper' : use of class template
 requires template argument list
         c:\cygwin\home\dupont\gtest\include\gtest\gtest.h(1344) : see
 declaration of 'testing::internal::EqHelper'
 }}}

 BTW the problem is from the first/left **this**, i.e., it is enough to put
 the value in an intermediate variable (so this should answer to your
 concern with EXPECT_TRUE()).

-- 
Ticket URL: <http://bind10.isc.org/ticket/2081#comment:7>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list