void to_view_test()
{
   const boost::container::string s = "some text";
   boost::string_view sv(s.to_view<boost::string_view>());
   BOOST_TEST(s.data() == sv.data() && s.size() == sv.size());
   boost::string_view sv2;
   sv2 = s.to_view<boost::string_view>();
   BOOST_TEST(s.data() == sv2.data() && s.size() == sv2.size());
   const boost::string_view csv(s.to_view<boost::string_view>());
   BOOST_TEST(s.data() == csv.data() && s.size() == csv.size());
}
Esempio n. 2
0
 inline auto get_text_extent_point(::HDC const hDC, boost::string_view const str) {
     SIZE size;
     GetTextExtentPoint32(hDC, str.data(), str.size(), &size);
     return size;
 }