improve the detection for GCC
This commit is contained in:
@@ -294,6 +294,74 @@ namespace std
|
||||
*pos = (std::size_t)(end - ptr);
|
||||
return result;
|
||||
}
|
||||
}//end namespace std
|
||||
#endif //STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED
|
||||
|
||||
#ifdef STD_TO_STRING_NOT_SUPPORTED
|
||||
namespace std
|
||||
{
|
||||
std::string to_string(double v)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << v;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string to_string(long double v)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << v;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string to_string(unsigned v)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << v;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string to_string(int v)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << v;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string to_string(long v)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << v;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string to_string(unsigned long v)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << v;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string to_string(long long v)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << v;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string to_string(unsigned long long v)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << v;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string to_string(float v)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << v;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::wstring to_wstring(double v)
|
||||
{
|
||||
|
||||
@@ -468,8 +468,8 @@ namespace detail
|
||||
arg.right_button = ((Button2Mask & mask_state) != 0) || (::nana::mouse::right_button == arg.button);
|
||||
arg.mid_button = ((Button3Mask & mask_state) != 0) || (::nana::mouse::middle_button == arg.button);
|
||||
arg.alt = ((Mod1Mask & mask_state) != 0);
|
||||
arg.shift = <EFBFBD><EFBFBD>(ShiftMask & mask_state) != 0);
|
||||
arg.ctrl = <EFBFBD><EFBFBD>(ControlMask & mask_state) != 0);
|
||||
arg.shift = ((ShiftMask & mask_state) != 0);
|
||||
arg.ctrl = ((ControlMask & mask_state) != 0);
|
||||
|
||||
}
|
||||
|
||||
@@ -833,7 +833,7 @@ namespace detail
|
||||
msgwnd->flags.action = mouse_action::over;
|
||||
|
||||
click_arg.window_handle = reinterpret_cast<window>(msgwnd);
|
||||
emit_drawer(&drawer::click, msgwnd, arg, &context);
|
||||
emit_drawer(&drawer::click, msgwnd, click_arg, &context);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <cmath>
|
||||
#include <map>
|
||||
#include <deque>
|
||||
#include <nana/deploy.hpp>
|
||||
#include <nana/gui/place.hpp>
|
||||
#include <nana/gui/programming_interface.hpp>
|
||||
#include <nana/gui/widgets/label.hpp>
|
||||
@@ -95,13 +96,7 @@ namespace nana
|
||||
|
||||
std::string pos_str() const
|
||||
{
|
||||
#ifdef UNDEFINED_to_string
|
||||
std::stringstream ss;
|
||||
ss<<pos();
|
||||
return ss.str();
|
||||
#else
|
||||
return std::to_string(pos());
|
||||
#endif // UNDEFINED_to_string
|
||||
}
|
||||
|
||||
token read()
|
||||
|
||||
Reference in New Issue
Block a user