/**
This file is a part of rexy's general purpose library
Copyright (C) 2022 rexy712
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#ifndef REXY_DETAIL_FORMAT_FORMAT_CONTEXT_TPP
#define REXY_DETAIL_FORMAT_FORMAT_CONTEXT_TPP
#include "format_context.hpp"
#include "format_args.hpp"
#include //move
#include //size_t
#include //locale
namespace rexy::fmt{
///////////////////////////////basic_format_context////////////////////////////////
template
basic_format_context::basic_format_context(basic_format_args fmt_args, iterator outit):
m_fmt_args(fmt_args),
m_outit(outit){}
template
basic_format_context::basic_format_context(basic_format_args fmt_args, iterator outit, const std::locale& l):
m_fmt_args(fmt_args),
m_outit(outit),
m_locale(l){}
template
auto basic_format_context::arg(std::size_t id)const -> basic_format_arg{
return m_fmt_args.get(id);
}
template
auto basic_format_context::arg(const char_type* first, const char_type* last)const -> basic_format_arg{
return m_fmt_args.get(first, last);
}
template
std::size_t basic_format_context::arg_index(const char_type* first, const char_type* last)const{
return m_fmt_args.get_index(first, last);
}
template
std::locale basic_format_context::locale(void){
return m_locale;
}
template
auto basic_format_context::out(void) -> iterator{
return std::move(m_outit);
}
template
void basic_format_context::advance_to(iterator it){
m_outit = std::move(it);
}
}
#endif