Skip to content

Commit

Permalink
Joseph's Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
akleeman committed Jun 4, 2019
1 parent 28b7785 commit a7de4e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions include/albatross/src/details/error_handling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ namespace albatross {
#define ALBATROSS_FAIL(dummy, msg) \
{ static_assert(delay_static_assert<dummy>::value, msg); }

/*
* Setting ALBATROSS_FAIL to "= delete" as below will slightly
* change the behavior of failures. In some situations
* inspection of return types can trigger the delay_static_assert
* approach above, while the deleted function approach may
* work fine. In general however the deleted function approach
* leads to slightly more confusing compile errors since it
* isn't possible to include an error message.
*/

//#define ALBATROSS_FAIL(dummy, msg) = delete

} // namespace albatross
Expand Down
2 changes: 1 addition & 1 deletion include/albatross/src/details/traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ template <typename X> class is_complete {
template <typename T> static std::false_type test(...);

public:
static constexpr bool value = decltype(test<X>(0))::value;
static constexpr bool value = decltype(test<typename std::decay<X>::type>(0))::value;
};

template <typename T> struct is_vector : public std::false_type {};
Expand Down

0 comments on commit a7de4e9

Please sign in to comment.