]> Dogcows Code - chaz/yoink/blob - src/stlplus/strings/string_bitset.tpp
build system enhancements
[chaz/yoink] / src / stlplus / strings / string_bitset.tpp
1 ////////////////////////////////////////////////////////////////////////////////
2
3 // Author: Andy Rushton
4 // Copyright: (c) Southampton University 1999-2004
5 // (c) Andy Rushton 2004-2009
6 // License: BSD License, see ../docs/license.html
7
8 ////////////////////////////////////////////////////////////////////////////////
9
10 namespace stlplus
11 {
12
13 template<size_t N>
14 std::string bitset_to_string(const std::bitset<N>& data)
15 {
16 std::string result;
17 for (unsigned i = data.size(); i--; )
18 result += data.test(i) ? '1' : '0';
19 return result;
20 }
21
22 } // end namespace stlplus
This page took 0.034355 seconds and 4 git commands to generate.