Questions tagged [qualifiers]

A qualifier adds an extra "quality", such as specifying volatility or constness of a variable

They're similar to adjectives: "a fickle man", "a volatile int", "an incorruptible lady", "a const double". With or without a qualifier, the variable itself still occupies the same amount of memory, and each bit has the same interpretation or contribution to the state/value. Qualifiers just specify something about how it may be accessed or where it is stored

Credits goes to Tony_D @ What is the meaning of "qualifier"?

211 questions
1
vote
0 answers

Quarkus and JAX-RS: Exception with Qualifier Annotation on Method?

I am writing a web app using the Quarkus framework, v2.12.3. I have a simple JAX-RS class and method that look something like this: @Path("/{token") @GET @Produces({"text/plan"} public Response processRequest(@PathParam("token")…
Shadowman
  • 11,150
  • 19
  • 100
  • 198
1
vote
1 answer

Is applying _Atomic type qualifier to an incomplete type valid?

Is applying _Atomic type qualifier to an incomplete type valid? Example: _Atomic void* p; _Atomic struct S* p1; _Atomic struct S x; struct S { int i; }; Invocations: $ gcc t0.c -std=c11 -pedantic -Wall -Wextra -c $ clang t0.c -std=c11…
pmor
  • 5,392
  • 4
  • 17
  • 36
1
vote
1 answer

clang, gcc, and ignored qualifiers: who is right?

I found a difference in behavior between gcc and clang when compiling BoringSSL, and was able to whittle it down to the following test case to illustrate: typedef char *OPENSSL_STRING; #if USE_TYPEDEF #define constptr const…
Dmitri
  • 479
  • 3
  • 10
1
vote
1 answer

spring IOC qualifier and autowired strange behavior

I've specified Qualifier on both autowired et bean method. So What am i missing ? @Configuration @EnableWebSecurity public class CustomSecurityCOnfig { @Bean @Qualifier("entryPoint") AuthenticationEntryPoint…
soung
  • 1,411
  • 16
  • 33
1
vote
0 answers

read_only vs const on non-image OpenCL parameters

Reading the OpenCL documentation, I know that the access qualifiers read_only and write_only are intended for image memory. However, I'm noticing some people use these qualifiers on regular, non-image-memory, parameters, e.g.: void foo(unsigned n,…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
1
vote
1 answer

GLSL Layout Qualifier Binding Points for out-dated OpenGL version

The title is my question. Is there any replacement of 'binding' layout qualifier for OpenGL v 4.1? I'm using MacOS and Xcode so if I run OpenGL 4.2 I got an error of glewinit saying 'Missing GL version'. If I run this code with OpenGL 4.1, of…
shinerd
  • 11
  • 1
1
vote
0 answers

Can I apply Moshi @JsonQualifier to a type parameter?

I need to define the JsonAdapter for BigDecimal by the JsonQualifier annotation and use it on the items in a list. @JsonQualifier @Target(AnnotationTarget.TYPE) @Retention(AnnotationRetention.RUNTIME) annotation class…
1
vote
1 answer

Qualifiers for printf on WinCE

On WinCE, when using printf, what are the qualifiers for various data types - short, unsigned long etc. For short and ulong, I know the answers are %hd & %lu, I am actually looking for a MSDN site that lists all data types and their qualifiers on…
Sesh
  • 5,993
  • 4
  • 30
  • 39
1
vote
1 answer

Realloc() discards qualifiers

I am just writing a code that has to reallocate an array X of pointers to constant strings A,B,C (see scheme below): _______ _______ _______ ________ ________________ |char* A|char* B|char* C|...|char** X|...|char*** pref_arr|... """""""…
Adam Bajger
  • 523
  • 7
  • 20
1
vote
1 answer

ambiguity in qualification conversion

I think I either misunderstand something or something in the standard might be ambiguous. And it's regarding the qualification conversions. According to the newest draft http://eel.is/c++draft/conv.qual#1 A cv-decomposition of a type T is a…
1
vote
1 answer

Android correct smallest width qualifier

This is my first venture in sw qualifiers and I appear to be missing the mark. Looking into this I see soo many directions on figuring out how to correctly calculate what is needed and through trial and error, I have landed back on error. What I…
1
vote
1 answer

SPARQL query with qualifiers

i have problem with qualifiers in SPARQL. I have this query: SELECT ?title ?item ?date ?place WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } ?item wdt:P161 wd:Q38111. ?item wdt:P1476 ?title. ?item wdt:P577 ?date. …
1
vote
1 answer

How to const-qualify dynamically allocated data?

According to this answer, constants shouldn't be deleted because they may not be allocated in the first place. However, there exists some cases where I want to protect dynamically allocated data. For example, when managing user sessions†, I want to…
nalzok
  • 14,965
  • 21
  • 72
  • 139
1
vote
0 answers

missing pointer cv qualification in parameter function, partial template specialization

Struct Name is used to convert type declaration into a string. When testing a logic error occurs, when the type declaration is a function type (or type of pointer function) and has a parameter type declaration of pointer function with qualification…
1
vote
0 answers

Indicate a function has no side effects

Member functions in C++ may be qualified as const to guarantee that they don't alter this, but I don't know of anyway to show that a function in general does not cause any changes to any data anywhere. This would be helpful information to be able to…
rtpax
  • 1,687
  • 1
  • 18
  • 32