This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

std::num_put<char, char*>


According to most of what I have read, the std::num_put facet should
function with any output iterator but it appears the libstdc++
implementation only has a specialization for std::ostreambuf_iterator.
Is this an oversight or was it done on purpose?

Running the following simple code on many different compilers prints
true but g++ returns false.

#include <locale>
#include <iostream>

int main()
{
	using namespace std;
	bool result=has_facet<num_put<char, char*> >(locale());
	cout << boolalpha << result << '\n';
	return 0;
}

I have tried it with many other iterators other than char* like
std::vector<char>::iterator and the such; no luck in gcc.
--
	Eddie


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]