This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
hi,
May be it's not a stdc++ question, but why the first type of constructor
do not compile with g++? and why the second compile?
-------------------
include <utility>
class A
{
std::pair<char*, long> p;
public:
//A(std::pair<char*, long> r = std::pair<char*, long>(0, 0L));
A(std::pair<char*, long> r = std::make_pair((char*)(0), 0L));
};
A::A(std::pair<char*, long> r) : p(r) {}
int main()
{
A a;
return 0;
}
-------------------
Thanks in advance.
-- Levente "Si vis pacem para bellum!"
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |