Skip to content

Commit

Permalink
quickfix: removed auto_ptr in snowhouse to get rid of warnings
Browse files Browse the repository at this point in the history
This should be fixed in snowhouse properly to accomodate both for older
and newer compilers. But this fix is needed to get green builds for now.
  • Loading branch information
joakimkarlsson committed May 10, 2014
1 parent 1d2357d commit 82b6e31
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,3 +7,4 @@ builds/
build/
tags
/cotire/
*.todo
8 changes: 4 additions & 4 deletions bandit/assertion_frameworks/snowhouse/snowhouse/exceptions.h
Expand Up @@ -15,17 +15,17 @@ namespace snowhouse {
class ExceptionStorage
{
public:
static std::auto_ptr<ExceptionType>& last_exception()
static std::shared_ptr<ExceptionType>& last_exception()
{
static std::auto_ptr<ExceptionType> last;
static std::shared_ptr<ExceptionType> last;
return last;
}

void compiler_thinks_i_am_unused() {}

~ExceptionStorage()
{
last_exception().reset(NULL);
last_exception().reset();
}
};

Expand Down Expand Up @@ -56,7 +56,7 @@ ExceptionStorage<EXCEPTION_TYPE> IGLOO_CONCAT(IGLOO_storage_, __LINE__); IGLOO_C
} \
catch (const EXCEPTION_TYPE& e) \
{ \
ExceptionStorage<EXCEPTION_TYPE>::last_exception() = std::auto_ptr<EXCEPTION_TYPE>(new EXCEPTION_TYPE(e)); \
ExceptionStorage<EXCEPTION_TYPE>::last_exception() = std::shared_ptr<EXCEPTION_TYPE>(new EXCEPTION_TYPE(e)); \
} \
catch(...) \
{ \
Expand Down
6 changes: 5 additions & 1 deletion cross_compile.sh
Expand Up @@ -31,6 +31,9 @@ GCC47=$?
build_for gcc-4.8 g++-4.8
GCC48=$?

build_for gcc-4.9 g++-4.9
GCC49=$?

build_for clang clang++
CLANG=$?

Expand All @@ -42,6 +45,7 @@ echo -e "gcc-4.5:\t$GCC45"
echo -e "gcc-4.6:\t$GCC46"
echo -e "gcc-4.7:\t$GCC47"
echo -e "gcc-4.8:\t$GCC48"
echo -e "gcc-4.9:\t$GCC49"
echo -e "clang:\t$CLANG"
echo "Done"
exit $(( $GCC45 + $GCC46 + $GCC47 + $GCC48 + $CLANG ))
exit $(( $GCC45 + $GCC46 + $GCC47 + $GCC48 + $GCC49 + $CLANG ))

0 comments on commit 82b6e31

Please sign in to comment.