diff options
author | Norbert Preining <norbert@preining.info> | 2020-08-07 03:02:55 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-08-07 03:02:55 +0000 |
commit | 3710c23789342d9d88783cbe9ad23eb5263a7c33 (patch) | |
tree | 1c40b2bfb9f6b652f7877ad0991f5d6b44391154 /graphics/asymptote/common.h | |
parent | d99fea72e367e8d4d2809b43b3b0206b1bb526b8 (diff) |
CTAN sync 202008070302
Diffstat (limited to 'graphics/asymptote/common.h')
-rw-r--r-- | graphics/asymptote/common.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/graphics/asymptote/common.h b/graphics/asymptote/common.h index 8b45967d1f..80dfef8ac3 100644 --- a/graphics/asymptote/common.h +++ b/graphics/asymptote/common.h @@ -16,7 +16,7 @@ #include "config.h" #endif -#if !defined(FOR_SHARED) && \ +#if !defined(FOR_SHARED) && \ ((defined(HAVE_LIBGL) && defined(HAVE_LIBGLUT) && defined(HAVE_LIBGLM)) || \ defined(HAVE_LIBOSMESA)) #define HAVE_GL @@ -88,4 +88,13 @@ using mem::istringstream; using mem::ostringstream; using mem::stringbuf; -#endif +static const struct ws_t {} ws={}; + +// Portable way of skipping whitespace +inline std::istream &operator >> (std::istream & s, const ws_t &ws) { + if(!s.eof()) + s >> std::ws; + return s; +} + +#endif |