cleanup use of namespace filesystem
This commit is contained in:
		
							parent
							
								
									2806908f63
								
							
						
					
					
						commit
						9e686eb5d6
					
				| @ -40,18 +40,14 @@ | |||||||
| 
 | 
 | ||||||
| #include <nana/deploy.hpp> | #include <nana/deploy.hpp> | ||||||
| 
 | 
 | ||||||
|  // namespace std { namespace experimental { namespace filesystem { inline namespace v1 {
 | namespace nana  { namespace experimental { namespace filesystem | ||||||
| 
 |  | ||||||
| namespace nana  { namespace experimental { 	 |  | ||||||
| 
 |  | ||||||
| #ifndef CXX_NO_INLINE_NAMESPACE |  | ||||||
| inline namespace v1 |  | ||||||
| { | { | ||||||
|  | #ifndef CXX_NO_INLINE_NAMESPACE | ||||||
|  | 			inline namespace v1 | ||||||
|  | 			{ | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| namespace filesystem | 				enum class file_type | ||||||
| { |  | ||||||
| 	enum class file_type  |  | ||||||
| 	{  | 	{  | ||||||
| 		none = 0,   ///< has not been determined or an error occurred while trying to determine
 | 		none = 0,   ///< has not been determined or an error occurred while trying to determine
 | ||||||
| 		not_found = -1, ///< Pseudo-type: file was not found. Is not considered an error
 | 		not_found = -1, ///< Pseudo-type: file was not found. Is not considered an error
 | ||||||
|  | |||||||
| @ -15,6 +15,7 @@ | |||||||
| #ifndef NANA_FILESYSTEM_EXT_HPP | #ifndef NANA_FILESYSTEM_EXT_HPP | ||||||
| #define NANA_FILESYSTEM_EXT_HPP | #define NANA_FILESYSTEM_EXT_HPP | ||||||
| 
 | 
 | ||||||
|  | namespace nana {namespace experimental {namespace filesystem {namespace ext { | ||||||
| #if defined(NANA_WINDOWS) | #if defined(NANA_WINDOWS) | ||||||
|     constexpr auto def_root = "C:"; |     constexpr auto def_root = "C:"; | ||||||
|     constexpr auto def_rootstr = "C:\\"; |     constexpr auto def_rootstr = "C:\\"; | ||||||
| @ -27,4 +28,17 @@ | |||||||
| 
 | 
 | ||||||
| // nana::experimental::filesystem::path_user());   //  REPLACE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! to filesystem_ext.hhp
 | // nana::experimental::filesystem::path_user());   //  REPLACE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! to filesystem_ext.hhp
 | ||||||
| 
 | 
 | ||||||
|  | template<class DI> // DI = directory_iterator from std, boost, or nana
 | ||||||
|  | class directory_only_iterator : public DI | ||||||
|  | { | ||||||
|  |    // if (!this->is_directory()) continue;
 | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | template<class DI> // DI = directory_iterator from std, boost, or nana
 | ||||||
|  | class regular_file_only_iterator : public DI | ||||||
|  | { | ||||||
|  |     // if (this->is_directory()) continue;
 | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  |     }}}} | ||||||
| #endif //NANA_FILESYSTEM_EXT_HPP
 | #endif //NANA_FILESYSTEM_EXT_HPP
 | ||||||
|  | |||||||
| @ -31,29 +31,40 @@ | |||||||
| #if defined(NANA_BOOST_FILESYSTEM_AVAILABLE) && ( defined(NANA_BOOST_FILESYSTEM_FORCE) || (defined(STD_FILESYSTEM_NOT_SUPPORTED) && defined(NANA_BOOST_FILESYSTEM_PREFERRED) ) ) | #if defined(NANA_BOOST_FILESYSTEM_AVAILABLE) && ( defined(NANA_BOOST_FILESYSTEM_FORCE) || (defined(STD_FILESYSTEM_NOT_SUPPORTED) && defined(NANA_BOOST_FILESYSTEM_PREFERRED) ) ) | ||||||
| 
 | 
 | ||||||
| #   include <boost/filesystem.hpp> | #   include <boost/filesystem.hpp> | ||||||
|  | 
 | ||||||
| 	// add boost::filesystem into std::experimental::filesystem
 | 	// add boost::filesystem into std::experimental::filesystem
 | ||||||
| 	namespace std { | namespace std { | ||||||
| 		namespace experimental { | 	namespace experimental { | ||||||
|  | 		namespace filesystem { | ||||||
|  | 
 | ||||||
| #       ifdef CXX_NO_INLINE_NAMESPACE | #       ifdef CXX_NO_INLINE_NAMESPACE | ||||||
| 			using namespace boost::experimental; | 				using namespace boost::experimental::filesystem; | ||||||
| #       else | #       else | ||||||
| 			using namespace boost::experimental::v3; | 				using namespace boost::experimental::filesystem::v3; | ||||||
| #       endif | #       endif | ||||||
| 
 | 
 | ||||||
| 		} | 		} // filesystem
 | ||||||
|  | 	} // experimental
 | ||||||
|  | } // std
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| #elif defined(STD_FILESYSTEM_NOT_SUPPORTED) | #elif defined(STD_FILESYSTEM_NOT_SUPPORTED) | ||||||
| 
 | 
 | ||||||
| #   include <nana/filesystem/filesystem.hpp> | #   include <nana/filesystem/filesystem.hpp> | ||||||
| 	namespace std { | 
 | ||||||
| 		namespace experimental { | namespace std { | ||||||
|  | 	namespace experimental { | ||||||
|  | 		namespace filesystem { | ||||||
|  | 
 | ||||||
| #       ifdef CXX_NO_INLINE_NAMESPACE | #       ifdef CXX_NO_INLINE_NAMESPACE | ||||||
| 			using namespace nana::experimental; | 				using namespace nana::experimental::filesystem; | ||||||
| #       else | #       else | ||||||
| 			using namespace nana::experimental::v1; | 				using namespace nana::experimental::filesystem::v1; | ||||||
| #       endif | #       endif | ||||||
| 		} | 
 | ||||||
| } | 		} // filesystem
 | ||||||
|  | 	} // experimental
 | ||||||
|  | } // std
 | ||||||
| 
 | 
 | ||||||
| #else | #else | ||||||
| #    include <filesystem> | #    include <filesystem> | ||||||
|  | |||||||
| @ -37,12 +37,12 @@ | |||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| namespace nana {	namespace experimental { | namespace nana {	namespace experimental {	namespace filesystem | ||||||
| #ifndef CXX_NO_INLINE_NAMESPACE |  | ||||||
| 	inline namespace v1 { |  | ||||||
| #endif |  | ||||||
| 	namespace filesystem |  | ||||||
| 	{ | 	{ | ||||||
|  | #ifndef CXX_NO_INLINE_NAMESPACE | ||||||
|  | 			inline namespace v1 { | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| 		//class filesystem_error
 | 		//class filesystem_error
 | ||||||
| 			filesystem_error::filesystem_error(const std::string& msg, std::error_code err) | 			filesystem_error::filesystem_error(const std::string& msg, std::error_code err) | ||||||
| 				: std::system_error(err, msg) | 				: std::system_error(err, msg) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 qPCR4vir
						qPCR4vir