|
Boost Users : |
Subject: Re: [Boost-users] Using different variables based on template type
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-06-03 07:49:07
>
> template <typename T>
> void put(std::map<std::string, T> const& map, std::string const&
> variableName, T const& value) {
> map[variableName] = value;
> }
>
> void putUint16(std::string const& variableName, uint16 const& value) {
> put(m_Uint16, variableName, value);
> }
>
> void putUint32(std::string const& variableName, uint32 const& value) {
> put(m_Uint32, variableName, value);
> }
>
This is the correct solution.
Andrew Sutton
andrew.n.sutton_at_[hidden]
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net