@@ -343,80 +343,6 @@ bool check_equal_values(const sycl::marray<T, numElements>& lhs,
343
343
}
344
344
#endif
345
345
346
- /* * Enables concept checking ahead of the Concepts TS
347
- * Idea for macro taken from Eric Niebler's range-v3
348
- */
349
- #define REQUIRES_IMPL (B ) typename std::enable_if<(B), int >::type = 1
350
- #define REQUIRES (...) REQUIRES_IMPL((__VA_ARGS__))
351
-
352
- /* *
353
- * @brief Transforms the input type into a dependant type and performs
354
- * an enable_if based on the condition.
355
- *
356
- * Useful for disabling a member function based on a template parameter
357
- * of the class.
358
- * @param typeName Non-dependant type to be made dependant
359
- * @param condition The condition specifying when the template
360
- * should be enabled. typeName can occur within this expression.
361
- */
362
- #define ENABLE_IF_DEPENDANT (typeName, condition ) \
363
- typename overloadDependantT = typeName, \
364
- typename = typename std::enable_if < \
365
- std::is_same<typeName, overloadDependantT>::value && \
366
- (condition) > ::type
367
-
368
- template <bool condition, typename F1, typename F2,
369
- bool same_return_type =
370
- std::is_same<typename std::result_of<F1&()>::type,
371
- typename std::result_of<F2&()>::type>::value>
372
- struct if_constexpr_impl ;
373
-
374
- template <bool condition, typename F1, typename F2>
375
- struct if_constexpr_impl <condition, F1, F2, true > {
376
- static constexpr auto result (const F1& f1, const F2& f2) -> decltype(f1()) {
377
- return condition ? f1 () : f2 ();
378
- }
379
- };
380
-
381
- template <typename F1, typename F2>
382
- struct if_constexpr_impl <true , F1, F2, false > {
383
- static constexpr auto result (const F1& f1, const F2&) -> decltype(f1()) {
384
- return f1 ();
385
- }
386
- };
387
-
388
- template <typename F1, typename F2>
389
- struct if_constexpr_impl <false , F1, F2, false > {
390
- static constexpr auto result (const F1&, const F2& f2) -> decltype(f2()) {
391
- return f2 ();
392
- }
393
- };
394
-
395
- /* *
396
- * @brief Library implementation for C++17's compile-time if-statement so that
397
- * it works in C++11. Generates a call to the invocable object `f1` if
398
- * `condition == true` at compile-time, otherwise a call to `f2` is generated.
399
- */
400
- template <bool condition, typename F1, typename F2,
401
- typename R = typename std::conditional<
402
- condition, typename std::result_of<F1&()>::type,
403
- typename std::result_of<F2&()>::type>::type>
404
- inline R if_constexpr (const F1& f1, const F2& f2) {
405
- return if_constexpr_impl<condition, F1, F2>::result (f1, f2);
406
- }
407
-
408
- /* *
409
- * @brief Library implementation for C++17's compile-time if-statement so that
410
- * it works in C++11. Generates a call to the invocable object `f` if
411
- * `condition == true` at compile-time, otherwise no code is generated.
412
- */
413
- template <bool condition, typename F>
414
- inline void if_constexpr (const F& f) {
415
- if (condition) {
416
- f ();
417
- }
418
- }
419
-
420
346
/* *
421
347
* @brief Tag to denote mapping of integer coordinates to real scale
422
348
*
0 commit comments