diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2012-01-17 20:30:46 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2012-01-17 20:30:46 -0500 |
commit | 51b26cab9ad8dc54277c6158ad40afdf3ed0e6d0 (patch) | |
tree | ac7adc9c6f1fa753a48ceec2195d0dd298901c37 /indra/test | |
parent | 74fbd31813494fe120211fbdad3ed6da9c2d5d8b (diff) |
Any proper RAII class must either handle copying or be noncopyable.
NamedTempFile makes no attempt to deal with copying, therefore make it
noncopyable.
Diffstat (limited to 'indra/test')
-rw-r--r-- | indra/test/namedtempfile.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/test/namedtempfile.h b/indra/test/namedtempfile.h index 7ffb2836cc..aa7058b111 100644 --- a/indra/test/namedtempfile.h +++ b/indra/test/namedtempfile.h @@ -16,8 +16,9 @@ #include "apr_file_io.h" #include <string> #include <boost/function.hpp> -#include "boost/lambda/lambda.hpp" -#include "boost/lambda/bind.hpp" +#include <boost/lambda/lambda.hpp> +#include <boost/lambda/bind.hpp> +#include <boost/noncopyable.hpp> #include <iostream> #include <sstream> @@ -25,7 +26,7 @@ * Create a text file with specified content "somewhere in the * filesystem," cleaning up when it goes out of scope. */ -class NamedTempFile +class NamedTempFile: public boost::noncopyable { public: NamedTempFile(const std::string& pfx, const std::string& content, apr_pool_t* pool=gAPRPoolp): |