]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/move/example/doc_file_descriptor.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / move / example / doc_file_descriptor.cpp
index 0ec39879ceaf7a0953058601d066bba46c3898b1..bfc5a57581dd68c49662ca75afce9d1cff5270fa 100644 (file)
@@ -9,9 +9,6 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-#include <boost/move/detail/config_begin.hpp>
-#include <cassert>
-
 //[file_descriptor_def
 
 #include <boost/move/utility_core.hpp>
@@ -25,8 +22,8 @@ class file_descriptor
       return 1;
    }
 
-   void operating_system_close_file(int fd)
-   {  (void)fd;   assert(fd != 0); }
+   void operating_system_close_file(int)
+   {}
    //->
    int os_descr_;
 
@@ -36,7 +33,10 @@ class file_descriptor
    public:
    explicit file_descriptor(const char *filename)              //Constructor
       : os_descr_(operating_system_open_file(filename))
-   {  if(!os_descr_) throw std::runtime_error("file not found");  }
+   {
+      //=if(!os_descr_)
+         //=throw std::runtime_error("file not found");
+   }
 
    ~file_descriptor()                                          //Destructor
    {  if(os_descr_)  operating_system_close_file(os_descr_);  }
@@ -88,5 +88,3 @@ int main()
    return 0;
 }
 //]
-
-#include <boost/move/detail/config_end.hpp>