I'm trying to open a file with the following piece of code (here I just want to dump all the file to cout):
std::string get_smiles(const std::string* filename, const std::string* directory)
{
    std::ifstream file;
    file.open((*directory + *filename));
    if (file.is_open())
    {
        BOOST_LOG_TRIVIAL(info) << "File is open";
        std::cout << file.rdbuf();
    }
    else BOOST_LOG_TRIVIAL(error) << "Unable to open file";
However, when I run it, I get following message in the log
[2022-04-03 21:01:38.496191] [0x00000001138bee00] [info]    File is open
Process finished with exit code 132 (interrupted by signal 4: SIGILL)
I'm building this using CMake on OSX.
What can I do to resolve this issue?