1 #ifndef __cxxtest_StdValueTraits_h__
2 #define __cxxtest_StdValueTraits_h__
13 #ifdef _CXXTEST_OLD_STD
14 # define CXXTEST_STD(x) x
15 #else // !_CXXTEST_OLD_STD
16 # define CXXTEST_STD(x) std::x
17 #endif // _CXXTEST_OLD_STD
19 #ifndef CXXTEST_USER_VALUE_TRAITS
37 const char *
asString()
const {
return _s.c_str(); }
53 for (
unsigned i = 0;
i < s.length(); ++
i ) {
54 char c[
sizeof(
"\\xXX")];
64 #ifndef _CXXTEST_OLD_STD
75 for (
unsigned i = 0;
i < s.length(); ++
i ) {
76 char c[
sizeof(
"\\x12345678")];
85 #endif // _CXXTEST_OLD_STD
91 template<
class Stream,
class Iterator>
95 while ( first != last ) {
98 s << ((first ==
last) ?
" }" :
", ");
102 #ifdef _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION
106 template<
class First,
class Second>
107 class ValueTraits<
CXXTEST_STD(pair)<First, Second> > :
public StdTraitsBase
110 ValueTraits(
const CXXTEST_STD(pair)<First, Second> &
p )
119 template<
class Element>
120 class ValueTraits<
CXXTEST_STD(vector)<Element> > :
public StdTraitsBase
132 template<
class Element>
133 class ValueTraits<
CXXTEST_STD(list)<Element> > :
public StdTraitsBase
145 template<
class Element>
146 class ValueTraits<
CXXTEST_STD(set)<Element> > :
public StdTraitsBase
158 template<
class Key,
class Value>
159 class ValueTraits<
CXXTEST_STD(
map)<Key, Value> > :
public StdTraitsBase
171 template<
class Element>
172 class ValueTraits<
CXXTEST_STD(deque)<Element> > :
public StdTraitsBase
175 ValueTraits(
const CXXTEST_STD(deque)<Element> &d )
184 template<
class Element>
185 class ValueTraits<
CXXTEST_STD(multiset)<Element> > :
public StdTraitsBase
188 ValueTraits(
const CXXTEST_STD(multiset)<Element> &ms )
190 dumpRange( *
this, ms.begin(), ms.end() );
197 template<
class Key,
class Value>
198 class ValueTraits<
CXXTEST_STD(multimap)<Key, Value> > :
public StdTraitsBase
201 ValueTraits(
const CXXTEST_STD(multimap)<Key, Value> &mm )
203 dumpRange( *
this, mm.begin(), mm.end() );
210 template<
class Number>
211 class ValueTraits<
CXXTEST_STD(complex)<Number> > :
public StdTraitsBase
214 ValueTraits(
const CXXTEST_STD(complex)<Number> &c )
218 else if ( !c.real() )
224 #endif // _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION
227 #endif // CXXTEST_USER_VALUE_TRAITS
229 #endif // __cxxtest_StdValueTraits_h__
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
CXXTEST_COPY_CONST_TRAITS(CXXTEST_STD(string))
void dumpRange(Stream &s, Iterator first, Iterator last)
char * charToString(unsigned long c, char *s)
ValueTraits(const CXXTEST_STD(basic_string< wchar_t >)&s)
ValueTraits(const CXXTEST_STD(string)&s)
const char * asString() const
#define CXXTEST_TEMPLATE_INSTANTIATION
StdTraitsBase & operator<<(const CXXTEST_STD(string)&s)
const Variable & v
< [in] a sqrfree bivariate poly