YSTest: Convert.hpp 源文件

YSTest PreAlpha_b400_20130424 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

全部 类 命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 组 页
Convert.hpp
浏览该文件的文档.
1 ﻿/*
2 Copyright by FrankHB 2013.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef CHRLIB_INC_Convert_hpp_
29 #define CHRLIB_INC_Convert_hpp_ 1
30
31 #include "chrmap.h"
32 #include <ystdex/any_iterator.hpp> // for ystdex::input_monomorphic_iterator;
33
34 CHRLIB_BEGIN
35
36 template<typename _tIn, typename _fConv>
37 ConversionResult
38 ConvertCharacter(_fConv f, ucs2_t& uc, _tIn&& it, ConversionState&& st)
39 {
40 return f(uc, ystdex::input_monomorphic_iterator(std::ref(it)),
41 std::move(st));
42 }
43 template<typename _tIn, typename _fConv>
44 ConversionResult
45 ConvertCharacter(_fConv f, _tIn&& it, ConversionState&& st)
46 {
47 return f(ystdex::input_monomorphic_iterator(std::ref(it)), std::move(st));
48 }
49
50 CHRLIB_END
51
52 #endif
53