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
5
votes
1 answer

The annotation @Qualifier is disallowed for this location

@Override @Autowired(required = true) @Qualifier("hibernateCriteriaBuilder") public void setCriteriaBuilder(IQueryCriteriaBuilder criteriabuilder) { super.setCriteriaBuilder(criteriaBuilder): } This in the code I have in a java file and i…
Damonte Bowie
  • 55
  • 1
  • 5
5
votes
2 answers

C# : Why is First namespace redundant?

This is a little spooky. I'm thinking there must be a setting somewhere that explains why this is happening. In our solution there are about 50 different projects. For the most part, the libraries start with the namespace OurCompany. We have…
Nicholas
  • 3,286
  • 5
  • 27
  • 35
5
votes
4 answers

Is top-level volatile or restrict significant in a function prototype?

Is there any practical difference between the following prototypes? void f(const int *p); void f(const int *restrict p); void f(const int *volatile p); The section C11 6.7.6.3/15 (final sentence) says that top-level qualifiers are not considered…
M.M
  • 138,810
  • 21
  • 208
  • 365
5
votes
1 answer

What is "the issue" with variable qualifier placement?

In this document, under the section labeled "Variable Qualifiers", Apple says: You should decorate variables correctly. When using qualifiers in an object variable declaration, the correct format is: ClassName * qualifier variableName; for…
i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
5
votes
2 answers

C++ discards qualifiers

I have this error: BSPArduino.cpp:316: error: passing 'const BSPArduino' as 'this' argument of 'virtual void BSPArduino::enableWdt(const WATCHDOG_TIMER_DELAY&, const ___bool&)' discards qualifiers This method is define like this: void…
Anthony
  • 325
  • 2
  • 5
  • 15
5
votes
2 answers

Android multiple-screen qualifiers definitions

I wanna create a layout compatible with a very large number of devices and screens. As I have been researching I found out that the most common screen resolutions are 249x320, 480x800, 600x1024, 720x1280 (and some other screens proportional to…
ali
  • 10,927
  • 20
  • 89
  • 138
4
votes
1 answer

Why does gcc -Wdiscarded-qualifiers complain about this code?

I were writing a qsort compare function callback for this scenario: int matrix[3][4] = { {1,2,3,4}, {5,6,7,8}, {9,1,2,3}, }; qsort(matrix, 3, sizeof(int[4]), compare); Since the item type is int[4] then qsort should pass me int(*)[4]…
Lundin
  • 195,001
  • 40
  • 254
  • 396
4
votes
1 answer

Would (or should) CDI provide package qualifiers?

Studying Seam 3, I discovered that Seam Solder allows the @Named annotation to be applied to packages - in that case, all beans in this package will be automatically named, as if they were qualified with @Named themselves. I didn't see too much…
brandizzi
  • 26,083
  • 8
  • 103
  • 158
4
votes
1 answer

Qualifiers on =delete methods

When marking special methods as =delete do the qualifiers of the method come into play ? In other words are: inline constexpr myClass(const myClass&) noexcept = delete; and myClass(const myClass&) = delete; equivalent ?
A.D
  • 427
  • 1
  • 4
  • 12
4
votes
1 answer

SPARQL question: how to return property labels and associated date qualifiers from Wikidata

I am trying to return results for a set of persons (Edinburgh University alumni) who have held political office. I would like to return the title label of the office held, along with the start and end dates for each office, with many individuals…
Al Mac
  • 49
  • 1
4
votes
1 answer

Does spring-context support JSR-330 Qualifier on bean instances?

Spring has its own Qualifier annotation, I think it's equivalent to the javax.inject.Named annotation, which in turn is a concrete qualifier in JSR-330. So, I'm wondering which version of Spring, if any, supports Qualifier? Here is my example…
Lenik
  • 13,946
  • 17
  • 75
  • 103
4
votes
1 answer

Multiple icon images in Honeycomb

I'm trying to change my app icon to make it match the blue of Honeycomb but maintain the green icons for previous Android versions. I've come across a problem where if I put the blue 72x72 icon in drawable-xlarge, it uses it correctly in the…
Al.
  • 2,285
  • 2
  • 22
  • 30
4
votes
6 answers

What are Qualifiers in the C language?

I am reading some text at this url: https://cs.senecac.on.ca/~btp100/pages/content/varia_p.html In the section 'Qualifiers', they say: "We can qualify the int type to be sure that it contains a minimum number of bits" .... A short contains at least…
ipkiss
  • 13,311
  • 33
  • 88
  • 123
4
votes
3 answers

C++ return type qualifiers heaven

It's hell actually. Can someone please explain in plain English why the below segments work or not? class Hey; class Bitmap { public: const Hey* const& getHey() { return hey; }; // works const Hey* & getHey2() { return hey; }; // error…
Bill Kotsias
  • 3,258
  • 6
  • 33
  • 60
4
votes
3 answers

When defining a member function out-of-line, which qualifiers must appear in the declaration / definition / both?

I am almost sure this has been asked before. Unfortunately, my C++ has become so rusty that I don't even know what to search for. Is there an easy-to-remember rule of thumb that would tell me which qualifiers (inline, virtual, override, const,…
stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
1 2
3
14 15