This follows code snippet is behaving quite weird on two platforms WSL
and Ubuntu
#include <iostream>
#include <boost/filesystem.hpp>
int main(int argc, char **argv)
{
try
{
auto cp = boost::filesystem::current_path();
if (boost::filesystem::is_directory(cp))
{
std::cout << cp << " is a directory \n";
}
}
catch (std::exception &e)
{
std::cerr << " Problem ? :: " << e.what();
}
return 0;
}
On WSL
the output is
Problem ? :: boost::filesystem::status: Function not implemented: "/home/kk"%
while on a Ubuntu VM
"/home/kk" is a directory
Question, is this a bug with boost on WSL or its just the platform thing.
Aucun commentaire:
Enregistrer un commentaire