Duplicated declaration in ts.hpp

asked 2014-02-10 01:03:19 -0500

salkuma gravatar image

updated 2014-02-10 01:03:47 -0500

Hi all. I found a sort of duplicated declaration while I was digging opencv test code. I use Windows7 + cmake + vs2012 with opencv 2.4.7. In ts.hpp,

// ts.hpp
// ...
namespace cvtest {
// ...
class CV_EXPORTS TS;                   // declare
// ...
class BaseTest;                        // declare
class TS;                              // duplicated declare (?)
// ...
class CV_EXPORTS TS { /* ... */ }                // definition
class CV_EXPORTS BaseTest { /* ... */ }          // definition
// ...
}
// ...

So, I deleted "class BaseTest;" and "class TS;" lines then compiled. Everything was going well. Are there other reasons for remaining these?

edit retag flag offensive close merge delete