Mirror reflection library 0.5.13

mirror/ct_string/c_str.hpp

Go to the documentation of this file.
00001 
00010 #ifndef MIRROR_CT_STRING_C_STR_1105240825_HPP
00011 #define MIRROR_CT_STRING_C_STR_1105240825_HPP
00012 
00013 #include <mirror/ct_string/default.hpp>
00014 #include <mirror/ct_string/evaluate.hpp>
00015 
00016 MIRROR_NAMESPACE_BEGIN
00017 namespace cts {
00018 namespace aux {
00019 
00020 template <typename Char, Char ... C>
00021 const Char* c_str(const basic_string<Char, C...>&)
00022 {
00023     static const Char res[] = { C ... , Char('\0')};
00024     return res;
00025 }
00026 
00027 } // namespace aux
00028 
00030 
00037 template <typename CTString>
00038 auto c_str(void) ->
00039 decltype(aux::c_str(typename evaluate<CTString>::type()))
00040 {
00041     return aux::c_str(typename evaluate<CTString>::type());
00042 }
00043 
00044 } // namespace cts
00045 MIRROR_NAMESPACE_END
00046 
00047 #endif //include guard
00048 

Copyright © 2006-2011 Matus Chochlik, University of Zilina, Zilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Fri Dec 16 2011 by Doxygen (version 1.7.3).
Important note: Although the 'boostified' version of Mirror uses the Boost C++ libraries Coding Guidelines and is implemented inside of the boost namespace, it IS NOT an officially reviewed and accepted Boost library. Mirror is being developed with the intention to be submitted for review for inclusion to the Boost C++ libraries.