1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
--- a/include/cxxtools/iostream.h
+++ b/include/cxxtools/iostream.h
@@ -56,7 +56,7 @@ class BasicIStream : public std::basic_i
{
BasicStreamBuffer<CharT>* tmp = _buffer;
_buffer = buffer;
- rdbuf(buffer);
+ this->rdbuf(buffer);
return tmp;
}
@@ -106,7 +106,7 @@ class BasicOStream : public std::basic_o
{
BasicStreamBuffer<CharT>* tmp = _buffer;
_buffer = buffer;
- rdbuf(buffer);
+ this->rdbuf(buffer);
return tmp;
}
@@ -152,7 +152,7 @@ class BasicIOStream : public std::basic_
{
BasicStreamBuffer<CharT>* tmp = _buffer;
_buffer = buffer;
- rdbuf(buffer);
+ this->rdbuf(buffer);
return tmp;
}
--- a/include/cxxtools/textstream.h
+++ b/include/cxxtools/textstream.h
@@ -84,14 +84,14 @@ class BasicTextIStream : public std::bas
: std::basic_istream<intern_type>(0)
, _buffer( &is, codec )
{
- init(&_buffer);
+ this->init(&_buffer);
}
explicit BasicTextIStream(CodecType* codec)
: std::basic_istream<intern_type>(0)
, _buffer( 0, codec )
{
- init(&_buffer);
+ this->init(&_buffer);
}
//! @brief Deletes to codec.
@@ -170,12 +170,12 @@ class BasicTextOStream : public std::bas
BasicTextOStream(StreamType& os, CodecType* codec)
: std::basic_ostream<intern_type>(0)
, _buffer( &os , codec )
- { init(&_buffer); }
+ { this->init(&_buffer); }
explicit BasicTextOStream(CodecType* codec)
: std::basic_ostream<intern_type>(0)
, _buffer( 0 , codec )
- { init(&_buffer); }
+ { this->init(&_buffer); }
//! @brief Deletes to codec.
~BasicTextOStream()
@@ -253,12 +253,12 @@ class BasicTextStream : public std::basi
BasicTextStream(StreamType& ios, CodecType* codec)
: std::basic_iostream<intern_type>(0)
, _buffer( &ios, codec)
- { init(&_buffer); }
+ { this->init(&_buffer); }
explicit BasicTextStream(CodecType* codec)
: std::basic_iostream<intern_type>(0)
, _buffer(0, codec)
- { init(&_buffer); }
+ { this->init(&_buffer); }
//! @brief Deletes the codec.
~BasicTextStream()
--- a/include/cxxtools/streamcounter.h
+++ b/include/cxxtools/streamcounter.h
@@ -69,7 +69,7 @@ namespace cxxtools
BasicStreamcounter()
: std::basic_ostream<CharType, Traits>(0)
{
- init(&streambuf);
+ this->init(&streambuf);
}
unsigned getCount() const { return streambuf.getCount(); }
--- a/include/cxxtools/smartptr.h
+++ b/include/cxxtools/smartptr.h
@@ -249,14 +249,14 @@ namespace cxxtools
{ ownershipPolicyType::link(ptr, ptr.object); }
~SmartPtr()
{ if (ownershipPolicyType::unlink(object))
- destroy(object); }
+ this->destroy(object); }
SmartPtr& operator= (const SmartPtr& ptr)
{
if (object != ptr.object)
{
if (ownershipPolicyType::unlink(object))
- destroy(object);
+ this->destroy(object);
object = ptr.object;
--- a/include/cxxtools/query_params.h
+++ b/include/cxxtools/query_params.h
@@ -231,7 +231,7 @@ class QueryParams
: unnamed_params(src.unnamed_params),
named_params(src.named_params),
parent(src.parent),
- use_parent_values(use_parent_values)
+ use_parent_values(src.use_parent_values)
{ }
/// returns the parent-object
@@ -332,8 +332,15 @@ class QueryParams
//
/// get named parameter.
+#if 0 // XXX this will return a temporary object for def with clang
const string& param(const string& name, size_type n = 0,
const string& def = std::string()) const
+#else
+ static const std::string emptystring;
+
+ const string& param(const string& name, size_type n = 0,
+ const string& def = emptystring) const
+#endif
{
named_params_type::const_iterator i = named_params.find(name);
if (i != named_params.end() && n < i->second.size())
--- a/src/query_params.cpp
+++ b/src/query_params.cpp
@@ -164,6 +164,10 @@ void _parse_url(
}
}
+#if 1 // XXX clang problem, see query_params.h
+const std::string QueryParams::emptystring;
+#endif
+
void QueryParams::parse_url(const std::string& url)
{
_parse_url(url.begin(), url.end(), unnamed_params, named_params);
|