This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
std::num_put<char, char*>
- From: Eddie <eddie at mailforce dot net>
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 11 Aug 2008 11:37:39 -0600
- Subject: std::num_put<char, char*>
- Reply-to: eddie at mailforce dot net
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