Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: Source/wtf/text/WTFString.h

Issue 1257203002: Fix ODR violation that can break WTF::String pretty printing in tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Really fix Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/wtf/text/StringBuilderTest.cpp ('k') | Source/wtf/wtf.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #ifndef WTFString_h 22 #ifndef WTFString_h
23 #define WTFString_h 23 #define WTFString_h
24 24
25 // This file would be called String.h, but that conflicts with <string.h> 25 // This file would be called String.h, but that conflicts with <string.h>
26 // on systems without case-sensitive file systems. 26 // on systems without case-sensitive file systems.
27 27
28 #include "wtf/HashTableDeletedValueType.h" 28 #include "wtf/HashTableDeletedValueType.h"
29 #include "wtf/WTFExport.h" 29 #include "wtf/WTFExport.h"
30 #include "wtf/testing/WTFUnitTestHelpersExport.h"
30 #include "wtf/text/ASCIIFastPath.h" 31 #include "wtf/text/ASCIIFastPath.h"
31 #include "wtf/text/StringImpl.h" 32 #include "wtf/text/StringImpl.h"
32 #include "wtf/text/StringView.h" 33 #include "wtf/text/StringView.h"
33 #include <algorithm> 34 #include <algorithm>
35 #include <iosfwd>
34 36
35 #ifdef __OBJC__ 37 #ifdef __OBJC__
36 #include <objc/objc.h> 38 #include <objc/objc.h>
37 #endif 39 #endif
38 40
39 namespace WTF { 41 namespace WTF {
40 42
41 class CString; 43 class CString;
42 struct StringHash; 44 struct StringHash;
43 45
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 template<typename T> struct DefaultHash; 628 template<typename T> struct DefaultHash;
627 template<> struct DefaultHash<String> { 629 template<> struct DefaultHash<String> {
628 typedef StringHash Hash; 630 typedef StringHash Hash;
629 }; 631 };
630 632
631 // Shared global empty string. 633 // Shared global empty string.
632 WTF_EXPORT const String& emptyString(); 634 WTF_EXPORT const String& emptyString();
633 WTF_EXPORT const String& emptyString16Bit(); 635 WTF_EXPORT const String& emptyString16Bit();
634 WTF_EXPORT extern const String& xmlnsWithColon; 636 WTF_EXPORT extern const String& xmlnsWithColon;
635 637
638 // Pretty printer for gtest. Declared here to avoid ODR violations.
639 WTF_UNITTEST_HELPERS_EXPORT std::ostream& operator<<(std::ostream&, const String &);
Julien - ping for review 2015/07/28 17:35:32 It seems to me that we would benefit from a printe
640
636 } // namespace WTF 641 } // namespace WTF
637 642
638 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(String); 643 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(String);
639 644
640 using WTF::CString; 645 using WTF::CString;
641 using WTF::KeepTrailingZeros; 646 using WTF::KeepTrailingZeros;
642 using WTF::StrictUTF8Conversion; 647 using WTF::StrictUTF8Conversion;
643 using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD; 648 using WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD;
644 using WTF::String; 649 using WTF::String;
645 using WTF::emptyString; 650 using WTF::emptyString;
(...skipping 12 matching lines...) Expand all
658 using WTF::charactersToFloat; 663 using WTF::charactersToFloat;
659 using WTF::equal; 664 using WTF::equal;
660 using WTF::equalIgnoringCase; 665 using WTF::equalIgnoringCase;
661 using WTF::find; 666 using WTF::find;
662 using WTF::isAllSpecialCharacters; 667 using WTF::isAllSpecialCharacters;
663 using WTF::isSpaceOrNewline; 668 using WTF::isSpaceOrNewline;
664 using WTF::reverseFind; 669 using WTF::reverseFind;
665 670
666 #include "wtf/text/AtomicString.h" 671 #include "wtf/text/AtomicString.h"
667 #endif // WTFString_h 672 #endif // WTFString_h
OLDNEW
« no previous file with comments | « Source/wtf/text/StringBuilderTest.cpp ('k') | Source/wtf/wtf.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698