diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:11 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:11 +0100 |
commit | 4538829ab86b5a1cd4e845e7eab165029c9d6d46 (patch) | |
tree | bbadf39aed0610c8f8f7b41fefff47773b8ac205 /libcutl/cutl/compiler/code-stream.txx | |
parent | 23d41842168ac1a1580111b9c5c73500ceee3d57 (diff) | |
parent | aad5ad9bf0c02aa4e79bc6b7d6c934612fff4026 (diff) |
Update upstream source from tag 'upstream/4.2.0'
Update to upstream version '4.2.0'
with Debian dir 1b38df7bbcf313223de3c50107ac0255090fe647
Diffstat (limited to 'libcutl/cutl/compiler/code-stream.txx')
-rw-r--r-- | libcutl/cutl/compiler/code-stream.txx | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/libcutl/cutl/compiler/code-stream.txx b/libcutl/cutl/compiler/code-stream.txx deleted file mode 100644 index 232c5cc..0000000 --- a/libcutl/cutl/compiler/code-stream.txx +++ /dev/null @@ -1,95 +0,0 @@ -// file : cutl/compiler/code-stream.txx -// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC -// license : MIT; see accompanying LICENSE file - -namespace cutl -{ - namespace compiler - { - // code_stream - // - - template <typename C> - code_stream<C>::~code_stream () - { - } - - // from_streambuf_adapter - // - - template <typename C> - void from_streambuf_adapter<C>:: - put (C c) - { - int_type i (stream_.sputc (c)); - - if (i == traits_type::eof ()) - throw eof (); - } - - template <typename C> - void from_streambuf_adapter<C>:: - unbuffer () - { - if (stream_.pubsync () != 0) - throw sync (); - } - - // to_streambuf_adapter - // - - template <typename C> - typename to_streambuf_adapter<C>::int_type to_streambuf_adapter<C>:: - overflow (int_type i) - { - try - { - stream_.put (traits_type::to_char_type (i)); - return i; - } - catch (typename from_streambuf_adapter<C>::eof const&) - { - return traits_type::eof (); - } - } - - template <typename C> - int to_streambuf_adapter<C>:: - sync () - { - return 0; - } - - // ostream_filter - // - - template <template <typename> class S, typename C> - ostream_filter<S, C>:: - ostream_filter (std::basic_ostream<C>& os) - : os_ (os), - prev_ (os_.rdbuf ()), - from_adapter_ (*prev_), - stream_ (from_adapter_), - to_adapter_ (stream_) - { - os_.rdbuf (&to_adapter_); - } - - template <template <typename> class S, typename C> - ostream_filter<S, C>:: - ~ostream_filter () - { - try - { - stream_.unbuffer (); - } - catch (...) - { - os_.rdbuf (prev_); - throw; - } - - os_.rdbuf (prev_); - } - } -} |