blob: 9623588f02561a2062e42b9e91ada34a4b780003 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// file : cutl/compiler/context.cxx
// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// license : MIT; see accompanying LICENSE file
#include <cutl/compiler/context.hxx>
namespace cutl
{
namespace compiler
{
void context::
remove (std::string const& key)
{
map::iterator i (map_.find (key));
if (i == map_.end ())
throw no_entry ();
map_.erase (i);
}
std::type_info const& context::
type_info (std::string const& key) const
{
map::const_iterator i (map_.find (key));
if (i == map_.end ())
throw no_entry ();
return i->second.type_info ();
}
}
}
|