: m_path( path ), m_depth( path_get_depth( c_str() ) ){
}
Path( StringRange range )
- : m_path( range ), m_depth( path_get_depth( c_str() ) ){
+ : m_path( range.first, range.last ), m_depth( path_get_depth( c_str() ) ){
}
bool operator<( const Path& other ) const {
return string_less_nocase( c_str(), other.c_str() );
#if !defined( INCLUDED_GENERIC_ARRAYRANGE_H )
#define INCLUDED_GENERIC_ARRAYRANGE_H
+#include <string>
/// \file
/// \brief Macros for automatically converting a compile-time-sized array to a range.
}
Iterator first;
Iterator last;
+
+ operator std::basic_string<typename std::remove_cv<Element>::type>() const
+ {
+ return std::basic_string<typename std::remove_cv<Element>::type>(first, last);
+ }
};
template<typename Element>
#include "string.h"
+/// \note Never called...
void TestString(){
CopiedString bleh( "bleh" );
- SmartString blah( "blah" );
-}
\ No newline at end of file
+ //SmartString blah( "blah" );
+}
}
};
+#if 0
/// \brief A non-mutable c-style string.
///
/// \param Buffer The string storage implementation. Must be DefaultConstructible, CopyConstructible and Assignable. Must implement:
/// \brief A non-mutable string which uses copy-by-value for assignment.
typedef String< CopiedBuffer< DefaultAllocator<char> > > CopiedString;
-
/// \brief A non-mutable string buffer which uses reference-counting to avoid unnecessary allocations.
template<typename Allocator>
class SmartBuffer : private Allocator
/// \brief A non-mutable string which uses copy-by-reference for assignment of SmartString.
typedef String< SmartBuffer< DefaultAllocator<char> > > SmartString;
+#endif
+
+typedef std::string CopiedString;
class StringEqualNoCase
{
#if !defined( INCLUDED_STRING_STRINGFWD_H )
#define INCLUDED_STRING_STRINGFWD_H
+#include <string>
+
// forward-declaration of CopiedString
template<typename Type>
class DefaultAllocator;
-template<typename Allocator>
+/*template<typename Allocator>
class CopiedBuffer;
template<typename Buffer>
class String;
-typedef String< CopiedBuffer< DefaultAllocator<char> > > CopiedString;
+typedef String< CopiedBuffer< DefaultAllocator<char> > > CopiedString;*/
+typedef std::string CopiedString;
#endif