]> git.mxchange.org Git - simgear.git/blob - simgear/sg_traits.hxx
Clamp pitch values rather than just dumping an error message.
[simgear.git] / simgear / sg_traits.hxx
1 /** \file sg_traits.hxx
2  * Provides a char_traits declaration for systems without it.
3  * \internal
4  */
5
6 #ifndef _SG_TRAITS_HXX
7 #define _SG_TRAITS_HXX
8
9 #include <simgear/compiler.h>
10
11 #ifndef SG_HAVE_TRAITS
12
13 // Dummy up some char traits for now.
14 template<class charT> struct char_traits{};
15
16 SG_TEMPLATE_NULL
17 struct char_traits<char>
18 {
19     typedef char      char_type;
20     typedef int       int_type;
21     typedef streampos pos_type;
22     typedef streamoff off_type;
23
24     static int_type eof() { return EOF; }
25 };
26 #endif // SG_HAVE_TRAITS
27
28 #endif // _SG_TRAITS_HXX