Changeset 8c0b781 in mainline


Ignore:
Timestamp:
2019-07-07T13:35:44Z (5 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9fe2fd7
Parents:
46c66f8
Message:

cpp: abort when undefined behaviour is encountered in std::async

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/__bits/thread/async.hpp

    r46c66f8 r8c0b781  
    3535#include <__bits/type_traits/result_of.hpp>
    3636#include <__bits/utility/forward_move.hpp>
     37#include <cassert>
    3738
    3839namespace std
     
    104105
    105106            /**
    106              * This is undefined behaviour, let's be nice though ;)
     107             * This is undefined behaviour, abandon ship!
    107108             */
    108             return future<result_t>{
    109                 new aux::deferred_shared_state<
    110                     result_t, F, Args...
    111                 >{forward<F>(f), forward<Args>(args)...}
    112             };
     109            abort();
    113110        }
    114111    }
Note: See TracChangeset for help on using the changeset viewer.