@@ -50,10 +50,6 @@ template <class T>
5050constexpr bool is_ann_ref_v =
5151 is_ann_ref_impl<std::remove_reference_t <T>>::value;
5252
53- template <typename ... Ts>
54- using contains_alignment =
55- detail::ContainsProperty<alignment_key, std::tuple<Ts...>>;
56-
5753// filter properties that are applied on annotations
5854template <typename PropertyListTy>
5955using annotation_filter = decltype (filter_properties<propagateToPtrAnnotation>(
@@ -392,69 +388,69 @@ __SYCL_TYPE(annotated_ptr) annotated_ptr<T, detail::properties_t<Props...>> {
392388 // turned off for these operators to make sure the complete error notes are
393389 // printed
394390 // clang-format off
395- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
391+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
396392 class = std::enable_if_t <!has_alignment>>
397393 reference operator [](std::ptrdiff_t idx) const noexcept {
398394 return reference (m_Ptr + idx);
399395 }
400396
401- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
397+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
402398 class = std::enable_if_t <has_alignment>>
403399 auto operator [](std::ptrdiff_t idx) const noexcept -> decltype (" operator[] is not available when alignment is specified!" ) = delete ;
404400
405- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
401+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
406402 class = std::enable_if_t <!has_alignment>>
407403 annotated_ptr operator +(size_t offset) const noexcept {
408404 return annotated_ptr (m_Ptr + offset);
409405 }
410406
411- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
407+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
412408 class = std::enable_if_t <has_alignment>>
413409 auto operator +(size_t offset) const noexcept -> decltype (" operator+ is not available when alignment is specified!" ) = delete ;
414410
415- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
411+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
416412 class = std::enable_if_t <!has_alignment>>
417413 annotated_ptr &operator ++() noexcept {
418414 m_Ptr += 1 ;
419415 return *this ;
420416 }
421417
422- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
418+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
423419 class = std::enable_if_t <has_alignment>>
424420 auto operator ++() noexcept -> decltype (" operator++ is not available when alignment is specified!" ) = delete ;
425421
426- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
422+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
427423 class = std::enable_if_t <!has_alignment>>
428424 annotated_ptr operator ++(int ) noexcept {
429425 auto tmp = *this ;
430426 m_Ptr += 1 ;
431427 return tmp;
432428 }
433429
434- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
430+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
435431 class = std::enable_if_t <has_alignment>>
436432 auto operator ++(int ) noexcept -> decltype (" operator++ is not available when alignment is specified!" ) = delete ;
437433
438- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
434+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
439435 class = std::enable_if_t <!has_alignment>>
440436 annotated_ptr &operator --() noexcept {
441437 m_Ptr -= 1 ;
442438 return *this ;
443439 }
444440
445- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
441+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
446442 class = std::enable_if_t <has_alignment>>
447443 auto operator --() noexcept -> decltype (" operator-- is not available when alignment is specified!" ) = delete ;
448444
449- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
445+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
450446 class = std::enable_if_t <!has_alignment>>
451447 annotated_ptr operator --(int ) noexcept {
452448 auto tmp = *this ;
453449 m_Ptr -= 1 ;
454450 return tmp;
455451 }
456452
457- template <bool has_alignment = detail::contains_alignment<Props...>::value ,
453+ template <bool has_alignment = property_list_t :: template has_property<alignment_key>() ,
458454 class = std::enable_if_t <has_alignment>>
459455 auto operator --(int ) noexcept -> decltype (" operator-- is not available when alignment is specified!" ) = delete ;
460456
@@ -485,13 +481,13 @@ __SYCL_TYPE(annotated_ptr) annotated_ptr<T, detail::properties_t<Props...>> {
485481 " The property list contains invalid property." );
486482 // check the set if FPGA specificed properties are used
487483 static constexpr bool hasValidFPGAProperties =
488- detail::checkValidFPGAPropertySet<Props... >::value;
484+ detail::checkValidFPGAPropertySet<property_list_t >::value;
489485 static_assert (hasValidFPGAProperties,
490486 " FPGA Interface properties (i.e. awidth, dwidth, etc.) "
491487 " can only be set with BufferLocation together." );
492488 // check if conduit and register_map properties are specified together
493489 static constexpr bool hasConduitAndRegisterMapProperties =
494- detail::checkHasConduitAndRegisterMap<Props... >::value;
490+ detail::checkHasConduitAndRegisterMap<property_list_t >::value;
495491 static_assert (hasConduitAndRegisterMapProperties,
496492 " The properties conduit and register_map cannot be "
497493 " specified at the same time." );
0 commit comments