1 // (C) Copyright Gennadiy Rozental 2001-2015. 2 // Distributed under the Boost Software License, Version 1.0. 3 // (See accompanying file LICENSE_1_0.txt or copy at 4 // http://www.boost.org/LICENSE_1_0.txt) 5 // 6 // See http://www.boost.org/libs/test for the library home page. 7 // 8 9 //[snippet14 10 class const_string { 11 public: 12 // Constructors 13 const_string(); 14 const_string( std::string const& s ) 15 const_string( char const* s ); 16 const_string( char const* s, size_t length ); 17 const_string( char const* begin, char const* end ); 18 19 // Access methods 20 char const* data() const; 21 size_t length() const; 22 bool is_empty() const; 23 24 // ... 25 }; 26 //] 27