DxLibEx
tchar.hpp
Go to the documentation of this file.
1 /*=============================================================================
2  Copyright (C) 2015-2017 DxLibEx project
3  https://github.com/Nagarei/DxLibEx/
4 
5  Distributed under the Boost Software License, Version 1.0.
6  (See http://www.boost.org/LICENSE_1_0.txt)
7 =============================================================================*/
8 #ifndef DXLE_INC_BASIC_TYPES_TCHAR_HPP_
9 #define DXLE_INC_BASIC_TYPES_TCHAR_HPP_
10 
11 #if defined(__c2__) && __clang_major__ == 3 && __clang_minor__ == 8
12 //To avoid compile error
13 //C:\Program Files (x86)\Windows Kits\8.1\Include\um\combaseapi.h(229,21): error : unknown type name 'IUnknown'
14 // static_cast<IUnknown*>(*pp); // make sure everyone derives from IUnknown
15 struct IUnknown;
16 #endif
17 #if defined(__c2__)
18 //Visual Studio 2015 Update 1 Clang with Microsoft CodeGen(clang 3.7)にはtchar.hまわりにバグあり、include順をいじるな
19 //https://connect.microsoft.com/VisualStudio/feedback/details/2122400
20 #include <Windows.h>
21 #endif//defined(__c2__)
22 #include <tchar.h>
23 #include <string>
24 #include <cstring>
25 
26 namespace dxle {
27  using tstring = std::basic_string<TCHAR>;
28  using std::size_t;
29  inline size_t tstrlen(const char* s) { return std::strlen(s); }
30  inline size_t tstrlen(const wchar_t* s) { return std::wcslen(s); }
31 }
32 #endif //DXLE_INC_BASIC_TYPES_TCHAR_HPP_
std::basic_string< TCHAR > tstring
Definition: tchar.hpp:27
size_t tstrlen(const char *s)
Definition: tchar.hpp:29
Definition: cast_if.hpp:12