forked from Alepha/Alepha
Rename string gen to IOStreams::String
.
This commit is contained in:
@ -10,7 +10,7 @@ static_assert( __cplusplus > 2020'00 );
|
||||
#include <Alepha/auto_comparable.h>
|
||||
|
||||
#include <Alepha/IOStreams/delimiters.h>
|
||||
#include <Alepha/IOStreams/Stream.h>
|
||||
#include <Alepha/IOStreams/String.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -59,7 +59,7 @@ static auto init= Alepha::Utility::enroll <=[]
|
||||
{
|
||||
using namespace Alepha::Testing::exports;
|
||||
using namespace Alepha::Testing::literals::test_literals;
|
||||
using namespace Alepha::IOStreams::exports::stream;
|
||||
using namespace Alepha::IOStreams::exports::string;
|
||||
|
||||
"Simple OStream (default delimiter)"_test <=TableTest< stringify_default >
|
||||
::Cases
|
||||
@ -80,9 +80,9 @@ static auto init= Alepha::Utility::enroll <=[]
|
||||
<
|
||||
[]( const Agg agg, const std::string delim )
|
||||
{
|
||||
using Alepha::IOStreams::Stream;
|
||||
using Alepha::IOStreams::String;
|
||||
using Alepha::IOStreams::setFieldDelimiter;
|
||||
return Stream{} << setFieldDelimiter( delim ) << agg << FinishString;
|
||||
return String{} << setFieldDelimiter( delim ) << agg << FinishString;
|
||||
}
|
||||
>
|
||||
::Cases
|
||||
|
@ -8,18 +8,18 @@ static_assert( __cplusplus > 2020'00 );
|
||||
|
||||
#include <Alepha/Concepts.h>
|
||||
|
||||
namespace Alepha::Hydrogen::IOStreams ::detail:: stream
|
||||
namespace Alepha::Hydrogen::IOStreams ::detail:: string
|
||||
{
|
||||
inline namespace exports
|
||||
{
|
||||
class Stream;
|
||||
class String;
|
||||
|
||||
enum { FinishString };
|
||||
|
||||
std::string stringify( const Alepha::OStreamable auto &item, Alepha::OStreamable auto && ... params );
|
||||
}
|
||||
|
||||
class exports::Stream
|
||||
class exports::String
|
||||
{
|
||||
private:
|
||||
// TODO: We need the exception throwing capabilities of the
|
||||
@ -29,7 +29,7 @@ namespace Alepha::Hydrogen::IOStreams ::detail:: stream
|
||||
std::ostringstream oss;
|
||||
|
||||
public:
|
||||
Stream &&
|
||||
String &&
|
||||
operator << ( const Alepha::OStreamable auto &t ) &&
|
||||
{
|
||||
oss << t;
|
||||
@ -51,11 +51,11 @@ namespace Alepha::Hydrogen::IOStreams ::detail:: stream
|
||||
inline std::string
|
||||
exports::stringify( const Alepha::OStreamable auto &item, Alepha::OStreamable auto && ... params )
|
||||
{
|
||||
return ( Stream{} << ... << params ) << item << FinishString;
|
||||
return ( String{} << ... << params ) << item << FinishString;
|
||||
}
|
||||
}
|
||||
|
||||
namespace Alepha::Hydrogen::IOStreams::inline exports::inline stream
|
||||
namespace Alepha::Hydrogen::IOStreams::inline exports::inline string
|
||||
{
|
||||
using namespace detail::stream::exports;
|
||||
using namespace detail::string::exports;
|
||||
}
|
Reference in New Issue
Block a user