Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

Crash with boost::shared_ptr and -check-uninit

$
0
0

 

Hi,

the sample program below crashes if compiled with

   icc sample.cpp -std=c++11 -check=uninit

with the Intel C++ compiler v14 on Linux (Suse Linux Enterprise Desktop 11) - it claims that some variable is used without initialization, but the header file looks right to me.

Has anyone else encountered this problem? Is it a boost or compiler issue? What can I do if I want to keep both boost and the debug option?

Best Regards,

    Christopher

#include <memory>
#include <iostream>

#include <boost/shared_ptr.hpp>

int main(const char* argv[], int argc)
{
    boost::shared_ptr<int> value(new int);
    *value = 1;
    std::cout << *value << std::endl;
}

Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>