diff --git a/examples/greet/main.cpp b/examples/greet/main.cpp index a9bb14e..7357397 100644 --- a/examples/greet/main.cpp +++ b/examples/greet/main.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #if defined(__GNU_LIBRARY__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 17) || __GLIBC__ > 2) # define HasSecureGetenv diff --git a/include/wrenpp/detail/string_bt.hpp b/include/wrenpp/detail/string_bt.hpp index 689a651..2ea006e 100644 --- a/include/wrenpp/detail/string_bt.hpp +++ b/include/wrenpp/detail/string_bt.hpp @@ -18,9 +18,13 @@ #ifndef id170B0E6C34D14EBA9B92A35977BDBFB3 #define id170B0E6C34D14EBA9B92A35977BDBFB3 +//#define PRINTABLE_STRING_BT + #include #include -#include +#if defined(PRINTABLE_STRING_BT) +# include +#endif #include namespace dhandy { @@ -28,8 +32,10 @@ namespace dhandy { template class string; +#if defined(PRINTABLE_STRING_BT) template std::basic_ostream& operator<< ( std::basic_ostream& parStream, const string& parString ); +#endif namespace implem { template constexpr bool eq (const string& l, const string& r); @@ -37,7 +43,9 @@ namespace dhandy { template class string { +#if defined(PRINTABLE_STRING_BT) friend std::ostream& operator<< <>( std::ostream& parStream, const string& parString ); +#endif friend constexpr bool implem::eq (const string&, const string&); public: using value_type = Ch; @@ -122,11 +130,13 @@ namespace dhandy { return implem::concat(std::make_index_sequence(), string(m_data), parOther); } +#if defined(PRINTABLE_STRING_BT) template inline std::ostream& operator<< (std::ostream& parStream, const string& parString) { parStream << parString.m_data; return parStream; } +#endif template constexpr bool string::operator== (const string& other) const {