ICU-6765 Undo previous removal for definition of static class variable. Add #if statement instead.

X-SVN-Rev: 25548
This commit is contained in:
Michael Ow 2009-03-11 15:38:31 +00:00
parent 244696d03c
commit 8a6a82406d

View file

@ -40,4 +40,14 @@ StringPiece::StringPiece(const StringPiece& x, int32_t pos, int32_t len) {
length_ = len;
}
/* Microsft Visual Studios <= 8.0 complains about redefinition of this
* static const class variable. However, the C++ standard states that this
* definition is correct. Perhaps there is a bug in the Microsoft compiler.
* This is not an issue on any other compilers (that we know of) including
* Visual Studios 9.0.
*/
#if !defined(_MSC_VER) || (_MSC_VER >= 1500)
const int32_t StringPiece::npos;
#endif
U_NAMESPACE_END